Suppose $M$ is a closed subspace of a Hilbert space $X$. Let $x\in X$. Prove that $min\{\|x-y\|:y\in M\}=max\{|\langle x,y\rangle|:y\in M^\perp , \|y\|=1\}$
My Try:
First of all I am confused how one can mention max instead of sup (min case was figured out already). I really appreciate If somebody can explain it.
Secondly, If we forget it, I can consider $2$ cases.
Case I: $x\in M$. Then both are $0$ and hence the result.
Case II: $x\notin M$. this is the case where I am stuck.
By Hahn Banach theorem there is a bounded linear functional $L$ on $X$ such that $L(m)=0$ for all $m\in M$, $L(x)=1$ and $\|L\|=\frac{1}{A}$ where $A=min\{\|x-y\||y\in M\}$.
By another theorem we have there is a unique $y_1\in X$ such that $Lx_1=\langle x_1,y_1\rangle $ for all $x_1\in X$ and $\|L\|=\|y_1\|$. Hence, $Lm=\langle m,y_1\rangle=0$. So, $y_1\in M^\perp$.
Now how can I proceed? can somebody please help me?
Call $Px$ the orthogonal projection of $x$ onto $M$, then it's easy to see that $\| x-Px\|= \inf_{y\in M}\| x-y\|$. On the other hand we have that $\max_{y\in M^\perp, \| y\|=1} |\langle x,y\rangle|$ is just the norm of the linear functional $l(y)=\langle x,y\rangle $ when viewed as $l\colon M^\perp \to \mathbb{C}$. Since $Px \perp M^\perp$ we have that $$ \langle x,y \rangle = \langle x-Px, y\rangle \leq \| x-Px\| \|y\|,\qquad y\in M^\perp, $$ so that $\| l\| \leq \| x-Px\|$. On the other hand, since $x-Px\in M^\perp$ we get that $\| l\| =\|x-Px\|$ and this is what you want.
Edit: A more streamlined approach. $$ \langle x,y \rangle =\langle x-Px, y\rangle, \qquad y\in M^\perp. $$ By Cauchy-Schwarz this last is bounded above by $\| x-Px\| $ whenever $\| y\|=1$ and attains equality in $x-Px$. Therefore this $\sup$ is attained and it equals the $\min$.