Characterization Projection operator as distance minimizer Let $H$ be a Hilbert space and $V$ be a subspace of $H$.
How can I prove that for a map $P \colon H \rightarrow V$ the following are equivalent:


*

*$P^2=P$ and $P$ is linear

*$P(x) = \operatorname{argmin}_{y \in V} \langle x-y,x-y \rangle^2.$

 A: Even with the correction I gave in the comment, this just isn't true:
Consider $H = \Bbb R^2, V = \{(r, 0) \mid x \in \Bbb R\}$. Let $P(r,s) = (r - s,0)$. Then $P$ is linear, $P^2 = P$, and $P(H) = V$, but if $x = (2,1)$, $$P(x) = (1,0)$$ while $$\operatorname{argmin}_{y\in V}\langle y - x, y - x \rangle^2 = (2,0)$$ and $$\operatorname{argmin}_{y\in V}\langle y, x \rangle^2 = (0,0)$$
You need stronger conditions on $P$ for this to hold.
Added:
In addition to requiring that $\ker P \perp V$ is added to condition (1), it is also necessary to require that $V$ be closed. Otherwise the argmin in (2) will be empty for certain values of $x$ and thus cannot be equal to $P(x)$. The statement should be:

Let $H$ be a Hilbert space and $V$ a closed subspace of $H$. If $P\ :\ H \to V$, then the following two conditions are equivalent:
  
  
*
  
*$P$ is linear, $P^2 = P$, and $\ker P \perp V$.
  
*For all $x \in H, P(x) = \operatorname{argmin}_{y \in V} \|y - x\|$.
  

I will assume that $H$ is a real Hilbert space. The same result is true for complex Hilbert spaces, but some adjustments are needed in the proof.
Proof:
Since squaring is a strictly increasing function on non-negatives, $$\operatorname{argmin}_{y \in V} \|y - x\| = \operatorname{argmin}_{y \in V} \|y - x\|^2.$$
I will switch between using the two forms freely. Note also that $\|y - x\|^2 = \|y\|^2 + \|x\|^2 - 2\langle y, x \rangle$.
(1) $\implies$ (2):
Let $x \in H, v = P(x) \in V$ and $u = x - v$. Now $P(u) = P(x - v) = P(x) - P^2(x) = 0$, so $u \in \ker P$ and thus $u \perp V$. Hence for $y \in V$,
$$\begin{align}\|y - x\|^2 &= \langle y - v - u, y - v - u \rangle\\
&= \|y - v\|^2 + \|u\|^2 - 2\langle y -v, u\rangle\\
&= \|y - v\|^2 + \|u\|^2.\end{align}$$
Thus $\|y - x\|^2$ is minimized when $y = v = P(x)$. That is,
$$P(x) = \operatorname{argmin}_{y\in V} \|y - x\|^2$$
(2) $\implies$ (1):
$P(x) = \operatorname{argmin}_{y\in V} \|y - x\|^2$. If $x \perp V$, then for all $ 0 \ne y \in V$, 
$$\|y - x\|^2 = \|y\|^2 + \|x\|^2 > \| 0 - x\|^2$$
Therefore $P(x) = 0$. In particular, since $0 \perp V, P(0) = 0$. Conversely, for any $x$ with $P(x) = 0$, any $y \in V$ with $\|y\| = 1$, and any $a \ne 0$, we know that $$\|ay - x\|^2 > \|0 - x\|^2$$
$$a^2 - 2\langle ay, x\rangle + \|x\|^2 > \|x\|^2$$
$$\frac {a^2} 2 > a\langle y, x\rangle.$$
Since this holds for all $a \ne 0$, it must be that $\langle y, x\rangle = 0$. For general nonzero $y \in V$, 
$$\langle y, x\rangle = \|y\|\left\langle \frac y {\|y\|}, x\right\rangle = \|y\|0 = 0.$$ Therefore $\ker P = V^\perp$.
If $y, v \in V$, then $\|y - (x + v)\| = \|(y - v) - x\|$. Hence $y = P(x + v)$ if and only if $y - v = P(x)$. I.e., for $v \in V$, $P(x + v) = P(x) + v$. 
Three consequences:


*

*For $y \in V, P(y) = P(0 + y) = P(0) + y = 0 + y = y$.

*Since for all $x \in H, P(x) \in V$, we have $P(P(x)) = P(x)$. That is, $P^2 = P$.

*For $x \in H, P(x) \in V$, so $P(x - P(x)) = P(x) - P(x) = 0$. Therefore $x - P(x) \in V^\perp$. 


Define $x^\perp := x - P(x)$, so $x = x^\perp + P(x)$.
Now for $u \in H$, $$\begin{align}P(x + u) &= P(x^\perp +P(x) + u^\perp + P(u))\\ &= P(x^\perp + u^\perp) + P(x) + P(u)\end{align}$$ since $P(x) + P(u) \in V$. But $x^\perp$ and $u^\perp \in V^\perp$, and since $V^\perp$ is a closed under addition, $x^\perp + u^\perp \in V^\perp$. So $P(x^\perp + u^\perp) = 0$ and $$P(x + u) = P(x) + P(u).$$
Lastly, if $ a\in \Bbb R, a\ne 0, \|y - ax\| = |a|\left\|\frac y a - x\right\|$ Thus $y = P(ax)$ if and only if $\frac y a = P(x)$. Therefore $P(ax) = aP(x)$. Also, $P(0x) = P(0) = 0 = 0x$, so $P$ is linear. 
