<s>[INST] Find the projection matrix that projects every vector of $\mathbb{R}^3$ on to the plane of 2 vectors The two vectors that are mentioned above are $$\begin{pmatrix}1 \\1 \\0\end{pmatrix}$$ $$\begin{pmatrix}0 \\ 1 \\1 \end{pmatrix}$$
I am not really sure what i am doing but i tried finding the projection matrix by putting the 2 vectors into a different matrix A =$$\begin{pmatrix}1 & 0 \\1 &1 \\0&1\end{pmatrix}$$ and then calclulating the projection matrix $$ P = A (A^TA)^{-1} A^T$$
.My result is that the P matrix is $$ 1/2\begin{pmatrix}1/2 & 1 & -1\\1&2&1\\-1 & 1 &2\end{pmatrix}$$
Is my answer correct? If not what am i doing wrong? Thanks in advance
 [/INST] You must have made a mistake, as can be seen by checking $P\begin{pmatrix}1\\1\\0\end{pmatrix}$.  
Using your approach, $ A =\begin{pmatrix}1 & 0 \\1 &1 \\0&1\end{pmatrix},$ $A^T=\begin{pmatrix}1 &1 &0 \\0 &1 &1 \end{pmatrix},$
$ A^TA=\begin{pmatrix}2&1\\1&2\end{pmatrix}$, $(A^TA)^{-1}=\dfrac13\begin{pmatrix}2 & -1 \\-1 & 2\end{pmatrix},$ $A(A^TA)^{-1}=\dfrac13\begin{pmatrix}2 &-1 \\ 1& 1 \\ -1 &2\end{pmatrix}$, and $P=A(A^TA)^{-1}A^T=\dfrac13\begin{pmatrix}2 &1 &-1\\1 &2 &1 \\-1 &1& 2\end{pmatrix}$.  Can you check that $P\begin{pmatrix}1\\1\\0\end{pmatrix}=\begin{pmatrix}1\\1\\0\end{pmatrix}?$
</s>