## Linear Algebra and Its Applications, Exercise 3.3.17

Exercise 3.3.17. Find the projection matrix $P$ that projects vectors in $\mathbb{R}^2$ onto the line $x+y=0$.

Answer: The vector $(1, -1)$ is a basis for the subspace being projected onto, which is thus the column space of $A = \begin{bmatrix} 1 \\ -1 \end{bmatrix}$

Using the formula $P = A(A^TA)^{-1}AT$ we have $A^TA = \begin{bmatrix} 1&-1 \end{bmatrix} \begin{bmatrix} 1 \\ -1 \end{bmatrix} = 2$

so that $(A^TA)^{-1} = \frac{1}{2}$ and $P = A(A^TA)^{-1}AT = \begin{bmatrix} 1 \\ -1 \end{bmatrix} \cdot \frac{1}{2} \cdot \begin{bmatrix} 1&-1 \end{bmatrix}$ $= \begin{bmatrix} \frac{1}{2}&-\frac{1}{2} \\ -\frac{1}{2}&\frac{1}{2} \end{bmatrix}$

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition , Dr Strang’s introductory textbook Introduction to Linear Algebra, Fifth Edition and the accompanying free online course, and Dr Strang’s other books .

This entry was posted in linear algebra and tagged , . Bookmark the permalink.