All lessons

Elementary matrices and computing inverses

Day
8 of 40
Length
2:34
Textbook
Lay §2.2
Syllabus
UM51A Lesson 11

Every row operation is multiplication by an elementary matrix, so row-reducing A to I builds A⁻¹ along the way.

On Day 3 you used three row operations to solve systems, and yesterday you met A−1A^{-1}, the matrix that undoes AA. Yesterday's formula only works for 2×22 \times 2 matrices, so today asks how to find the inverse of a matrix of any size. The answer connects those two ideas: each row operation is itself a matrix, and running row reduction on AA and II side by side computes A−1A^{-1}.

Each section below opens with a problem. Try it before you open the walkthrough, even if you only get partway. You will need Day 6's row rule, rowi(EA)=rowi(E) A\text{row}_i(EA) = \text{row}_i(E)\,A, more than once.

Elementary matrices

Start with the identity I=[1001]I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} and do the row operation "subtract 2 times row 1 from row 2". Call the result EE. Then compute EAEA for A=[1327]A = \begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix} and enter it row by row. How does it compare with doing the same row operation to AA directly?

Walk through the solution

Row 1 of II stays (1,0)(1, 0). Row 2 becomes (0,1)−2(1,0)=(−2,1)(0, 1) - 2(1, 0) = (-2, 1). So

E=[10−21].E = \begin{bmatrix} 1 & 0 \\ \glow{-2} & \glow{1} \end{bmatrix}.

To compute EAEA we use Day 6's row rule, which says each row of EAEA is a row of EE times AA. A row times AA is a combination of the rows of AA, with the row's entries as weights.

  1. 1

    Row 1 of EE is (1,0)(1, 0), so row 1 of EAEA is 1⋅(1,3)+0⋅(2,7)=(1,3)1\cdot(1, 3) + 0\cdot(2, 7) = (1, 3). Row 1 of AA is unchanged.

  2. 2
  3. 3

Row 2 of EE is a recipe that says "take −2-2 of row 1 and 11 of row 2". Multiplying by EE follows that recipe on whatever matrix sits to its right.

Elementary matrix

An elementary matrix is a matrix you get by doing one elementary row operation to an identity matrix. There is one kind for each row operation: replacement, interchange and scaling.

If you do a row operation to an m×nm \times n matrix AA, the result is EAEA, where EE is the m×mm \times m elementary matrix made by doing the same operation to ImI_m.

Writing a row operation as a matrix turns row reduction into ordinary matrix algebra. Day 9 uses that to factor A=LUA = LU, and Day 26 uses it to track how each row operation changes a determinant.

Try writing a recipe yourself. The picture draws each row of A=[1235]A = \begin{bmatrix} 1 & 2 \\ 3 & 5 \end{bmatrix} as an arrow, and row 2 of EE says how much of each to mix.

