## Linear Algebra and Its Applications, Exercise 1.6.6

Exercise 1.6.6. Invert the following matrices using the Gauss-Jordan method: $A_1 = \begin{bmatrix} 1&0&0 \\ 1&1&1 \\ 0&0&1 \end{bmatrix} \quad A_2 = \begin{bmatrix} 2&-1&0 \\ -1&2&-1 \\ 0&-1&2 \end{bmatrix} \quad A_3 = \begin{bmatrix} 0&0&1 \\ 0&1&1 \\ 1&1&1 \end{bmatrix}$

Answer: For the first matrix Gauss-Jordan elimination proceeds as follows: We first subtract 1 times the first row from the second row: $\begin{bmatrix} 1&0&0&1&0&0 \\ 1&1&1&0&1&0 \\ 0&0&1&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&1&0&0 \\ 0&1&1&-1&1&0 \\ 0&0&1&0&0&1 \end{bmatrix}$

This completes the process of forward elimination. We then start reverse elimination by subtracting 1 times the third row from the second row: $\begin{bmatrix} 1&0&0&1&0&0 \\ 0&1&1&-1&1&0 \\ 0&0&1&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&1&0&0 \\ 1&1&0&-1&1&-1 \\ 0&0&1&0&0&1 \end{bmatrix}$

This completes reverse elimination. Since the left matrix is now the identity matrix we are done, and we have $A_1^{-1} = \begin{bmatrix} 1&0&0 \\ -1&1&-1 \\ 0&0&1 \end{bmatrix}$

For the second matrix we begin forward elimination by subtracting -1/2 times the first row from the second row: $\begin{bmatrix} 2&-1&0&1&0&0 \\ -1&2&-1&0&1&0 \\ 0&-1&2&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&-1&0&1&0&0 \\ 0&\frac{3}{2}&-1&\frac{1}{2}&1&0 \\ 0&-1&2&0&0&1 \end{bmatrix}$

and then multiply -2/3 by the second row and subtract it from the third: $\begin{bmatrix} 2&-1&0&1&0&0 \\ 0&\frac{3}{2}&-1&\frac{1}{2}&1&0 \\ 0&-1&2&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&-1&0&1&0&0 \\ 0&\frac{3}{2}&-1&\frac{1}{2}&1&0 \\ 0&0&\frac{4}{3}&\frac{1}{3}&\frac{2}{3}&1 \end{bmatrix}$

This completes forward elimination, so we begin reverse elimination by multiplying -3/4 by the third row and subtracting it from the second: $\begin{bmatrix} 2&-1&0&1&0&0 \\ 0&\frac{3}{2}&-1&\frac{1}{2}&1&0 \\ 0&0&\frac{4}{3}&\frac{1}{3}&\frac{2}{3}&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&-1&0&1&0&0 \\ 0&\frac{3}{2}&0&\frac{3}{4}&\frac{3}{2}&\frac{3}{4} \\ 0&0&\frac{4}{3}&\frac{1}{3}&\frac{2}{3}&1 \end{bmatrix}$

We continue by multiplying the second row by -2/3 and subtracting it from the first row: $\begin{bmatrix} 2&-1&0&1&0&0 \\ 0&\frac{3}{2}&0&\frac{3}{4}&\frac{3}{2}&\frac{3}{4} \\ 0&0&\frac{4}{3}&\frac{1}{3}&\frac{2}{3}&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&0&0&\frac{3}{2}&1&\frac{1}{2} \\ 0&\frac{3}{2}&0&\frac{3}{4}&\frac{3}{2}&\frac{3}{4} \\ 0&0&\frac{4}{3}&\frac{1}{3}&\frac{2}{3}&1 \end{bmatrix}$

In the final step we multiply the first row by 1/2, the second row by 2/3, and the third row by 3/4: $\begin{bmatrix} 2&0&0&\frac{3}{2}&1&\frac{1}{2} \\ 0&\frac{3}{2}&0&\frac{3}{4}&\frac{3}{2}&\frac{3}{4} \\ 0&0&\frac{4}{3}&\frac{1}{3}&\frac{2}{3}&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\frac{3}{4}&\frac{1}{2}&\frac{1}{4} \\ 0&1&0&\frac{1}{2}&1&\frac{1}{2} \\ 0&0&1&\frac{1}{4}&\frac{1}{2}&\frac{3}{4} \end{bmatrix}$

to obtain $A_2^{-1} = \begin{bmatrix} \frac{3}{4}&\frac{1}{2}&\frac{1}{4} \\ \frac{1}{2}&1&\frac{1}{2} \\ \frac{1}{4}&\frac{1}{2}&\frac{3}{4} \end{bmatrix}$

For the third matrix we must first do a row exchange to get a nonzero pivot in the first row. We exchange the first row with the third: $\begin{bmatrix} 0&0&1&1&0&0 \\ 0&1&1&0&1&0 \\ 1&1&1&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&1&1&0&0&1 \\ 0&1&1&0&1&0 \\ 0&0&1&1&0&0\end{bmatrix}$

This completes forward elimination, so we begin reverse elimination by subtracting 1 times the third row from the second row and 1 times the third row from the first row: $\begin{bmatrix} 1&1&1&0&0&1 \\ 0&1&1&0&1&0 \\ 0&0&1&1&0&0\end{bmatrix} \rightarrow \begin{bmatrix} 1&1&0&-1&0&1 \\ 0&1&0&-1&1&0 \\ 0&0&1&1&0&0\end{bmatrix}$

Finally we subtract 1 times the second row from the first row: $\begin{bmatrix} 1&1&0&-1&0&1 \\ 0&1&0&-1&1&0 \\ 0&0&1&1&0&0\end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&0&-1&1 \\ 0&1&0&-1&1&0 \\ 0&0&1&1&0&0\end{bmatrix}$

This completes elimination and we have $A_3^{-1} = \begin{bmatrix} 0&-1&1 \\ -1&1&0 \\ 1&0&0\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. Bookmark the permalink.