Suppose we have $P:H\to H$, where $H$ is a hilbert space and $P$ is bounded and linear. Assume that it satisfies $P^2=P$ and $P^*=P$ where $P^*$ is the adjoint. Show that $||P||\leq 1$, that Ran($P$) is a closed subspace $L$ on which $P$ as as the identity, that $\ker(P) = L^{\perp}$. In other words, show that $P$ is the orthogonal projection onto its range.
In order to prove this, I think we need to use the fact that the distance of a point from a closed convex set is attained. But, I am not sure where to begin. Any hints would be helpful.
You have $$ \|P\|^2=\|P^*P\|=\|P\|. $$ So, if $P\ne0$, then $\|P\|=1$.
For any $x\in L$, $x=Py$ for some $y$. Then $Px=P^2y=Py=x$. So $P$ acts as the identity on $L$.
Let $\{x_n\}$ be a Cauchy sequence in $L$. Then, as $H$ is complete, $x_n\to x$ for some $x\in H$. We have $Px_n=x_n$, and so $$ \|x-Px\|=\lim_n\|x_n-Px_n\|=0, $$ thus $x=Px$, so $x\in L$. We have shown that $L$ is closed.
If $y\in L^\perp$, then for any $x\in H$, $$ 0=\langle Px,y\rangle=\langle x,P^*y\rangle=\langle x,Py\rangle. $$ Taking $x=Py$ we deduce that $Py=0$, that is $y\in \ker P$. The same computation shows the converse, that if $y\in\ker P$, then $y\in L^\perp$. So $L^\perp=\ker P$.