The rows of AA are drawn as arrows. Set row 2 of EE so that row 2 of EAEA becomes the ringed row (0,−1)(0, -1).
E=[1001]E = \begin{bmatrix} 1 & 0 \\ \textcolor{#FF8A3D}{0} & \textcolor{#FF8A3D}{1} \end{bmatrix}
EA=[1235]EA = \begin{bmatrix} \textcolor{#FFD447}{1} & \textcolor{#FFD447}{2} \\ \textcolor{#3DD6B5}{3} & \textcolor{#3DD6B5}{5} \end{bmatrix}

Which row operation does E=[100010−401]E = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -4 & 0 & 1 \end{bmatrix} perform?

As a transformation of the plane, each 2×22 \times 2 elementary matrix is a simple move. The widget shows the grid after EE, and its columns are where ı^\green{\hat\imath} and ȷ^\red{\hat\jmath} land.

Find a row operation whose matrix sends ı^\hat\imath to the ringed point (1,−2)(1, -2) and leaves ȷ^\hat\jmath where it is.
E=[1002]R2←2 R2\begin{gathered} E = \begin{bmatrix} \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{0} \\ \textcolor{#7BC96F}{0} & \textcolor{#F2665E}{2} \end{bmatrix} \\ R_2 \leftarrow 2\,R_2 \end{gathered}
E−1=[10012]R2←12 R2\begin{gathered} E^{-1} = \begin{bmatrix} \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{0} \\ \textcolor{#7BC96F}{0} & \textcolor{#F2665E}{\tfrac{1}{2}} \end{bmatrix} \\ R_2 \leftarrow \tfrac{1}{2}\,R_2 \end{gathered}
Three small grids. On the left, a replacement matrix E with rows (1, 0) and (−2, 1) shears the grid so the green arrow points down to (1, −2); its inverse has +2 in the corner. In the middle, the swap matrix reflects the grid across the line y = x and is its own inverse. On the right, scaling row 1 by 2 stretches the grid sideways, and the inverse scales row 1 by one half.

Undoing a row operation

Which row operation undoes "subtract 2 times row 1 from row 2"? Write its elementary matrix FF, enter it row by row, and check that FE=IFE = I for the EE of Problem 1.

Walk through the solution

Subtracting 2R12R_1 from row 2 is undone by adding 2R12R_1 back. Doing "add 2 times row 1 to row 2" to II gives

F=[1021].F = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}.

Now check with the row rule. Row 1 of FEFE is row 1 of EE, which is (1,0)(1, 0). Row 2 of FEFE is 2⋅(1,0)+1⋅(−2,1)=(0,1)2\cdot(1, 0) + 1\cdot(-2, 1) = (0, 1). So FE=IFE = I, and in the same way EF=IEF = I. That makes F=E−1F = E^{-1}.

Every elementary matrix is invertible

Every row operation can be undone by another row operation of the same kind, so every elementary matrix has an inverse that is elementary too. You can write it down without any computation.

  • A replacement is undone by flipping the sign of the multiple: [10−21]−1=[1021]\begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix}^{-1} = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}.
  • A swap undoes itself.
  • Scaling a row by cc is undone by scaling it by 1c\tfrac1c. That is why scaling by 00 is not a row operation.

What is the inverse of the elementary matrix for R3←R3−4R1R_3 \leftarrow R_3 - 4R_1?

Inverting by row reduction

On Day 3, row reduction aimed for reduced echelon form so you could read off the solution. For an invertible square matrix that form is II. Here the goal is to reduce AA all the way to II while keeping a record of the steps, because their product turns out to be A−1A^{-1}.

Reduce A=[1327]A = \begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix} to II with two row replacements. Write the elementary matrix for each step, and multiply them together, putting the later step on the left. Enter the product row by row.

Walk through the solution

Problem 1 already did the first step. E1E_1 is "subtract 2 times row 1 from row 2", and it turned AA into [1301]\begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix}.

To finish, we clear the 33 above the second pivot. E2E_2 is "subtract 3 times row 2 from row 1", which gives row 1 as (1,3)−3(0,1)=(1,0)(1, 3) - 3(0, 1) = (1, 0) and leaves II. Its matrix is II with that step done to it:

E1=[10−21],E2=[1−301].E_1 = \begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix}, \qquad E_2 = \begin{bmatrix} 1 & -3 \\ 0 & 1 \end{bmatrix}.

E1E_1 acts first, so the product is E2E1E_2E_1. By the row rule, row 1 is 1⋅(1,0)−3⋅(−2,1)=(7,−3)1\cdot(1, 0) - 3\cdot(-2, 1) = (7, -3), and row 2 is 0⋅(1,0)+1⋅(−2,1)=(−2,1)0\cdot(1, 0) + 1\cdot(-2, 1) = (-2, 1):

E2E1=[7−3−21].E_2E_1 = \begin{bmatrix} 7 & -3 \\ -2 & 1 \end{bmatrix}.

Day 7's formula gives A−1=17−6[7−3−21]A^{-1} = \frac{1}{7 - 6}\begin{bmatrix} 7 & -3 \\ -2 & 1 \end{bmatrix}, the same matrix. The product of the steps that reduce AA to II is A−1A^{-1}.

Theorem 7

An n×nn \times n matrix AA is invertible if and only if it is row equivalent to InI_n. In that case, any sequence of row operations that reduces AA to InI_n also turns InI_n into A−1A^{-1}.

The reason is the same as in Problem 3. If Ep⋯E1A=IE_p \cdots E_1 A = I, multiplying both sides on the right by A−1A^{-1} gives Ep⋯E1=A−1E_p \cdots E_1 = A^{-1}. To collect that product without multiplying matrices, write II next to AA and do every operation to the whole row of [ A    I ][\,A \;\; I\,]. When the left half reaches II, the right half is Ep⋯E1I=A−1E_p \cdots E_1 I = A^{-1}.

