For $x_1,..,x_n \in \mathbb{R}$, what is the value of $\mu$ that minimizes $\sum_{i = 1}^{n}|x_i-\mu|$? What about $\sum_{i = 1}^{n} w_i |x_i-\mu|$ for $w_i \geq 0$?
I'm pretty sure in both cases the answer is the average of the $x_i$, and when you introduce the weights it's just the weighted average.
I'm not sure how to prove this though, and would appreciate any help.