Let $M$ be a closed subspace of a Hilbert space $H$. Let $P$ be the orthogonal projection on $M$. I was told to find the eigenvalues and eigenvectors of $P$ and moreover say when it is compact.
Since $M$ is closed we have $H\cong M\oplus M^\perp$ and this is an eigenspace decomposition so $P$ has eigenvalues $1,0$ and eigenvectors the elements of $M,M^\perp$ respectively. Is there any formal explanation I emphasize in the infinite dimensional case?
If $M$ is finite dimensional $P$ is finite rank so compact. I don't see anything but that...