Section 6.4 Examples
Subsection 6.4.1 Elementary matrices and their inverses
Let’s see examples of forming the elementary matrix that corresponds to an elementary row operation, and then determining its inverse, for each of the three kinds of elementary operations. We use Procedure 6.3.2 to form these elementary matrices.
Let’s do some \(4\times 4\) examples.
Example 6.4.1. Swapping rows.
Consider the operation of swapping the second and fourth rows of a \(4 \times n\) matrix \(A\text{.}\) We can achieve the same result with a matrix product \(EA\) where \(E\) is a \(4 \times 4\) elementary matrix. To obtain \(E\text{,}\) we perform the desired operation on the identity matrix:
\begin{equation*}
I = \bidentmatfour \qquad\xrightarrow[\text{rows}]{\text{swap}}\qquad
E = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 1 \amp 0 \amp 0
\end{bmatrix}.
\end{equation*}
To obtain the inverse \(\inv{E}\text{,}\) we perform the reverse operation. But that’s just swapping the same two rows back again:
\begin{equation*}
I = \bidentmatfour \quad\xrightarrow[\text{rows}]{\text{swap}}\quad
\inv{E} = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 1 \amp 0 \amp 0
\end{bmatrix}.
\end{equation*}
So, in this case, the inverse elemenatary matrix is the same as the original.
Example 6.4.2. Multiplying a row by a constant.
Now consider the operation of swapping the second row of a \(4 \times n\) matrix \(A\) by \(5\text{.}\) We can achieve the same result with a matrix product \(EA\) where \(E\) is a \(4 \times 4\) elementary matrix. To obtain \(E\text{,}\) we perform the desired operation on the identity matrix:
\begin{equation*}
I = \bidentmatfour \quad\xrightarrow[\text{second row}]{\text{multiply}}\quad
E = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}.
\end{equation*}
To obtain the inverse \(\inv{E}\text{,}\) we perform the reverse operation, which in this case is dividing the second row by \(5\) (which is the same as multiplying the second row by \(1/5\)):
\begin{equation*}
I = \bidentmatfour \quad\xrightarrow[\text{second row}]{\text{divide}}\quad
\inv{E} = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1/5 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}.
\end{equation*}
Example 6.4.3. Combining rows.
Finally, consider the operation of adding double the first row to the third row of a \(4 \times n\) matrix \(A\text{.}\) We can achieve the same result with a matrix product \(EA\) where \(E\) is a \(4 \times 4\) elementary matrix. To obtain \(E\text{,}\) we perform the desired operation on the identity matrix:
\begin{equation*}
I = \bidentmatfour \quad\xrightarrow[\text{rows}]{\text{combine}}\quad
E = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
2 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}.
\end{equation*}
Once again, to obtain the inverse \(\inv{E}\text{,}\) we perform the reverse operation, which in this case is subtracting double the first row from the third:
\begin{equation*}
I = \bidentmatfour \quad\xrightarrow[\text{rows}]{\text{combine}}\quad
\inv{E} = \left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
-2 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{array}\right].
\end{equation*}
Comparing \(E\) and \(\inv{E}\) in this case, notice how the \(2\) becomes negated, which is actually the additive inverse of the number two (since \(2+(-2)=0\) and \((-2)+2=0\)). This connection between inverting matrix multiplication and inverting numerical addition is important in more advanced abstract algebra.
Subsection 6.4.2 Decomposing an invertible matrix and its inverse into elementary matrices
Again, let’s do a \(4\times 4\) example. As we row reduce, we’ll keep track of the corresponding elementary matrices. But that also means we need to make sure we are performing elementary row operations, and only performing one at a time — no shortcuts!
Example 6.4.4.
Consider \(4 \times 4\) matrix
\begin{equation*}
A = \left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
-2 \amp 0 \amp 0 \amp 1
\end{array}\right].
\end{equation*}
Row reduce.
\begin{align*}
\amp \amp
A \amp = \left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
-2 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{matrix}\phantom{x}\\\phantom{x}\\\phantom{x}\\R_4+2R_1\end{matrix}
\amp \amp \left(E_1 = \left[\begin{smallmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
2 \amp 0 \amp 0 \amp 1
\end{smallmatrix}\right]\right)\\
\amp \longrightarrow \amp
E_1 A \amp = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\begin{matrix}\phantom{x}\\\phantom{x}\\R_2\leftrightarrow R_3\\\phantom{x}\\\phantom{x}\end{matrix}
\amp \amp \left(E_2 = \left[\begin{smallmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{smallmatrix}\right]\right)\\
\amp \longrightarrow \amp
E_2 E_1 A \amp = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\begin{matrix}\phantom{x}\\\phantom{x}\\R_3-5R_2\\\phantom{x}\end{matrix}
\amp \amp \left(E_3 = \left[\begin{smallmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp -5 \amp 1 \amp 0\\
0 \amp 0 \amp 0 \amp 1
\end{smallmatrix}\right]\right)\\
\amp \longrightarrow \amp
E_3 E_2 E_1 A \amp = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 3 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\begin{matrix}\phantom{x}\\\phantom{x}\\\frac{1}{3}R_3\\\phantom{x}\end{matrix}
\amp \amp \left(E_4 = \left[\begin{smallmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp \frac{1}{3} \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{smallmatrix}\right]\right)\\
\amp \longrightarrow \amp
E_4 E_3 E_2 E_1 A \amp = \bidentmatfour
\end{align*}
Notice in this process that each elementary matrix is newly obtained by applying a row operation to the identity matrix, not by applying a row operation to the previous elementary matrix in the sequence.
We now have \(E_4 E_3 E_2 E_1 A = I\text{,}\) which suggests that
\begin{align*}
\inv{A} \amp = E_4 E_3 E_2 E_1\\
\amp = \begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp \frac{1}{3} \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp -5 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
2 \amp 0 \amp 0 \amp 1
\end{bmatrix}\\
\amp = \left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp \frac{1}{3} \amp -\frac{5}{3} \amp 0 \\
2 \amp 0 \amp 0 \amp 1
\end{array}\right].
\end{align*}
To check that this is really is the correct inverse for \(A\text{,}\) you can check that this matrix multiplied against \(A\) in the other order also results in the identity matrix (i.e. that \(A (E_4 E_3 E_2 E_1) = I\) as well).
Also, with some matrix algebra, from \(E_4E_3E_2E_1A = I\) we can isolate
\begin{align*}
A \amp = \inv{E}_1\inv{E}_2\inv{E}_3\inv{E}_4\\
\amp =
\left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
-2 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 5 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}
\begin{bmatrix}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 3 \amp 0 \\
0 \amp 0 \amp 0 \amp 1
\end{bmatrix}.
\end{align*}
Recall that each of these inverse elementary matrices can each be obtained from the identity matrix using the corresponding reverse operation. You may check that the result of multiplying these inverses together is \(A\text{.}\)
Subsection 6.4.3 Inversion by row reduction
Let’s illustrate Procedure 6.3.7 using the matrix \(A\) from Subsection 6.4.2 above. Since \(A\) is \(4\times 4\text{,}\) we augment \(A\) with the \(4\times 4\) identity matrix and then row reduce, being careful to apply our row operations through the entire augmented rows.
Example 6.4.5.
We would like to compute the inverse of
\begin{equation*}
A = \left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \\
-2 \amp 0 \amp 0 \amp 1
\end{array}\right].
\end{equation*}
Augment with \(I\) and reduce.
\begin{align*}
\amp
\left[\begin{array}{rrrr|rrrr}
1 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \\
-2 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{matrix}\phantom{x}\\\phantom{x}\\\phantom{x}\\R_4+2R_1\end{matrix}\\
\longrightarrow \amp
\left[\begin{array}{rrrr|rrrr}
1 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 0 \amp 1 \amp 2 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{matrix}\phantom{x}\\\phantom{x}\\R_2\leftrightarrow R_3\\\phantom{x}\\\phantom{x}\end{matrix}\\
\longrightarrow \amp
\left[\begin{array}{rrrr|rrrr}
1 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \\
0 \amp 5 \amp 3 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 1 \amp 2 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{matrix}\phantom{x}\\\phantom{x}\\R_3-5R_2\\\phantom{x}\end{matrix}\\
\longrightarrow \amp
\left[\begin{array}{rrrr|rrrr}
1 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 3 \amp 0 \amp 0 \amp 1 \amp -5 \amp 0 \\
0 \amp 0 \amp 0 \amp 1 \amp 2 \amp 0 \amp 0 \amp 1
\end{array}\right]
\begin{matrix}\phantom{x}\\\phantom{x}\\\frac{1}{3}R_3\\\phantom{x}\end{matrix}\\
\longrightarrow \amp
\left[\begin{array}{rrrr|rrrr}
1 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \amp 0 \amp \frac{1}{3} \amp -\frac{5}{3} \amp 0 \\
0 \amp 0 \amp 0 \amp 1 \amp 2 \amp 0 \amp 0 \amp 1
\end{array}\right]
\end{align*}
The matrix on the right is now our desired inverse,
\begin{equation*}
\inv{A}
= \left[\begin{array}{rrrr}
1 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 1 \amp 0 \\
0 \amp \frac{1}{3} \amp -\frac{5}{3} \amp 0 \\
2 \amp 0 \amp 0 \amp 1
\end{array}\right],
\end{equation*}
which agrees with our calculation of \(\inv{A}\) using elementary matrices in Example 6.4.4.