Let $x_0\in H$. $H$ is an Hilbert space, $M$ is a closed subspace of $H$. In my lecture notes about functional analysis, there is the following identity
$\min\{\|y-x_0\|: y\in M\}=\max\{|\langle x_0,y\rangle|:y\in M^\perp, \|y\|=1\}$
I am not able to prove it, maybe you could help me.