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..
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?