# Finding an orthogonal projection matrix onto the plane

Find the orthogonal projection matrix onto the plane $$x + y - z = 0$$

The solution to this video recitation video on MIT open courseware immediately states that we can chose

$$a_1 = \begin{pmatrix} 1\\ -1\\ 0 \end{pmatrix} \ \ \ \ \ \ \ \ \text{and} \ \ \ \ \ \ \ a_2 = \begin{pmatrix} 1\\ 0\\ 1 \end{pmatrix}$$ So then $$A = \begin{pmatrix} 1 & 1\\ -1 & 0 \\ 0 & 1 \end{pmatrix}$$ and we simply apply the equation $P = A(A^{T}A)^{-1}A^{T}$. The lecturer did not explain how he can choose such an $a_1$ and $a_2$. Can anyone explain that?

• I hope the lecture then goes on to show an easier way to compute this projection matrix by using the normal to the plane.
– amd
Jan 9 '18 at 21:33
• @amd how would you go about doing this? Oct 13 '21 at 2:23

The lecturer simply chose two vectors $a_{1}$ and $a_{2}$ that are independent and contained in the plane $x+y-z=0$. He then applied the formula that you mentioned.
Well, you can choose any values al long as they satisfy the given equation. For example, $$x=0,y=1,z=1 \rightarrow a_3 = \begin{pmatrix}0\\1\\1\end{pmatrix}$$
However, you should be careful to choose independent vectors. For instance, $$x=0,y=2,z=2 \rightarrow a_4 = \begin{pmatrix}0\\2\\2\end{pmatrix}$$
Here, $a_4$ and $a_3$ are not independent.
You know three points in the plane: $O=(0,0,0), a_1,$ and $a_2$.
So you know that the vectors $\overrightarrow{u} = \overrightarrow{0a_1} = a_1 - 0 = a_1$ and $\overrightarrow{v} = \overrightarrow{0a_2} = a_2 - 0 = a_2$ both lie in the plane.