Here is the example from the video, with A=[2111]A = \begin{bmatrix} \green{2} & \red{1} \\ \green{1} & \red{1} \end{bmatrix}. Each step says which entry it is trying to fix.

  1. 1

    We want a 11 in the top-left corner, and row 2 already starts with 11, so swap the rows (E1E_1: R1↔R2R_1 \leftrightarrow R_2).

    [21101101]∼[11012110]\left[\begin{array}{rr|rr} \green{2} & \red{1} & 1 & 0 \\ \green{1} & \red{1} & 0 & 1 \end{array}\right] \sim \left[\begin{array}{rr|rr} \green{1} & \red{1} & 0 & 1 \\ \green{2} & \red{1} & 1 & 0 \end{array}\right]
  2. 2
  3. 3
  4. 4
  5. 5
The augmented matrix [A | I] after each of the four steps, joined by arrows labelled E1 to E4. Under each matrix, a small grid shows the left half as a transformation: it starts slanted, reflects, shears, flips and ends as the square grid. The final right half, (1, −1; −1, 2), is teal.

Try it yourself on a different matrix. The slider sets the number cc that the buttons use.

Use row operations to turn the left half into II. Each one acts on the whole row, so the right half changes too.
[02101101]\left[\begin{array}{rr|rr} \textcolor{#7BC96F}{0} & \textcolor{#F2665E}{2} & \textcolor{#E8ECF1}{1} & \textcolor{#E8ECF1}{0} \\ \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{1} & \textcolor{#E8ECF1}{0} & \textcolor{#E8ECF1}{1} \end{array}\right]

Last step none yet\text{none yet}

Right half =I= I

Products of elementary matrices

The reduction steps take AA to II. Running them backwards, last one first, should take II back to AA.

In Problem 3, E2E1A=IE_2E_1A = I. Write AA as a product of two elementary matrices, and check your answer by multiplying.

Walk through the solution

We want AA alone, so we remove E2E_2 first, because it sits farthest to the left. Multiply both sides on the left by E2−1E_2^{-1}, then by E1−1E_1^{-1}:

E1A=E2−1⟹A=E1−1E2−1.E_1A = E_2^{-1} \quad\Longrightarrow\quad A = E_1^{-1}E_2^{-1}.

Each inverse flips the sign of its multiple, so

A=[1021][1301]=[1323⋅2+1]=[1327].A = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}\begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 3 \\ 2 & 3\cdot 2 + 1 \end{bmatrix} = \begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix}.

The order is the reverse of the reduction, with E1−1E_1^{-1} on the left. It matches Day 7's socks and shoes rule.

Five small grids from left to right: the square grid I, then the grid after E4 inverse, after E3 inverse E4 inverse, after E2 inverse E3 inverse E4 inverse, and finally the slanted grid of A = E1 inverse E2 inverse E3 inverse E4 inverse.

Now do the same with the video's four steps. Each button applies one undo move to the grid.

