Let $P$ be the orthogonal projection onto a subspace $E \subset V$ ($V$ being an inner product space) with $\mathrm{dim(V)}=n$, $\mathrm{dim(E)}=r$. Obtain the eigenvalues and eigenspaces, along with their algebraic/geometric multiplicities.
I tried to first let $B = (b_{1}, ..., b_{r})$ be an orthonormal basis of $E$. By the projection formula, we will have (let $T$ be the projection mapping):
$T(v) = \displaystyle\sum_{i=1}^{r} (v,v_{i})v_{i}$
Then I tried finding the transformation matrix $T$ such that $T(v) = Tv$ (say in the standard basis), but I haven't had any luck finding the transformation matrix (which would then allow us to compute the respective eigenvalues and eigenspaces). I was thinking of perhaps choosing the respective basis to $B$ and then completing it to a basis of $V$ (say Steinitz' Lemma), but I'm not sure if this is the way to proceed.
What would be the way to approach this exercise?



Notice that $Pv=v$ if $v \in E$.
Also notice that $Pv=0$ if $v \in E^{\perp}$, i.e, if $v$ is orthogonal to every vector in $E$.
Then notice that $V=E \oplus E^{\perp}$ (in the informal sense), and use this to show that the only eigenvalues are $0$ and $1$, and the respective eigenspaces are $E^{\perp}$ and $E$.