Let \(\mathcal H\) be a Hilbert space and \(P:\mathcal H\to \mathcal H\) a self-adjoint operator, i.e. \(\langle Px,y\rangle =\langle x,Py\rangle \) for all \(x,y\in \mathcal H\). Also assume that \(P^2=P\). Prove that \(P\) is orthogonal projection to a closed subspace. Note that we are not assuming that \(P\) is bounded.