Start from the square grid and apply the four undo moves, one at a time, so the green and red arrows land in the rings where the columns of AA sit.
I=[1001]I = \begin{bmatrix} \textcolor{#7BC96F}{1} & \textcolor{#F2665E}{0} \\ \textcolor{#7BC96F}{0} & \textcolor{#F2665E}{1} \end{bmatrix}
E1−1:R1↔R2E2−1:R2←R2+2R1E3−1:R2←−R2E4−1:R1←R1+R2\begin{aligned} E_1^{-1}&: R_1 \leftrightarrow R_2 \\ E_2^{-1}&: R_2 \leftarrow R_2 + 2R_1 \\ E_3^{-1}&: R_2 \leftarrow -R_2 \\ E_4^{-1}&: R_1 \leftarrow R_1 + R_2 \end{aligned}

That order builds a different grid. Start over and undo the last reduction step first.

Invertible means a product of elementary matrices

If Ep⋯E1A=IE_p \cdots E_1A = I, then A=E1−1E2−1⋯Ep−1A = E_1^{-1}E_2^{-1}\cdots E_p^{-1}, and every factor is elementary. In the other direction, a product of elementary matrices is always invertible, because each factor is. So AA is invertible exactly when it is a product of elementary matrices. Geometrically, every invertible move of the plane is a chain of shears, swaps and stretches. Day 27 uses this fact to prove that det⁡(AB)=(det⁡A)(det⁡B)\det(AB) = (\det A)(\det B).

When there is no inverse

Try to row reduce [ B    I ][\,B \;\; I\,] for B=[1212]B = \begin{bmatrix} 1 & 2 \\ 1 & 2 \end{bmatrix}. What goes wrong?

Walk through the solution

The natural first step clears the 11 below the first pivot by subtracting row 1 from row 2:

[12101201]∼[121000−11]\left[\begin{array}{rr|rr} 1 & 2 & 1 & 0 \\ 1 & 2 & 0 & 1 \end{array}\right] \sim \left[\begin{array}{rr|rr} 1 & 2 & 1 & 0 \\ 0 & 0 & -1 & 1 \end{array}\right]

The left half now has a row of zeros. Every later row operation only mixes the rows (1,2)(1, 2) and (0,0)(0, 0), so every row it can produce is a multiple of (1,2)(1, 2). The row (0,1)(0, 1) of II is not such a multiple, so the left half can never become II. By Theorem 7, BB has no inverse, and we can stop here. Its determinant 1⋅2−2⋅1=01 \cdot 2 - 2 \cdot 1 = 0 agrees.

A zero row on the left is the signal to stop. Geometrically, BB flattens the plane onto a line, and no sequence of invertible moves can unflatten it.

One column of the inverse

Sometimes you need only part of A−1A^{-1}. Because AA−1=IAA^{-1} = I, column jj of A−1A^{-1} is the vector that AA sends to ej\mathbf e_j, which is exactly what Day 7 found with the pink columns.

For A=[1327]A = \begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix}, find the second column of A−1A^{-1} by row reducing [ A    e2 ][\,A \;\; \mathbf e_2\,].

Walk through the solution

The second column solves Ax=e2=(0,1)A\mathbf x = \mathbf e_2 = (0, 1), so we row reduce AA with only that one column beside it, using the same two steps as Problem 3:

[130271]∼[130011]∼[10−3011]\left[\begin{array}{rr|r} 1 & 3 & 0 \\ 2 & 7 & 1 \end{array}\right] \sim \left[\begin{array}{rr|r} 1 & 3 & 0 \\ 0 & 1 & 1 \end{array}\right] \sim \left[\begin{array}{rr|r} 1 & 0 & -3 \\ 0 & 1 & 1 \end{array}\right]

The second column of A−1A^{-1} is (−3,1)(-3, 1), which matches the second column of the A−1A^{-1} found in Problem 3.

Tomorrow the same record of steps, stopped at an echelon form instead of at II, gives the factorization A=LUA = LU, which solves Ax=bA\mathbf x = \mathbf b quickly for many different b\mathbf b.

Practice

Warm-up

Write the 3×33 \times 3 elementary matrix for R3←R3+5R1R_3 \leftarrow R_3 + 5R_1, row by row.

Show the solution

Do the operation to I3I_3. Rows 1 and 2 stay the same, and row 3 becomes (0,0,1)+5(1,0,0)=(5,0,1)(0, 0, 1) + 5(1, 0, 0) = (5, 0, 1):

[100010501]\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 5 & 0 & 1 \end{bmatrix}

Write the inverse of [1−601]\begin{bmatrix} 1 & -6 \\ 0 & 1 \end{bmatrix}, row by row, without computing.

Show the solution

The matrix performs R1←R1−6R2R_1 \leftarrow R_1 - 6R_2. Its inverse puts the 6R26R_2 back, R1←R1+6R2R_1 \leftarrow R_1 + 6R_2, which is [1601]\begin{bmatrix} 1 & 6 \\ 0 & 1 \end{bmatrix}.

Which row operation does [001010100]\begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix} perform?

Show the solution

Row ii of EE says which rows of AA build row ii of EAEA. Here row 1 of EAEA is row 3 of AA, and row 3 of EAEA is row 1 of AA.

Core

