Prove $f(y)=\inf \{||y-x||:x \in S\}$ is convex

183 Views Asked by At

Let $S$ be a nonempty convex set in $\mathbb{R^n}$ and $f:\mathbb{R^n} \rightarrow \mathbb{R}$ be defined as follows:

$f(y)=\inf \{||y-x||:x \in S\}$.Prove that $f$ is convex.