I’ve been trying to solve this problem to no avail. I have proved already that the spectrum is a subset of $\{0,1\}$ just like for orthogonal projections. I’ve also proved $\lVert P \rVert = 1$. But I’m stuck at showing that $P^2 = P$. I’ve looking around on stack exchange and saw similar problems but with $P^3 = P^2$ and $P^4 = P^3$, but the same techniques do not immediately yield the same result (as far as I’ve tried).
Or is it false? I cannot immediately find a counterexample in the 2x2 matrix case, although I’ve looked for it for quite some time using wolframalpha.
Thanks in advance
I love the trick in daw's answer. Here is a more straightforward approach from someone like me with little imagination.
Since $\sigma(P)\subset\{0,1\}$, the operator $P^2-P$ has spectrum $\{0\}$. So what remains is to show that the only selfadjoint operator with spectrum $\{0\}$ is $0$. This can be shown in several ways: if $T=T^*$ and $\sigma(T)=\{0\}$,
we have $$ \|T\|=\operatorname{spr}(T)=0, $$ so $T=0$.
For a normal operator, the spectrum is the closed convex hull of the numerical range. So here we know that $\langle Tx,x\rangle=0$ for all $x$. This implies that $T=0$ by polarization.
Using the Spectral Theorem, we have that $$ T=\int_{\{0\}}\lambda\,dE_P(\lambda)=0\times E_P(\{0\})=0. $$
Using the Gelfand Transform, we know that $C^*(T)\simeq C(\{0\})$. Under this transform $T$ corresponding to the identity mapping $\iota(0)=0$, so $T=0$.