Find the inverse of A=[2513]A = \begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix} by row reducing [ A    I ][\,A \;\; I\,], and enter it row by row. (Modeled on Lay §2.2 #29.)

Show a hint

Swapping the rows first puts a 11 in the top-left corner and avoids fractions.

Show the solution
[25101301]∼[13012510]R1↔R2∼[13010−11−2]R2←R2−2R1∼[130101−12]R2←−R2∼[103−501−12]R1←R1−3R2\begin{aligned} \left[\begin{array}{rr|rr} 2 & 5 & 1 & 0 \\ 1 & 3 & 0 & 1 \end{array}\right] &\sim \left[\begin{array}{rr|rr} 1 & 3 & 0 & 1 \\ 2 & 5 & 1 & 0 \end{array}\right] && R_1 \leftrightarrow R_2 \\ &\sim \left[\begin{array}{rr|rr} 1 & 3 & 0 & 1 \\ 0 & -1 & 1 & -2 \end{array}\right] && R_2 \leftarrow R_2 - 2R_1 \\ &\sim \left[\begin{array}{rr|rr} 1 & 3 & 0 & 1 \\ 0 & 1 & -1 & 2 \end{array}\right] && R_2 \leftarrow -R_2 \\ &\sim \left[\begin{array}{rr|rr} 1 & 0 & 3 & -5 \\ 0 & 1 & -1 & 2 \end{array}\right] && R_1 \leftarrow R_1 - 3R_2 \end{aligned}

So A−1=[3−5−12]A^{-1} = \begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix}. Day 7's formula agrees, since det⁡A=6−5=1\det A = 6 - 5 = 1.

Let A=[1200134−12]A = \begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 4 & -1 & 2 \end{bmatrix} and let EE be the elementary matrix for R3←R3−4R1R_3 \leftarrow R_3 - 4R_1. Find row 3 of EAEA. (Modeled on Lay §2.2 #28.)

Show a hint

Row 3 of EE is (−4,0,1)(-4, 0, 1). Use it as weights on the rows of AA.

Show the solution
row3(EA)=−4[120]+[4−12]=[0−92]\text{row}_3(EA) = -4\begin{bmatrix} 1 & 2 & 0 \end{bmatrix} + \begin{bmatrix} 4 & -1 & 2 \end{bmatrix} = \begin{bmatrix} 0 & -9 & 2 \end{bmatrix}

Rows 1 and 2 of EAEA are the same as in AA. This is exactly the result of doing the row operation to AA directly.

Let A=[1022130−12]A = \begin{bmatrix} 1 & 0 & 2 \\ 2 & 1 & 3 \\ 0 & -1 & 2 \end{bmatrix}. Find the third column of A−1A^{-1} without computing the other two. (Modeled on Lay §2.2 #35.)

Show a hint

The third column of A−1A^{-1} solves Ax=e3A\mathbf x = \mathbf e_3. Row reduce [ A    e3 ][\,A \;\; \mathbf e_3\,].

Show the solution
[102021300−121]∼[102001−100011]∼[100−201010011]\begin{aligned} \left[\begin{array}{rrr|r} 1 & 0 & 2 & 0 \\ 2 & 1 & 3 & 0 \\ 0 & -1 & 2 & 1 \end{array}\right] &\sim \left[\begin{array}{rrr|r} 1 & 0 & 2 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 1 & 1 \end{array}\right] \\ &\sim \left[\begin{array}{rrr|r} 1 & 0 & 0 & -2 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 \end{array}\right] \end{aligned}

The first step used R2←R2−2R1R_2 \leftarrow R_2 - 2R_1 and then R3←R3+R2R_3 \leftarrow R_3 + R_2. The second used R2←R2+R3R_2 \leftarrow R_2 + R_3 and R1←R1−2R3R_1 \leftarrow R_1 - 2R_3. The third column is (−2,1,1)(-2, 1, 1). Check: A[−211]=[−2+2−4+1+3−1+2]=[001]A\begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} -2 + 2 \\ -4 + 1 + 3 \\ -1 + 2 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}.

