The value of $|z|^2+|z−3|^2+|z−i|^2$ is minimum when $z$ equals? 
The value of $|z|^2+|z−3|^2+|z−i|^2$ is minimum when $z$ equals?

I thought probably the circumcentre of the triangle formed by $0,i,3$ should be the answer as in that case the distances would be equal.But the answer is different.Is there anyway to logically deduce the answer instead of the generic method that books follow (i.e. put $z=x+iy$ and then find minima).
 A: As @DeepSea mentioned, we can think of this problem geometrically. Given $\bigtriangleup ABC$, with $A=(0,0)$, $B=(3,0)$, $C=(0,1)$, find the point $P$ that minimizes $PA^2+PB^2+PC^2$.
I am first going to provide physical intuition, and then a rigorous proof as to why the point $P$ must be the centroid of the triangle.
Imagine three Hookean springs, all with spring-constant $1$. Attach one end of each spring to each vertex of the triangle. Take the other ends of the springs and attatch them to the same point, $X$. In this setup, the vertices are fixed, but point $X$ is free to move around. The potential energy of this system is proportional to $XA^2+XB^2+XC^2$. Since nature tends to minimize potential energy, when this system comes to rest, this quantity will be minimized. We also know that the system will come to rest when the net force is $0$. The net force for this system is proportional to the vector $\vec{XA}+\vec{XB}+\vec{XC}$. So, the system will come to rest when $\vec{XA}+\vec{XB}+\vec{XC}=0$. The only point with this property if the centroid, or $G=\displaystyle\frac{A+B+C}{3}$.
Now, for a rigorous proof from this site: http://www.cut-the-knot.org/triangle/medians.shtml (this is different from the one posted by @ArkyaChatterjee  in the comments)
Let's call the centroid $\displaystyle G=\frac{A+B+C}{3}$. It can be verified that $\vec{GA}+\vec{GB}+\vec{GC}=0$. Take any random point, $X$:
\begin{equation} \label{eq1}
\begin{split}
XA^2+XB^2+XC^2 & = \left|\vec{XA}\right|^2+\left|\vec{XB}\right|^2+\left|\vec{XC}\right|^2\\
 & = \left|\vec{GX}+\vec{GA}\right|^2+\left|\vec{GX}+\vec{GB}\right|^2+\left|\vec{GX}+\vec{GC}\right|^2\\
