The function minimizing distance between the convex set and a point is convex.

784 Views Asked by At

Show that the function $f(x) = \min_{y \in K} \|x-y\|^2$ for a convex set $K$ is a convex function.

I'm unsure how to approach this question. I understand that I need to use the fact that a function is convex if $\forall x,y$ and $\forall \lambda \in [0,1]$, $f(\lambda x + (1-\lambda) y) \leq \lambda f(x) + (1 - \lambda) f(y)$.