[Math] Find the matrix $A$ of the orthogonal projection onto the line spanned by the vector $v$

linear algebramatrices

Let $V$ be the plane with equation $x_1 + 4x_2 + 2x_3 = 0$ in $\mathbb{R}^3$.

Find the matrix $A$ of the orthogonal projection onto the line spanned by the vector $v = \begin{bmatrix} -12 \\ 4 \\ -2 \end{bmatrix}$ with respect to the basis $\left\{ \begin{bmatrix} -4 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} -2 \\ 0 \\ 1 \end{bmatrix} \right\}$.

I was told that nothing needs to be converted until the end. No change of basis, nothing, until the end, at which point I am supposed to have a 3×2 matrix.

I was thinking I need to use $P = X (X^T X)^{-1} X^T$ equation to get the projection matrix, but everything I have tried has failed. I never once got a 3×2 matrix. The closest I got to a 3×2 matrix was a 3×1 matrix, when I just multiplied $PY$. Isn't $B = Y$ and $v = Y$?

Best Answer

I'm assuming the projection is from $V$ to $V$, so that we can enter in a $2 \times 2$ matrix.

First, write out the formula for orthogonal projection: $$\mathrm{proj}_v(x) = \frac{v \cdot x}{v \cdot v} v$$ Next, transform the basis vectors: $$\mathrm{proj}_v(-4, 1, 0) = \frac{(-12, 4, -2) \cdot (-4, 1, 0)}{(-12, 4, -2) \cdot (-12, 4, -2)} (-12, 4, -2) = \frac{13}{41} (-12, 4, -2)$$ You can do the other one. Then, write these transformed basis vectors as coordinates of the basis. We can compute the coordinates of the first transformed vector by row-reducing the augmented matrix (the third column is augmented): $$\left(\begin{matrix}-4 & -2 & -\frac{156}{41} \\ 1 & 0 & \frac{52}{41} \\ 0 & 1 & -\frac{26}{41} \end{matrix}\right).$$ This row reduces to: $$\left(\begin{matrix}1 & 0 & \frac{52}{41} \\ 0 & 1 & -\frac{26}{41} \\ 0 & 0 & 0 \end{matrix}\right).$$ Thus, we have: $$\mathrm{proj}_v(-4, 1, 0) = \frac{13}{41} (-12, 4, -2) = \frac{52}{41}(-4, 1, 0) - \frac{26}{41}(-2, 0, 1).$$ Therefore, the first column vector of the matrix is: $$\left(\begin{matrix}\frac{52}{41} \\ \frac{-26}{41}\end{matrix}\right).$$ Now do the same for the other vector, and you are done!