Find the full inverse of the same A=[1022130−12]A = \begin{bmatrix} 1 & 0 & 2 \\ 2 & 1 & 3 \\ 0 & -1 & 2 \end{bmatrix}, row by row. (Modeled on Lay §2.2 #31.)

Show a hint

Use the same four row operations as the previous check, but carry all three columns of II along.

Show the solution
[1021002130100−12001]∼[10210001−1−210001−211]∼[1005−2−2010−421001−211]\begin{aligned} \left[\begin{array}{rrr|rrr} 1 & 0 & 2 & 1 & 0 & 0 \\ 2 & 1 & 3 & 0 & 1 & 0 \\ 0 & -1 & 2 & 0 & 0 & 1 \end{array}\right] &\sim \left[\begin{array}{rrr|rrr} 1 & 0 & 2 & 1 & 0 & 0 \\ 0 & 1 & -1 & -2 & 1 & 0 \\ 0 & 0 & 1 & -2 & 1 & 1 \end{array}\right] \\ &\sim \left[\begin{array}{rrr|rrr} 1 & 0 & 0 & 5 & -2 & -2 \\ 0 & 1 & 0 & -4 & 2 & 1 \\ 0 & 0 & 1 & -2 & 1 & 1 \end{array}\right] \end{aligned}

The first line used R2←R2−2R1R_2 \leftarrow R_2 - 2R_1 and then R3←R3+R2R_3 \leftarrow R_3 + R_2. The second used R2←R2+R3R_2 \leftarrow R_2 + R_3 and R1←R1−2R3R_1 \leftarrow R_1 - 2R_3. The third column matches the previous check.

Is [123257112]\begin{bmatrix} 1 & 2 & 3 \\ 2 & 5 & 7 \\ 1 & 1 & 2 \end{bmatrix} invertible? (Modeled on Lay §2.2 #32.)

Show a hint

Row reduce and watch for a zero row on the left.

Show the solution
[123257112]∼[1230110−1−1]∼[123011000]\begin{bmatrix} 1 & 2 & 3 \\ 2 & 5 & 7 \\ 1 & 1 & 2 \end{bmatrix} \sim \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 0 & -1 & -1 \end{bmatrix} \sim \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}

Row 3 of the original matrix is row 2 minus row 1, which is why a zero row appears.

Challenge

The row operations E1E_1: R2←R2+3R1R_2 \leftarrow R_2 + 3R_1 and then E2E_2: R1←R1−2R2R_1 \leftarrow R_1 - 2R_2 reduce a 2×22 \times 2 matrix AA to II. Find AA, row by row.

Show a hint

From E2E1A=IE_2E_1A = I, the matrix is A=E1−1E2−1A = E_1^{-1}E_2^{-1}. Write each inverse by flipping the sign of its multiple.

Show the solution
A=E1−1E2−1=[10−31][1201]=[12−3−6+1]=[12−3−5]\begin{aligned} A = E_1^{-1}E_2^{-1} &= \begin{bmatrix} 1 & 0 \\ -3 & 1 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \\ &= \begin{bmatrix} 1 & 2 \\ -3 & -6 + 1 \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ -3 & -5 \end{bmatrix} \end{aligned}

Check: R2+3R1R_2 + 3R_1 turns row 2 into (−3+3,−5+6)=(0,1)(-3 + 3, -5 + 6) = (0, 1). Then R1−2R2R_1 - 2R_2 turns row 1 into (1,0)(1, 0).

The inverse of [100110111]\begin{bmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 1 & 1 & 1 \end{bmatrix} is [100−1100−11]\begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 0 & -1 & 1 \end{bmatrix}. Guess the last row of the inverse of the 4×44 \times 4 matrix with 11s on and below the diagonal and 00s above it. (Modeled on Lay §2.2 #33.)

Show a hint

Row reducing the lower-triangular matrix of 11s takes one step per row: subtract the row above. What does each of those steps record in the right half?

Show the solution

The pattern is 11s on the diagonal and −1-1s just below it, so the last row is (0,0,−1,1)(0, 0, -1, 1). To see why, call the 4×44 \times 4 matrix AA and the guess BB. Row 4 of BABA is −row3(A)+row4(A)=−(1,1,1,0)+(1,1,1,1)=(0,0,0,1)-\text{row}_3(A) + \text{row}_4(A) = -(1, 1, 1, 0) + (1, 1, 1, 1) = (0, 0, 0, 1), which is row 4 of II. Each row of BB subtracts the row above it, and every row of AA differs from the one above by a single 11.

Row operations reduce A=[2001]A = \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix} to II. Do the same row operations reduce A−1A^{-1} to II? (Modeled on Lay §2.2 #10.)

Show a hint

Multiply out what the steps do. If Ep⋯E1=A−1E_p \cdots E_1 = A^{-1}, what is Ep⋯E1A−1E_p \cdots E_1 A^{-1}?

Show the solution

Ep⋯E1A−1=A−1A−1E_p \cdots E_1 A^{-1} = A^{-1}A^{-1}. To reduce A−1A^{-1} to II you need steps whose product is (A−1)−1=A(A^{-1})^{-1} = A instead.