Find the minimum distance that equal maximum inner product If $x_0 \in$ $H$ (Hilbert Space) and $M$ is a closed linear subspace of $H$, prove that
$$\min \{\|x - x_0\|: x \in M\} = \max \{\langle x_0, y\rangle : y \in M^\perp, \|y\| = 1\}.$$
I suppose $P$ and $Q$ are the orthogonal projections so that $x_0=Px_0+Qx_0$, clearly left side  is $Px_0$ now how to show right side (of the identity asked in question) is also $Px_0$.
I appreciate your help..
 A: For each point $x_0\in H$ there exists exactly one pair of members of $H$ which let us call $Px_0$ and $Qx_0$ such that $Px_0\in M$ and $Qx_0\in M^\perp$.  For each $x\in M$, consider
$$
x_0-x = (x_0-Px_0)+(Px_0-x).
$$
Show that the inner product of these two summands is $0$.  Then show that
$$
\|x_0-x\|^2 = \|x_0-Px_0\|^2+\|Px_0-x\|^2.
$$
As $x$ moves around within $M$, the second term on the right side above changes and the first does not, and the second term is $0$ iff $x=Px_0$.  Therefore the smallest that $\|x_0-x\|^2$ can be made the value of the first term on the right, and that is the square of the norm of $x_0-Px_0 = Qx_0\in M^\perp$.
It will now be enough to show that for every $y\in M^\perp$ with $\|y\|=1$, we have
$$
\langle y, x_0\rangle \le \left\langle \frac{Qx_0}{\|Qx_0\|},x_0\right\rangle
$$
with equality only when $y=Qx_0/\|Qx_0\|$.  We have
$$
\langle y,x_0\rangle = \langle y, Px_0+Qx_0\rangle = \langle y, Px_0\rangle+\langle y,Qx_0\rangle = 0 + \langle y,Qx_0\rangle.$$
So we want to show that
$$
\langle y,Qx_0\rangle \le \left\langle x_0, \frac{Qx_0}{\|Qx_0\|}\right\rangle
$$
with equality only when $y=Qx_0/\|Qx_0\|$.
Show that this statement is the same as saying that for $y\in M^\perp$ with $\|y\|=1$,
$$
\langle y, Qx_0\rangle \le \left\langle Qx_0,\frac{Qx_0}{\|Qx_0\|} \right\rangle
$$
with equality only when $y=Qx_0/\|Qx_0\|$.
All the vectors you see in the displayed line above are in the Hilbert space $M^\perp$.  So the problem now is to show that if $y_0$ is in some Hilbert space $y$ is some member of that Hilbert space with $\|y\|=1$, then
$$
\langle y,y_0\rangle \le \left\langle y_0,\frac{y_0}{\|y_0\|}\right\rangle
$$
with equality only when $y=y_0/\|y_0\|$.
Can you do the rest?
A: Because $M$ is closed, then $H=M\oplus M^{\perp}$. So there is a unique $m \in M$ such that $(x_{0}-m)\perp M$. Then, for any other $m\in m'$, $(x_{0}-m)\perp (m-m')$ and
$$
              \|x_{0}-m'\|^{2}=\|(x_{0}-m)+(m-m')\|^{2}=\|x_{0}-m\|^{2}+\|m-m'\|^{2} \ge \|x_{0}-m\|^{2}.
$$
Therefore, $\min_{x \in M}\|x_{0}-x\|=\|x_{0}-m\|$. Assume that $x_{0}\ne M$ so that $x_{0}-m$ may be normalized to a unit vector $\hat{y}=\|x_{0}-m\|^{-1}(x_{0}-m)$. Because $\hat{y}$ is orthogonal to $M$,
$$
        (x_{0},\hat{y})=(x_{0}-m,\hat{y})=\|x_{0}-m\|^{-1}(x_{0}-m,x_{0}-m)=\|x_{0}-m\|.
$$
On the other hand, if $\hat{y}'$ is a unit vector with $\hat{y}'\perp M$, then
$$
      |(x_{0},\hat{y}')|=|(x_{0}-m,\hat{y}')| \le \|x_{0}-m\|\|\hat{y}'\|=\|x_{0}-m\|,
$$
and $|(x_{0},\hat{y}')|=\|x_{0}-m\|$ iff $(x_{0}-m)$ and $\hat{y}'$ are linearly dependent (which gives $\hat{y}'=\alpha\hat{y}$ for some unimodular scalar $\alpha$.)
