Find loci of the points in complex plane such that $$\mathrm{Im} \left (\frac{z-z_1}{z-z_2}\right )^n=0,$$ where $n\in\mathbb{N}$, $z_1, z_2$ are the given points in $\mathbb{C}$.
When $n=1$, it represents the line passing through $z_1$ and $z_2$ except $z_2$. How do I deal with the other cases when $n\geq 2$? Any hint would be appreciated.
Just to think of it geometrically $$w= \frac{z-z_1}{z-z_2}$$ is a transform which sends $z_1$ to zero and $z_2$ to $\infty$ So your equation is $\mathrm{Im}\ w^n =0$ and this means that $$\mathrm{Arg} \ w=k\frac{\pi}{n}$$ for some integer $k$. That is $w$ is the union of $n$ lines through the origin. One of them being the real line. Now it is just a question of finding the image of these lines under the inverse of the above transform. But since a Möbius transform sends circles and lines to circles and line we know that the image is the line through $z_1$ and $z_2$ plus $n-1$ circles passing through $z_1$ and $z_2$. Using the theory of the Möbius transform you can find the centres of these circles.