I am learning the matrix of linear transformation but have trouble understanding it when reading the notes. The part I am stuck at is as follows:
To see how important the choice of basis is, let's use the standard basis for the linear transformation that projects the plane onto a line at a $45^\circ$ angle. If we choose $\boldsymbol{\mathrm v_1} = \boldsymbol{\mathrm w_1} = \begin{bmatrix}1 \\ 0\end{bmatrix}$ and $\boldsymbol{\mathrm v_2} = \boldsymbol{\mathrm w_2} = \begin{bmatrix}0 \\ 1\end{bmatrix}$, we get the projection matrix $P = \dfrac{\boldsymbol{\mathrm{aa}}^T}{\boldsymbol{\mathrm a}^T\boldsymbol{\mathrm a}} = \begin{bmatrix} 1/2 & 1/2 \\ 1/2 & 1/2 \end{bmatrix}$. We can check by graphing that this is the correct matrix, but calculating $P$ directly is more difficult for this basis than it was with a basis of eigenvectors.
My question is:
How to get the projection matrix $P$?