[Math] Ways to find the orthogonal projection matrix

linear algebraprojection-matrices

I'm a bit lost trying to find the projection matrix for an orthogonal projection onto a plane defined by the normal vector $n = (1, 1, 1)^T$. Then I can find the basis C of the plain $C = ( (-1,0,1)^T (0,-1,1)^T)$.

Now i should be able to find the projection Matrix with $A(A^TA)^{-1}A^T$
Where $A:=\begin{bmatrix}
-1 & 0\\
0 & -1\\
1 & 1\end{bmatrix}$. Then my the projection matrix will look like this?
$A:=\begin{bmatrix}
2/3 & -1/3 & -1/3\\
-1/3 & 2/3 & -1/3\\
-1/3 & -1/3 & 2/3\end{bmatrix}$ Is this correct?

To which basis is this projection matrix? How can I change the matrix to a different basis?

There should be another way to find the matrix. Something like add to my basis $C$ a vector from my basis $B$ (which should not be the standard basis) in $\mathbb{R^3}$, find the projection of the basis ( I only need to do this for the added basis vector from $B$ since the rest is already on the plane).

But how can I find the projection of the added basis vector?

After that what would be the matrix from basis B to B? The coefficients of the linear combinations $c_1,c_2,P(b_i)$ in B?

Best Answer

You can easily check for A considering the product by the basis vector of the plane, since $\forall v$ in the plane must be:

$$Av=v$$

Whereas for the normal vector:

$$An=0$$

Note that with respect to the basis $\mathcal{B}:{c_1,c_2,n}$ the projection matrix is simply:

$$P_{\mathcal{B}}=\begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0\end{bmatrix}$$

If you need the projection matrix with respect to another basis you simply have to apply a change of basis to obtain the new matrix.

For example with respect to the canonical basis, lets consider the matrix M which have vectors of the basis $\mathcal{B}:{c_1,c_2,n}$ as colums:

$$M=\begin{bmatrix} -1 & 0 & 1\\ 0 & -1 & 1\\ 1 & 1 & 1\end{bmatrix}$$

If w is a vector in the basis $\mathcal{B}$ its expression in the canonical basis is $v$ give by:

$$v=Mw\implies w=M^{-1}v$$

Thus if the projection $w_p$ of w in the basis $\mathcal{B}$ is given by:

$$w_p=P_{\mathcal{B}}w$$

The projection in the canonical basis is given by:

$$M^{-1}v_p=P_{\mathcal{B}}M^{-1}v\implies v_p=MP_{\mathcal{B}}M^{-1}v $$

Thus the matrix:

$$A=MP_{\mathcal{B}}M^{-1}=$$

$$=\begin{bmatrix} -1 & 0 & 1\\ 0 & -1 & 1\\ 1 & 1 & 1\end{bmatrix}\begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0\end{bmatrix}\begin{bmatrix} -1 & \frac13 & \frac13\\ \frac13 & -1 & \frac13\\ \frac13 & \frac13 & \frac13\end{bmatrix}=\begin{bmatrix} 2/3 & -1/3 & -1/3\\ -1/3 & 2/3 & -1/3\\ -1/3 & -1/3 & 2/3\end{bmatrix}$$

represent the projection matrix in the plane with respect to the canonical basis.

Suppose now we want find the projection matrix from the base $\mathcal{B}$ to the canonical $\mathcal{C}$.

Let's consider the projection $w_p$ of w in the basis $\mathcal{B}$ is given by:

$$w_p=P_{\mathcal{B}}w$$

thus:

$$M^{-1}v_p=P_{\mathcal{B}}w\implies v_p=MP_{\mathcal{B}}w$$

Thus the matrix:

$$C=MP_{\mathcal{B}}=$$

$$=\begin{bmatrix} -1 & 0 & 1\\ 0 & -1 & 1\\ 1 & 1 & 1\end{bmatrix}\begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0\end{bmatrix}=\begin{bmatrix} -1 & 0 & 0\\ 0 & -1 & 0\\ 1 & 1 & 0\end{bmatrix}$$

represent the projection matrix from the base $\mathcal{B}$ to the canonical $\mathcal{C}$.