Let z be a complex number such that $\frac{z-i}{z-1}$ is purely imaginary. Then the minimum value of $|z-(2+2 i)|$ is ?
My approach:-
$$ \begin{array}{l} \\ \left|z-z^{\prime}\right| \geqslant| \ |z|-\left|z^{\prime}\right|| \end{array} $$ where, $z^{\prime}=2+2 i$ $$ \left|z^{\prime}\right|=\sqrt{8}=2 \sqrt{2} $$ $Let, \quad z=x+i y$ $$ \begin{array}{l} \frac{z-i}{z-1} \\ =\frac{\{x+i(y-1)\}\{(x-1)-i y\}}{(x-1)^{2}+(i y)^{2}} \\ =\frac{x(x-1)+y(y-1)+i(x-1)(y-1)-x y}{(x-1)^{2}-(i y)^{2}} \end{array} $$ ${}{} \frac{z-i}{z-1}$ is purely imagivery $$ \begin{array}{c} \text { Hence, } x(x-1)+y(y-1)=0 \\ x(x-1)=-y(y-1) \\ x^{2}+y^{2}=x+y \end{array} $$ What to do next?

this last equality shows that $x$, $y$ is on the circle of radius $\frac{1}{2^{1/2}}$ and of center $(1/2, 1/2)$. Also $|z-(2+2i)|= -x-y+8$, using again the last equality you showed. Observe that this is is a continuous function and, as we showed earlier, on a compact set, so indeed there is a minimum. Now use standard multivariable calculus techniques to find critical points and minimum