Determining $\min\{|z-a|^2+|z-b|^2 \mid z\in \mathbb{C}\}$ I've been doing exercises on understanding the structures of given complex sets, but I'm stuck on this one.

Find $$\min\{|z-a|^2+|z-b|^2 \mid z\in \mathbb{C}\},$$ where $a,b\in \mathbb{C}.$

What's the correct way to tackle this kind of exercises? I've tried changing it to polar form and expanding the complex number ($z=x+iy$) but I get expressions way more complicated and I think I'm not going the right way.
Would it be correct to do $f(z)=|z-a|^2+|z-b|^2$ and differentiate this function?
That is, $f'(z)=-2a-2b+4z$.
Thanks for the time.
 A: Make the problem symmetric by using
$$
z=w+\frac{a+b}{2}
$$
so
$$
z-a=w+\frac{a+b}{2}-a=w-\frac{a-b}{2},\qquad
z-b=w+\frac{a+b}{2}-b=w+\frac{a-b}{2}
$$
and you have instead, with $c=(a-b)/2$,
$$
f(w)=|w-c|^2+|w+c|^2
$$
Now you can apply the parallelogram identity
$$
|x-y|^2+|x+y|^2=2|x|^2+2|y|^2
$$
which can be derived from
\begin{align}
|x-y|^2&=(x-y)(\bar{x}-\bar{y})=x\bar{x}-x\bar{y}-\bar{x}y+y\bar{y}\\
|x+y|^2&=(x+y)(\bar{x}+\bar{y})=x\bar{x}+x\bar{y}+\bar{x}y+y\bar{y}
\end{align}
Hence $f(w)=2|w|^2+2|c|^2$ and its minimum is for $w=0$.

By the way, this shows that the locus $|z-a|^2+|z-b|^2=k$ is a circle with center at $(a+b)/2$ and radius $\sqrt{k/2-|c|^2}$ (provided $k\ge2|c|^2$), which is easy to see also by expanding the expression with rectangular forms for $z,a,b$.
A: Hint1: Think of it geometrically, $a \text{ and } b$ are vectors. You want a point which is closest to both.
Hint2: What about the midpoint of $a \text{ and } b$? Can you prove that its the minimum by expanding the objective function as $\min \ (z_x-a_x)^2 + (z_y-a_y)^2 + (z_x-b_x)^2 + (z_y-b_y)^2$?
A: The function $|z|$ is not differentiable wrt $z$.
You could think about it geometrically. Suppose you plug a $z$ into the expression $|z-a|^2+|z-b|^2$, what is this expression? It is $d_a^2+d_b^2$, where $d_a$ is the distance from $a$ to $z$ and $d_b$ is similarly interpreted. It should be easy to see that to minimise $d_a^2+d_b^2$, $z$ must be on the line segment joining $a$ and $b$. Can you take it from here?
