# Equality in hilbert space

Be $H$ a Hilbert space,$x_{0} \in H$ and $M \subset H$ a closed space. Show that

$\displaystyle\inf_{x\in M} \{ \lVert x-x_0\rVert\} =\sup\{ \lvert\langle x_{0},y\rangle\rvert \;:\; y\in M^{\perp},\lVert y\rVert=1 \}$,

where $\lVert\cdot\rVert$ is the norm of the inner product,

I try use the minimum vector (the problem follow the conditions) in the left of the equality, but I can't work in the right side, any help is appreciated.

-

The point is that both numbers equal to the length of the projection of $x_0$ onto $M^\perp$.
If you can use that $M+M^\perp=H$, then you can write $x_0=x_1+x_2$, with $x_1\in M$, $x_2\in M^\perp$. Then, for any $x\in M$, $$x-x_0=(x-x_1)-x_2,$$ with $x-x_1\in M$. So $$\inf\{\|x-x_0\|:\ x\in M\}=\inf\{\|x-x_2\|:\ x\in M\}\leq\|x_2\|.$$ Also, for $x\in M$ $$\|x-x_2\|^2=\|x\|^2+\|x_2\|^2\geq\|x_2\|^2.$$ So $$\inf\{\|x-x_0\|:\ x\in M\}=\|x_2\|.$$
On the other hand, for $y\in M^\perp$ with $\|y\|=1$, $$\tag{1} \langle x_0,y\rangle=\langle x_2,y\rangle\leq\|x_2\|\,\|y\|=\|x_2\|.$$ Also $x_2\in M^\perp$, so $$\tag{2} \sup\{|\langle x_0,y\rangle|:\ y\in M^\perp,\ \|y\|=1\}\geq \langle x_2,\frac{x_2}{\|x_2\|}\rangle=\|x_2\|.$$ Inequalities (1) and (2) together show that $$\sup\{|\langle x_0,y\rangle|:\ y\in M^\perp,\ \|y\|=1\}=\|x_2\|.$$