[Math] Finding the projection matrix of $\mathbb R^3$ onto the plane $x-y-z=0$

linear algebraprojection-matrices

Find the matrix of the projection of $\mathbb{R}^3$ onto the plane $x-y-z = 0.$

I can find a normal unit vector of the plane, which is $\vec{n}=(\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}})^T$

And then the vectors $\vec{u}=(1,1,0)^T, \ \vec{v} = (1,0,1)^T$ form a basis of $\mathbb{R}^3$. but why would the solution be $$A = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}?$$

Best Answer

Assuming you mean the orthogonal projection onto the plane $W$ given by the equation $x-y-z$, it is equal to the identity minus the orthogonal projection onto $W^\perp$, which is sightly easier to compute. Now $W^\perp$ is the span of the normal vector $v=(1,-1,-1)$, and the orthogonal projection onto which is $x\mapsto \frac{(v\mid x)}{(v\mid v)}v$, and whose matrix is $$ \frac13\begin{pmatrix}1\\-1\\-1\end{pmatrix} \begin{pmatrix}1&-1&-1\end{pmatrix} =\frac13\begin{pmatrix}1&-1&-1\\-1&1&1\\-1&1&1\end{pmatrix}. $$ Subtracting this from the identity gives $$ \begin{pmatrix}2/3&1/3&1/3\\1/3&2/3&-1/3\\1/3&-1/3&2/3\end{pmatrix}. $$