Linear Algebra and Its Applications, Exercise 3.4.13

Exercise 3.4.13. Given the vectors

a = \begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix} \quad b = \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} \quad c = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}

and the matrix A whose columns are a, b, and c, use Gram-Schmidt orthogonalization to factor A = QR.

Answer: We first choose a' = a. We then have

b' = b - \frac{(a')^Tb}{(a')^Ta'}a' = b - \frac{0 \cdot 0 + 0 \cdot 1 + 1 \cdot 1}{0 \cdot 0 + 0 \cdot 0 + 1 \cdot 1}a' = b - \frac{1}{1}a' = b - a'

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

We then have

c' = c - - \frac{(a')^Tc}{(a')^Ta'}a' - \frac{(b')^Tc}{(b')^Tb'}b' = c - \frac{0 \cdot 1 + 0 \cdot 1 + 1 \cdot 1}{0 \cdot 0 + 0 \cdot 0 + 1 \cdot 1}a' - \frac{0 \cdot 1 + 1 \cdot 1 + 0 \cdot 1}{0 \cdot 0 + 1 \cdot 1 + 0 \cdot 0}b'

= c - \frac{1}{1}a' - \frac{1}{1}b' = c - a' - b'

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

We have \|a'\| = \|b'\| = \|c'\| = 1, so q_1 = a', q_2 = b', and q_3 = c'. The matrix Q is then

Q = \begin{bmatrix} 0&0&1 \\ 0&1&0 \\ 1&0&0 \end{bmatrix}

The matrix R is then

R = \begin{bmatrix} q_1^Ta&q_1^Tb&q_1^Tc \\ 0&q_2^Tb&q_2^Tc \\ 0&0&q_3^Tc \end{bmatrix}

= \begin{bmatrix} (0 \cdot 0 + 0 \cdot 0 + 1 \cdot 1)&(0 \cdot 0 + 0 \cdot 1 + 1 \cdot 1)&(0 \cdot 1 + 0 \cdot 1 + 1 \cdot 1) \\ 0&(0 \cdot 0 + 1 \cdot 1 + 0 \cdot 1)&(0 \cdot 1 + 1 \cdot 1 + 0 \cdot 1) \\ 0&0&(0 \cdot 1 + 0 \cdot 1 + 1 \cdot 1) \end{bmatrix}

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

The product of the two matrices is then

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

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.

Leave a comment