Linear Algebra and Its Applications, Review Exercise 1.10

Review exercise 1.10. Find the inverse of each of the following matrices, or show that the matrix is not invertible.

$A = \begin{bmatrix} 1&0&1 \\ 1&1&0 \\ 0&1&1 \end{bmatrix} \quad \rm and \quad A = \begin{bmatrix} 2&1&0 \\ 1&2&1 \\ 0&1&2 \end{bmatrix} \quad \rm and \quad A = \begin{bmatrix} 1&1&-2 \\ 1&-2&1 \\ 2&1&1 \end{bmatrix}$

Answer: We use Gauss-Jordan elimination on the first matrix $A$, starting by multiplying the first row by 1 and subtracting it from the second row:

$\begin{bmatrix} 1&0&1&\vline&1&0&0 \\ 1&1&0&\vline&0&1&0 \\ 0&1&1&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&1&\vline&1&0&0 \\ 0&1&-1&\vline&-1&1&0 \\ 0&1&1&\vline&0&0&1 \end{bmatrix}$

We then multiply the second row times 1 and subtract it from the third row:

$\begin{bmatrix} 1&0&1&\vline&1&0&0 \\ 0&1&-1&\vline&-1&1&0 \\ 0&1&1&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&1&\vline&1&0&0 \\ 0&1&-1&\vline&-1&1&0 \\ 0&0&2&\vline&1&-1&1 \end{bmatrix}$

This completes forward elimination. We start backward elimination by multiplying the third row by $-\frac{1}{2}$ and subtracting it from the second row, and multiplying the third row by $\frac{1}{2}$ and subtracting it from the first row:

$\begin{bmatrix} 1&0&1&\vline&1&0&0 \\ 0&1&-1&\vline&-1&1&0 \\ 0&0&2&\vline&1&-1&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&\frac{1}{2}&\frac{1}{2}&-\frac{1}{2} \\ 0&1&0&\vline&-\frac{1}{2}&\frac{1}{2}&\frac{1}{2} \\ 0&0&2&\vline&1&-1&1 \end{bmatrix}$

Finally we divide the third row by 2:

$\begin{bmatrix} 1&0&0&\vline&\frac{1}{2}&\frac{1}{2}&-\frac{1}{2} \\ 0&1&0&\vline&-\frac{1}{2}&\frac{1}{2}&\frac{1}{2} \\ 0&0&2&\vline&1&-1&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&\frac{1}{2}&\frac{1}{2}&-\frac{1}{2} \\ 0&1&0&\vline&-\frac{1}{2}&\frac{1}{2}&\frac{1}{2} \\ 0&0&1&\vline&\frac{1}{2}&-\frac{1}{2}&\frac{1}{2} \end{bmatrix}$

We then have

$A = \begin{bmatrix} 1&0&1 \\ 1&1&0 \\ 0&1&1 \end{bmatrix} \quad \rm and \quad A^{-1} = \begin{bmatrix} \frac{1}{2}&\frac{1}{2}&-\frac{1}{2} \\ -\frac{1}{2}&\frac{1}{2}&\frac{1}{2} \\ \frac{1}{2}&-\frac{1}{2}&\frac{1}{2} \end{bmatrix}$

We also use Gauss-Jordan elimination on the second matrix, starting by multiplying the first row by $\frac{1}{2}$ and subtracting it from the second row:

$\begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 1&2&1&\vline&0&1&0 \\ 0&1&2&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 0&\frac{3}{2}&1&\vline&-\frac{1}{2}&1&0 \\ 0&1&2&\vline&0&0&1 \end{bmatrix}$

We next multiply the second row by $\frac{2}{3}$ and subtract it from the third row:

$\begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 0&\frac{3}{2}&1&\vline&-\frac{1}{2}&1&0 \\ 0&1&2&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 0&\frac{3}{2}&1&\vline&-\frac{1}{2}&1&0 \\ 0&0&\frac{4}{3}&\vline&\frac{1}{3}&-\frac{2}{3}&1 \end{bmatrix}$

This completes forward elimination. We start backward elimination by multiplying the third row by $\frac{3}{4}$ and subtracting it from the second row:

$\begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 0&\frac{3}{2}&1&\vline&-\frac{1}{2}&1&0 \\ 0&0&\frac{4}{3}&\vline&\frac{1}{3}&-\frac{2}{3}&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 0&\frac{3}{2}&0&\vline&-\frac{3}{4}&\frac{3}{2}&-\frac{3}{4} \\ 0&0&\frac{4}{3}&\vline&\frac{1}{3}&-\frac{2}{3}&1 \end{bmatrix}$

We next multiply the second row by $\frac{2}{3}$ and subtract it from the first:

$\begin{bmatrix} 2&1&0&\vline&1&0&0 \\ 0&\frac{3}{2}&0&\vline&-\frac{3}{4}&\frac{3}{2}&-\frac{3}{4} \\ 0&0&\frac{4}{3}&\vline&\frac{1}{3}&-\frac{2}{3}&1 \end{bmatrix} \rightarrow \begin{bmatrix} 2&0&0&\vline&\frac{3}{2}&-1&\frac{1}{2} \\ 0&\frac{3}{2}&0&\vline&-\frac{3}{4}&\frac{3}{2}&-\frac{3}{4} \\ 0&0&\frac{4}{3}&\vline&\frac{1}{3}&-\frac{2}{3}&1 \end{bmatrix}$

This completes backward elimination. We then divide the first row by 2, the second row by $\frac{3}{2}$, and the third row by $\frac{4}{3}$:

$\begin{bmatrix} 2&0&0&\vline&\frac{3}{2}&-1&\frac{1}{2} \\ 0&\frac{3}{2}&0&\vline&-\frac{3}{4}&\frac{3}{2}&-\frac{3}{4} \\ 0&0&\frac{4}{3}&\vline&\frac{1}{3}&-\frac{2}{3}&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&\frac{3}{4}&-\frac{1}{2}&\frac{1}{4} \\ 0&1&0&\vline&-\frac{1}{2}&1&-\frac{1}{2} \\ 0&0&1&\vline&\frac{1}{4}&-\frac{1}{2}&\frac{3}{4} \end{bmatrix}$

We then have

$A = \begin{bmatrix} 2&1&0 \\ 1&2&1 \\ 0&1&2 \end{bmatrix} \quad A^{-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}$

Finally we use Gauss-Jordan elimination on the third matrix, starting by multiplying the first row by 1 and subtracting it from the second row, and multiplying the first row by -2 and subtracting it from the third:

$\begin{bmatrix} 1&1&-2&\vline&1&0&0 \\ 1&-2&1&\vline&0&1&0 \\ -2&1&1&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&1&-2&\vline&1&0&0 \\ 0&-3&3&\vline&-1&1&0 \\ 0&3&-3&\vline&2&0&1 \end{bmatrix}$

For the next step we multiply the second row by -1 and subtract it from the third row:

$\begin{bmatrix} 1&1&-2&\vline&1&0&0 \\ 0&-3&3&\vline&-1&1&0 \\ 0&3&-3&\vline&2&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&1&-2&\vline&1&0&0 \\ 0&-3&3&\vline&-1&1&0 \\ 0&0&0&\vline&1&1&1 \end{bmatrix}$

This leaves us with no pivot for the third row, so elimination fails and the third matrix $A$ is not invertible.

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.