I do not know how to start with the following exercise:
Let $x_1,x_2,\ldots,x_m \in \mathbb{R}^n$ be arbitrary and $a_1,a_2,\ldots,a_m$ strictly positive real numbers. Solve the following problem:
$$\min_{x \in \mathbb{R}^n} \sum_{k=1}^{m} a_k \|x-x_k\|^2$$
I think that this problem corresponds to finding the point hat is geometricallly "closest" to the $x_k$ (under weighted distances) but I do not know how to go further from here.
Could you help me?
Given
$$ f(x) = \sum_{k=1}^{m} a_k \|x-x_k\|^2 $$
the stationary point is determined by solving
$$ f'(x)=0 $$
or
$$ \sum_{k=1}^m a_k (x-x_k) = 0\Rightarrow x\sum_{k=1}^m a_k = \sum_{k=1}^m a_k x_k $$
and then
$$ x = \frac{\sum_{k=1}^m a_k x_k}{\sum_{k=1}^m a_k} $$