$$f(x)=\sum_{v=1}^k m_v\|x-x_v\|_2^2, \ \ \ x,x_v \in \mathbb{R}^n, m_v \in \mathbb{R}>0$$
($\|.\|_2^2$ is the euclidean norm but squared)
I need to determine the global minimum of $f(x)$ and reason why it truly is a global minimum.
What I tried:
As $m_v>0$ and because $\|x-x_v\|_2^2$ is a norm it clear that $f(x)=\sum_{v=1}^k m_v\|x-x_v\|_2^2 \ge 0 \ \forall x \in \mathbb{R}^n$ and therefore the global minimum of $f$ is$x=x_v$.
Because I don't know if that's sufficient I also tried this:
$f(x)=\sum_{v=1}^k m_v\|x-x_v\|_2^2=\sum_{v=1}^k m_v \sum_{i=1}^{n}(x_i-x_{v_i})^2$ and therefore
$f'(x)=2\sum_{v=1}^k m_v \ \sum_{i=1}^{n}(x_i-x_{v_i})$.
So $f'(x)=0 \Leftrightarrow x_i=x_{v_i} \forall i=1...n \ \forall v=1...k$
$f''(x)=2\sum_{v=1}^k m_v \ \sum_{i=1}^{n}1>0$
And therefore $x=x_v$ truly is the global minimum.
Is that correct? Thanks in advance!
It can't be $x_v$ because $v$ is an index and there are multiple of them.
$$f(x) = \sum_{v=1}^k m_v\|x-x_v\|^2$$
Let's differentiate it,
$$\nabla f(x) = 2 \sum_{v=1}^k m_v(x-x_v) = 0$$
$$x\sum_{v=1}^k m_v = \sum_{v=1}^k m_vx_v$$
$$x = \frac{\sum_{v=1}^k m_vx_v}{\sum_{v=1}^k m_v}$$
The optimal solution is the weighted average.