Linear Algebra and Its Applications, Exercise 3.3.7

Exercise 3.3.7. Given the two vectors a_1 = (1, 0, 1) and a_2 = (1, 1, -1) find the projection matrix P that projects onto the subspace spanned by a_1 and a_2.

Answer: The subspace spanned by a_1 and a_2 is the column space \mathcal{R}(A) where

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

The projection matrix onto the subspace is then P = A(A^TA)^{-1}A^T. We have

A^TA = \begin{bmatrix} 1&0&1 \\ 1&1&-1 \end{bmatrix} \begin{bmatrix} 1&1 \\ 0&1 \\ 1&-1 \end{bmatrix} = \begin{bmatrix} 2&0 \\ 0&3 \end{bmatrix}

Since A^TA is a diagonal matrix we can compute its inverse by simply taking the reciprocals of the diagonal entries:

(A^TA)^{-1} = \begin{bmatrix} \frac{1}{2}&0 \\ 0&\frac{1}{3} \end{bmatrix}

We then have

P = A(A^TA)^{-1}A^T = \begin{bmatrix} 1&1 \\ 0&1 \\ 1&-1 \end{bmatrix} \begin{bmatrix} \frac{1}{2}&0 \\ 0&\frac{1}{3} \end{bmatrix} \begin{bmatrix} 1&0&1 \\ 1&1&-1 \end{bmatrix}

= \begin{bmatrix} \frac{1}{2}&\frac{1}{3} \\ 0&\frac{1}{3} \\ \frac{1}{2}&-\frac{1}{3} \end{bmatrix} \begin{bmatrix} 1&0&1 \\ 1&1&-1 \end{bmatrix} = \begin{bmatrix} \frac{5}{6}&\frac{1}{3}&\frac{1}{6} \\ \frac{1}{3}&\frac{1}{3}&-\frac{1}{3} \\ \frac{1}{6}&-\frac{1}{3}&\frac{5}{6} \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, Fourth 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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s