3. (15%) Let $P$ be a projection matrix for a $k$-dimensional subspace $W$ of $\mathbb{R}^n$.

(a) Find all eigenvalues of $P$ and the dimension of each eigenspace.