Minimize $$f(k)$$ (Sum of squared deviations).
To find where $$f(k) = \sum_{i=1}^n (x_i - k)^2$$ is minimized, we differentiate it with respect to $$k$$ and set it to zero:
$$\frac{df}{dk} = \sum_{i=1}^n 2(x_i - k)(-1) = 0$$
$$-2 \left( \sum_{i=1}^n x_i - \sum_{i=1}^n k \right) = 0$$
$$\sum_{i=1}^n x_i - nk = 0 \implies k = \frac{\sum_{i=1}^n x_i}{n}$$
This is the exact formula for the Arithmetic Mean ($$\bar{x}$$). Therefore, $$\lambda = \text{mean}$$.
Minimize $$g(k)$$ (Sum of absolute deviations).
The function $$g(k) = \sum_{i=1}^n |x_i - k|$$ is not smoothly differentiable everywhere due to the absolute value bars, but we can analyze its derivative where it exists.
$$\frac{dg}{dk} = \sum_{i=1}^n -\text{sign}(x_i - k)$$
For this derivative to balance out to $$0$$, the number of positive terms must equal the number of negative terms. This means that exactly half of the observations must be smaller than $$k$$, and exactly half must be larger than $$k$$.
The value that splits a data set into two equal halves is the Median. Therefore, $$\mu = \text{median}$$.