When we solve a system by hand, we write margin notes like R2←R2−3R1 or R1↔R3, which we cannot multiply, invert, or plug into an equation. We want an actual matrix that performs a row operation automatically when we multiply by it.
1
Multiplying on the Left to Combine Rows
We are looking for a way to combine the rows of a matrix A using matrix multiplication. Remember that multiplying A on the left by a single row takes a combination of the rows of A, where the entries in the left-hand row tell us how much of each row of A to take.
[201]147258369=2(Row 1)+0(Row 2)+1(Row 3)
Multiplying on the Left to Combine Rows
Putting a 1 in a single spot and 0s everywhere else takes just that one row of A, so stacking those three rows on top of each other gives the identity matrix I, which keeps every row of A as it is:
I (keeps each row)100010001Row 1Row 2Row 3=Row 1Row 2Row 3
2
Building Elementary and Permutation Matrices
An elementary matrix E (or a permutation matrix P when reordering rows) is the identity matrix I with a single row operation applied to it, so that multiplying EA performs that exact row operation on A.
Building Elementary and Permutation Matrices
RiRiRi←cRi,c=0←Ri+cRj↔RjE=?E=?P=?
Here is how we build E to eliminate the 3 in Row 2, Column 1 of A=130284149 using Row 1.
Text solution
Apply R2←R2−3R1 to IReplace Row 2 of the 3×3 identity matrix with Row 2−3(Row 1) while leaving Row 1 and Row 3 unchanged.
Changing a row of I changes the matching row of EA, so in elimination the −3 for subtracting 3 times Row 1 goes into E at the exact spot of the entry you want to eliminate in A.
Doing a row operation to the identity matrix on the left builds the matrix that does that exact row operation to the matrix beside it, and subtracting 3 times one row from another puts −3 right where the entry gets eliminated.
3
Chaining Row Operations from the Inside Out
When a matrix takes more than one row operation to reduce, we need to chain several elementary matrices together so they act on A one after another.
Chaining Row Operations from the Inside Out
Continuing with A=130284149, we finish reducing E1A to upper-triangular form by eliminating the 4 in Row 3, Column 2.
Text solution
Build E2 for R3←R3−2R2Subtract 2 times Row 2 from Row 3 of I to eliminate the 4 in Row 3, Column 2.
E2=10001−2001
Place E2 on the far left of E1ABecause E2 operates on the rows of the new matrix E1A, it multiplies E1A on the left.
Group E2E1 into a single combined matrixBecause matrix multiplication is associative, we can multiply the elementary matrices together first so one matrix performs the entire elimination at once.
E2(E1A)=(E2E1)A
In a chain of elementary matrices multiplying A, the operations act outward from A toward the far left, and reversing the left-to-right order of E1 and E2 changes the resulting product.
Elementary matrices act on A from the inside out, so each new step goes on the far left and swapping their order changes the result.
4
Inverting Elementary and Permutation Matrices
The inverse of an elementary matrix E or permutation matrix P is the matrix that undoes its row operation and puts the original rows back.
Inverting Elementary and Permutation Matrices
Instead of row-reducing, we write the inverse directly from the reverse row operation.
Text solution
Reverse the elimination or scaling in the same spotBecause Row 1 never changed when E1 subtracted 3 times Row 1 from Row 2, E1−1 adds 3 times Row 1 back to Row 2, while a scaling matrix with 5 on the diagonal is inverted by dividing Row 2 by 5.
Transpose P to put reordered rows backWhen P moves old Row 2 to Row 1, old Row 3 to Row 2, and old Row 1 to Row 3, the inverse P−1 must put Row 3 back into Row 1, Row 1 into Row 2, and Row 2 into Row 3, moving every 1 at entry (i,j) in P to entry (j,i) in P−1.
P=001100010⟹P−1=PT (swaps rows and columns)010001100
If P moves Row j to Row i with a 1 at (i,j), its inverse moves Row i back to Row j with a 1 at (j,i). That means P−1=PT for any row reordering, and a single two-row swap is its own inverse because it is symmetric.
To undo a row reordering matrix, you just flip it across its diagonal to get its transpose, because sending each new slot back to its original row swaps the role of row and column.
5
Why the [A∣I] Inverse Method Works
We want to see why row-reducing [A∣I] until the left side becomes I turns the right side into A−1.
Why the [A | I] Inverse Method Works
[A∣I]⟶[I∣A−1]
Why?
After k row operations, the combined matrix M=Ek⋯E2E1 has multiplied both sides of [A∣I]:
Because MA=I, the product M=Ek⋯E2E1 is A−1, and starting with I on the right side simply multiplies those elementary matrices together into MI=M=A−1.
6
Factoring a Matrix into Elementary Matrices
When a chain of elementary matrices reduces A to I, we can undo those elementary matrices on the left side one by one using their inverses to write A itself as a product of elementary matrices.
Factoring a Matrix into Elementary Matrices
Here are the steps to reduce A=[1328] to I and factor A into elementary matrices.
Text solution
Row-reduce A to I using E1,E2, and E3Subtract 3 times Row 1 from Row 2 (E1), scale Row 2 by 21 (E2), and subtract 2 times Row 2 from Row 1 (E3).
Undo E3,E2, and E1 from the outside inMultiply both sides on the left by E3−1, then E2−1, and finally E1−1 (or use the rule for the inverse of a product, (E3E2E1)−1=E1−1E2−1E3−1) to solve for A.
To turn any single row operation into a matrix, apply that operation directly to I: subtracting 3 times Row 1 from Row 2 puts −3 into Row 2, Column 1 of I to give E1=[1−301]. When you need the inverse of a single elementary or permutation matrix, do not set up [E∣I] and row-reduce. Just undo the single operation in the same spot by flipping the sign of an off-diagonal elimination entry ([1−301]−1=[1301]), inverting a scaling factor ([10021]−1=[1002]), or transposing a permutation matrix (P−1=PT, which equals P itself when P is a single two-row swap).
When chaining row operations together, each new step multiplies on the far left so the chain acts from the inside out starting at A: reducing A to I in three steps gives E3E2E1A=I. Keep that product in the same order when you want A−1, and invert the matrices in reverse order when you want to factor A:
E3E2E1A⟹A−1andA=I=E3E2E1=E1−1E2−1E3−1
7
Practice
1
Let A=140−113205. Write the 3×3 elementary matrix E that eliminates the 4 in Row 2, Column 1 using Row 1, and compute EA.
Watch out for keeping the +4 sign, which gives 140010001 and adds 4R1 instead of subtracting.
What operation on the rows of I eliminates a +4 in Row 2, Column 1 using the 1 above it in Row 1?
To eliminate the 4 in Row 2, Column 1, we perform R2←R2−4R1 on I, which places −4 in Row 2, Column 1 (watch out for keeping the +4 sign, which gives 140010001 and adds 4R1 instead of subtracting, or putting −4 in Row 1, Column 2, which changes Row 1 instead of Row 2):
E=1−40010001
Multiplying EA leaves Row 1 and Row 3 unchanged and replaces every entry of Row 2 with Row 2−4(Row 1) (be careful to multiply all of Row 1 by −4, not just the first column, or you would leave the rest of Row 2 unchanged and get [010]):
Find the inverses of E1=10−5010001 and E2=1000−40001 without row reduction by undoing the row operation each matrix performs.
Describe in words what E1 does to Row 3 and what E2 does to Row 2, then write the opposite operation for each.
The matrix E1 subtracts 5 times Row 1 from Row 3, so E1−1 adds 5 times Row 1 back to Row 3. The matrix E2 scales Row 2 by −4, so E2−1 divides Row 2 by −4 (do not treat the diagonal scaling entry −4 like an off-diagonal elimination entry and flip its sign to +4, which gives the wrong inverse 100040001):
E1−1E2−1=105010001,=1000−410001
3
Starting with a 3×3 matrix A, you first subtract 2 times Row 1 from Row 2 (E1), and second subtract 3 times the new Row 2 from Row 3 (E2). Write E1 and E2, write the product that performs both steps on A in the correct order, and multiply the two elementary matrices into a single matrix M that performs the two-step elimination at once.
Which elementary matrix acts on A first, and which side must the second matrix go on to act on that result?
Applying R2←R2−2R1 and R3←R3−3R2 separately to I gives:
E1E2=1−20010001,=10001−3001
Because E1 acts on A first and E2 acts on E1A from the left, the product is E2E1A. Multiplying M=E2E1 subtracts 3 times Row 2 of E1 from Row 3 of E1 (writing the matrices in left-to-right order E1E2 is a common mistake here, which misses how the new Row 2 is used to update Row 3 and gives 1−2001−3001):
Write the 3×3 permutation matrix P that moves Row 3 to Row 1, Row 1 to Row 2, and Row 2 to Row 3, and find its inverse P−1.
For each row of P, pick the row of I that takes the needed old row.
Row 1 takes old Row 3 ([001]), Row 2 takes old Row 1 ([100]), and Row 3 takes old Row 2 ([010]). To undo a three-row cycle, take the transpose P−1=PT (do not assume P−1=P, which only holds for a symmetric single two-row swap and would shift the rows one step further instead of putting them back):
PP−1=PT=010001100,=001100010
5
Row-reducing [A∣I] to [I∣A−1] takes three steps: first swap Row 1 and Row 2 (P1), second subtract 4 times Row 1 from Row 3 (E2), and third scale Row 3 by 21 (E3). Express A−1 in terms of P1,E2, and E3 and compute A−1.
Since E3E2P1A=I, apply those three row operations in order starting from I.
Chaining the three steps from the inside out gives E3E2P1A=I, so A−1=E3E2P1 (do not invert the matrices into P1−1E2−1E3−1=014100002, which gives A instead of A−1). Applying P1, then E2, and then E3 to I in order (notice that after P1 swaps Row 1 and Row 2, the new Row 1 is [010], so subtracting 4 times Row 1 from Row 3 puts −4 in Column 2, not Column 1 as in 01−21000021):
Row-reduce A=[12310] to I in three steps: eliminate the 2 below the first pivot (E1), scale Row 2 to make the second pivot 1 (E2), and eliminate the 3 above the second pivot (E3). Write E1,E2, and E3 so that E3E2E1A=I, and then factor A as a product of three elementary matrices.
After finding the three operations that reduce A to I, undo E3,E2, and E1 on the left side starting with the outermost matrix E3.
Subtracting 2 times Row 1 from Row 2 gives [1034], scaling Row 2 by 41 gives [1031], and subtracting 3 times Row 2 from Row 1 gives I:
E1E2E3=[1−201],=[10041],=[10−31]
Solving E3E2E1A=I for A reverses the order of the matrices and inverts each one (keeping the same order E3−1E2−1E1−1 is a common mistake here, which multiplies to [258124] instead of [12310]):