Please can someone explain why this is? I think I understand projection when it is a comparison of two vectors but below has 3.
Im revising and I am so slow.
The projection of the vector $$\begin{pmatrix} 3\\\ -2\\\ -1\end{pmatrix}$$ onto the plane spanned by the vectors
$$\begin{pmatrix}0\\\ -1\\\ 1\end{pmatrix}$$ and $$\begin{pmatrix}0\\\ 1\\\ 1\end{pmatrix}$$
is $$\begin{pmatrix}0\\\ -2\\\ 1\end{pmatrix}$$
There are two standard approaches here.
Option 1: We can use an orthonormal basis and add together the separate projections. Note that the vectors $v_1 = (0,-1,1)$ and $v_2 = (0,1,1)$ are already orthogonal; to make them "normal" (length 1), we need only divide each vector by its length. So, we get the orthonormal basis $u_1 = \frac1{\sqrt{2}}(0,-1,1),u_2 = \frac 1{\sqrt{2}}(0,1,1)$. The projection of the vector $v = (3,-2,1)$ is
$$ (v \cdot u_1)u_1 + (v \cdot u_2) u_2 = \\ \frac 3{\sqrt{2}} u_1 + \frac {-1}{\sqrt{2}}u_2 = \\ (0,-\frac 32,\frac 32) + (0,-\frac 12 ,-\frac 12) =\\ (0,-2,1). $$
Option 2: If $A$ is the matrix with columns $v_1,v_2$, then the desired projection can be calculated as $[A(A^TA)^{-1}A^T]v$.