I would like to find the locus of $z\in\mathbb{C}$ such that $$\left| z-a\right|^2=k\left| z-b\right|^2 ,$$ where $k>0$, and $a,b\in\mathbb{C}$.
I found, if $k\neq 1$, the circle $$\left| z-\dfrac{1}{1-k}(a-kb)\right|^2=\dfrac{k}{(1-k)^2}\left| a-b\right|^2 .$$ If $k=1$, the equidistant line from $a$ and $b$.
My problem is that I had to solve it in $\mathbb{R}^2$ with $z=(x,y)$, ... And I'm almost sure that there is a way to see it more geometrically (that recall the complex inversion?). I tried to consider the map $$z\longmapsto \dfrac{\left| z-a\right|^2}{\left| z-b\right|^2} $$ But nothing came out.
Do you have any idea please?
The following sketches such a way.
By rotating, reflecting and rescaling the axes of the complex plane, it can be assumed WLOG that $a=1, b=0$. Then the equation can be rewritten as:
$$\left|1 - \frac{1}{z}\right| = \sqrt{k}$$
therefore the locus of $\frac{1}{z}$ is a circle $\Gamma$ of radius $\sqrt{k}$ centered at $1$.
Iff $\sqrt{k} = 1$ then the circle $\Gamma$ passes through the center of the inversion $z \mapsto \frac{1}{z}$ so its inverse (which is the locus of $z$) will be a straight line (in fact the perpedicular bisector of $AB$).
Otherwise the image of $\Gamma$ under the inversion $z \mapsto \frac{1}{z}$ is a circle, which is the locus of $z$.