I can't understand this fact about orthogonal projections.
Considering the projection endomorphism $p_W:V\rightarrow V$ which is the projection endomorphism on a vector subspace $W\subset V$.
If an orthonormal basis $\mathscr{B}$ of $W$ is considered, the matrix of the endomorphism with respect to the standard basis $\mathscr{C}$ in $V$ is $AA^{T}$ where $A$ has on the columns the vectors of $\mathscr{B}$.
Is this right?
If so then I can't understand how can that be possible since the basis is orthonormal and $A$ must be an orthogonal matrix and therefore, for definition, $AA^{T}=I$. Is the matrix always $I$?
Am I missing something?
Thanks for your help