&= 3\left|\vec{GX}\right|^2+\left|\vec{GA}\right|^2+\left|\vec{GB}\right|^2+\left|\vec{GC}\right|^2+2\vec{GX}\cdot\left(\vec{GA}+\vec{GB}+\vec{GC}\right)\\
&= 3GX^2+GA^2+GB^2+GC^2+2\vec{GX}\cdot0\\
&= 3GX^2+GA^2+GB^2+GC^2\\
& \geq GA^2+GB^2+GC^2
\end{split}
\end{equation}
(Here, the operator $\cdot$ represents inner product.)
In your particular case, we have $\displaystyle z=\frac{0+3+i}{3}=1+\frac{i}{3}$.
A: Let's try to generalize this problem. Suppose we have $n$ points $z_1,\ldots,z_n$ in the complex plane, and we wish to find the complex number $z$ which minimizes $\displaystyle\sum_{k = 1}^{n}|z-z_k|^2$. 
Let $\mu = \dfrac{1}{n}\displaystyle\sum_{k = 1}^{n}z_k$ be the centroid of the points $z_1,\ldots,z_n$. Then, 
$\displaystyle\sum_{k = 1}^{n}|z-z_k|^2$ $= \displaystyle\sum_{k = 1}^{n}(z-z_k)(\overline{z}-\overline{z}_k)$ $= \displaystyle\sum_{k = 1}^{n}(z\overline{z} - z_k\overline{z} - z\overline{z}_k + z_k\overline{z}_k)$ 
$= nz\overline{z} - \left(\displaystyle\sum_{k = 1}^{n}z_k\right)\overline{z} - z\left(\displaystyle\sum_{k = 1}^{n}\overline{z}_k\right) + \left(\displaystyle\sum_{k = 1}^{n}z_k\overline{z}_k\right)$ $= nz\overline{z} - n\mu\overline{z} - nz\overline{\mu} + \left(\displaystyle\sum_{k = 1}^{n}|z_k|^2\right)$
$= nz\overline{z} - n\mu\overline{z} - nz\overline{\mu} + n\mu\overline{\mu} - n\mu\overline{\mu} + \left(\displaystyle\sum_{k = 1}^{n}|z_k|^2\right)$ $= n(z-\mu)(\overline{z}-\overline{\mu}) - n\mu\overline{\mu} + \left(\displaystyle\sum_{k = 1}^{n}|z_k|^2\right)$
$= n|z-\mu|^2 - n\mu\overline{\mu} + \left(\displaystyle\sum_{k = 1}^{n}|z_k|^2\right)$
Clearly, $- n\mu\overline{\mu} + \left(\displaystyle\sum_{k = 1}^{n}|z_k|^2\right)$ is constant w.r.t. $z$ and $n|z-\mu|^2$ is minimized when $z = \mu$. Thus, $\displaystyle\sum_{k = 1}^{n}|z-z_k|^2$ is minimized when $z = \mu = \dfrac{1}{n}\displaystyle\sum_{k = 1}^{n}z_k$, i.e. when $z$ is the centroid of $z_1,\ldots,z_n$. 
A: The expression can be viewed as the sum of the square of the distances from $P = (x,y)$ to $3$ vertices of the triangle $\triangle ABC$ with $A = (0,0), B = (3,0), C = (0,1)$. This sum is minimized when $P$ coincides with the centroid which is the intersection of the medians.
A: To elaborate on @DeepSea's answer: Given points $P_1, P_2, \ldots, P_k$ in euclidean space, let $\bar P:=\frac1k(P_1 +\cdots+P_k)$ be the average of the points (i.e., their centroid). To show that $\bar P$ is the point $Q$ that minimizes the sum of squared distances to the points $P_1,\ldots,P_k$, note that the squared distance from $Q$ to the $i$th point is
$$
\begin{align}
|Q-P_i|^2&=|Q-\bar P + \bar P-P_i|^2\\
&=|Q-\bar P|^2+\langle Q-\bar P,\bar P-P_i\rangle
+\langle\bar P-P_i,Q-\bar P\rangle+|\bar P-P_i|^2\tag1\end{align}
$$
where $\langle\cdot,\cdot\rangle$ denotes the inner product and $|Q|^2=\langle Q,Q\rangle$. When you sum (1) over all $i$, the second term drops out since
$$
\sum_i\langle Q-\bar P,\bar P-P_i\rangle=\langle Q-\bar P,\sum_i(\bar P-P_i)\rangle=\langle Q-\bar P,0\rangle=0.
$$
Similarly the third term drops out, so what remains is
$$
\sum_i|Q-P_i|^2=\sum_i|Q-\bar P|^2+\sum_i|\bar P-P_i|^2.\tag2
$$
Since the second term on the RHS of (2) is free of $Q$, it is clear that the sum of squared distances is minimized when $Q=\bar P$.
A: *

*When $\text{z}\in\mathbb{C}$, we can write $z=a+bi$ where $a=\Re[z]$ and $b=\Im[z]$:
$$\text{Q}(a,b)=|z|^2+|z−3|^2+|z−i|^2=10+3a(4-2)+b(3b-2)$$


To solve the minimum:
$$
\begin{cases}
\frac{\partial\text{Q}(a,b)}{\partial a}=3(a-2)+3a\\
\frac{\partial\text{Q}(a,b)}{\partial b}=6b-2
\end{cases}
$$
Solving this gives us $a=1$ and $b=\frac{1}{3}$
