Linear AlgebraMatrix Algebra7 of 9
Matrix Algebra · 7

Elementary Matrices

When we solve a system by hand, we write margin notes like R2←R2−3R1\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{3R_1} or R1↔R3\rowone{R_1} \leftrightarrow \rowthree{R_3}, 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 AA using matrix multiplication. Remember that multiplying AA on the left by a single row takes a combination of the rows of AA, where the entries in the left-hand row tell us how much of each row of AA to take.

2\htmlClass{lc-green}{2}
0\htmlClass{lc-pink}{0}
1\htmlClass{lc-violet}{1}
1\htmlClass{lc-green}{1}
2\htmlClass{lc-green}{2}
3\htmlClass{lc-green}{3}
4\htmlClass{lc-pink}{4}
5\htmlClass{lc-pink}{5}
6\htmlClass{lc-pink}{6}
7\htmlClass{lc-violet}{7}
8\htmlClass{lc-violet}{8}
9\htmlClass{lc-violet}{9}
2(Row 1)\htmlClass{lc-green}{2(\text{Row } 1)}
++
0(Row 2)\htmlClass{lc-pink}{0(\text{Row } 2)}
++
1(Row 3)\htmlClass{lc-violet}{1(\text{Row } 3)}
[201][123456789]=2(Row 1)+0(Row 2)+1(Row 3)\displaystyle \begin{bmatrix} \rowone{2} & \rowtwo{0} & \rowthree{1} \end{bmatrix} \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{3} \\ \rowtwo{4} & \rowtwo{5} & \rowtwo{6} \\ \rowthree{7} & \rowthree{8} & \rowthree{9} \end{bmatrix} = \rowone{2(\text{Row } 1)} + \rowtwo{0(\text{Row } 2)} + \rowthree{1(\text{Row } 3)}
Multiplying on the Left to Combine Rows
1\htmlClass{lc-green}{1}2\htmlClass{lc-green}{2}1\htmlClass{lc-green}{1}
3\htmlClass{lc-pink}{3}8\htmlClass{lc-pink}{8}4\htmlClass{lc-pink}{4}
0\htmlClass{lc-violet}{0}4\htmlClass{lc-violet}{4}9\htmlClass{lc-violet}{9}
R2←R2−3R1\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{3R_1}
R1↔R3\rowone{R_1} \leftrightarrow \rowthree{R_3}

Putting a 11 in a single spot and 00s everywhere else takes just that one row of AA, so stacking those three rows on top of each other gives the identity matrix II, which keeps every row of AA as it is:

[100010001]⏟I (keeps each row)[Row 1Row 2Row 3]=[Row 1Row 2Row 3]\displaystyle \underbrace{\begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}}_{I \text{ (keeps each row)}} \begin{bmatrix} \rowone{\text{Row } 1} \\ \rowtwo{\text{Row } 2} \\ \rowthree{\text{Row } 3} \end{bmatrix} = \begin{bmatrix} \rowone{\text{Row } 1} \\ \rowtwo{\text{Row } 2} \\ \rowthree{\text{Row } 3} \end{bmatrix}
2

Building Elementary and Permutation Matrices

An elementary matrix EE (or a permutation matrix PP when reordering rows) is the identity matrix II with a single row operation applied to it, so that multiplying EAEA performs that exact row operation on AA.

Building Elementary and Permutation Matrices
Ri←cRi, c≠0E=?Ri←Ri+cRjE=?Ri↔RjP=?\displaystyle \begin{alignedat}{2} R_i &\leftarrow cR_i,\ c \neq 0 &\qquad& E = {?} \\ R_i &\leftarrow R_i + cR_j && E = {?} \\ R_i &\leftrightarrow R_j && P = {?} \end{alignedat}

Here is how we build EE to eliminate the 3\rowtwo{3} in Row 2, Column 1 of A=[121384049]A = \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{1} \\ \rowtwo{3} & \rowtwo{8} & \rowtwo{4} \\ \rowthree{0} & \rowthree{4} & \rowthree{9} \end{bmatrix} using Row 1.

Text solution
Apply R2←R2−3R1\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{3R_1} to IIReplace Row 2 of the 3×33 \times 3 identity matrix with Row 2−3(Row 1)\rowtwo{\text{Row } 2} - \rowone{3(\text{Row } 1)} while leaving Row 1 and Row 3 unchanged.
[100010001]→R2←R2−3R1[100−310001]⏟elementary matrix E\displaystyle \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \xrightarrow{\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{3R_1}} \underbrace{\begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{-3} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}}_{\text{elementary matrix } E}
Multiply AA on the left by EEThe −3\rowone{-3} in Row 2, Column 1 of EE subtracts 3\rowone{3} times Row 1 from Row 2 of AA, putting a 0\built{0} in Row 2, Column 1.
EA=[100−310001][121384049]=[121021049]\displaystyle EA = \begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{-3} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{1} \\ \rowtwo{3} & \rowtwo{8} & \rowtwo{4} \\ \rowthree{0} & \rowthree{4} & \rowthree{9} \end{bmatrix} = \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{1} \\ \built{0} & \built{2} & \built{1} \\ \rowthree{0} & \rowthree{4} & \rowthree{9} \end{bmatrix}

In the same way, scaling a row or swapping two rows of II builds the matrix that scales or swaps those rows of AA:

[100010001]→R2←5R2[100050001]⏟elementary matrix E,[100010001]→R2↔R3[100001010]⏟permutation matrix P\displaystyle \begin{aligned} &\begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \xrightarrow{\rowtwo{R_2} \leftarrow \rowtwo{5R_2}} \underbrace{\begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{5} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}}_{\text{elementary matrix } E}, \\[6pt] &\begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \xrightarrow{\rowtwo{R_2} \leftrightarrow \rowthree{R_3}} \underbrace{\begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & 0 & \rowthree{1} \\ 0 & \rowtwo{1} & 0 \end{bmatrix}}_{\text{permutation matrix } P} \end{aligned}

Changing a row of II changes the matching row of EAEA, so in elimination the −3\rowone{-3} for subtracting 3\rowone{3} times Row 1 goes into EE at the exact spot of the entry you want to eliminate in AA.

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 AA one after another.

Chaining Row Operations from the Inside Out
1\htmlClass{lc-green}{1}0000
−3\htmlClass{lc-green}{-3}1\htmlClass{lc-pink}{1}00
00001\htmlClass{lc-violet}{1}
1\htmlClass{lc-green}{1}2\htmlClass{lc-green}{2}1\htmlClass{lc-green}{1}
3\htmlClass{lc-pink}{3}8\htmlClass{lc-pink}{8}4\htmlClass{lc-pink}{4}
0\htmlClass{lc-violet}{0}4\htmlClass{lc-violet}{4}9\htmlClass{lc-violet}{9}
==
1\htmlClass{lc-green}{1}2\htmlClass{lc-green}{2}1\htmlClass{lc-green}{1}
0\htmlClass{lc-blue}{0}2\htmlClass{lc-blue}{2}1\htmlClass{lc-blue}{1}
0\htmlClass{lc-violet}{0}4\htmlClass{lc-violet}{4}9\htmlClass{lc-violet}{9}
E1E_1
AA
E1AE_1A
R3←R3−2R2\rowthree{R_3} \leftarrow \rowthree{R_3} - \rowtwo{2R_2}

Continuing with A=[121384049]A = \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{1} \\ \rowtwo{3} & \rowtwo{8} & \rowtwo{4} \\ \rowthree{0} & \rowthree{4} & \rowthree{9} \end{bmatrix}, we finish reducing E1AE_1A to upper-triangular form by eliminating the 4\rowthree{4} in Row 3, Column 2.

Text solution
Build E2E_2 for R3←R3−2R2\rowthree{R_3} \leftarrow \rowthree{R_3} - \rowtwo{2R_2}Subtract 2\rowtwo{2} times Row 2 from Row 3 of II to eliminate the 4\rowthree{4} in Row 3, Column 2.
E2=[1000100−21]\displaystyle E_2 = \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & \rowtwo{-2} & \rowthree{1} \end{bmatrix}
Place E2E_2 on the far left of E1AE_1ABecause E2E_2 operates on the rows of the new matrix E1AE_1A, it multiplies E1AE_1A on the left.
E2(E1A)=[1000100−21][121021049]=[121021007]\displaystyle E_2(E_1A) = \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & \rowtwo{-2} & \rowthree{1} \end{bmatrix} \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{1} \\ \rowtwo{0} & \rowtwo{2} & \rowtwo{1} \\ \rowthree{0} & \rowthree{4} & \rowthree{9} \end{bmatrix} = \begin{bmatrix} \rowone{1} & \rowone{2} & \rowone{1} \\ \rowtwo{0} & \rowtwo{2} & \rowtwo{1} \\ \built{0} & \built{0} & \built{7} \end{bmatrix}
Group E2E1\built{E_2E_1} 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)\displaystyle E_2(E_1A) =(E2E1)A\displaystyle = (\built{E_2E_1})A

In a chain of elementary matrices multiplying AA, the operations act outward from AA toward the far left, and reversing the left-to-right order of E1E_1 and E2E_2 changes the resulting product.

Elementary matrices act on AA 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 EE or permutation matrix PP is the matrix that undoes its row operation and puts the original rows back.

Inverting Elementary and Permutation Matrices
1\htmlClass{lc-green}{1}0000
−3\htmlClass{lc-green}{-3}1\htmlClass{lc-pink}{1}00
00001\htmlClass{lc-violet}{1}
E1E_1
E1−1=?E_1^{-1} = {?}
Row 1\htmlClass{lc-green}{\text{Row } 1}
Row 2\htmlClass{lc-pink}{\text{Row } 2}
Row 3\htmlClass{lc-violet}{\text{Row } 3}
R2←R2−3R1\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{3R_1}
Row 1\htmlClass{lc-green}{\text{Row } 1}
Row 2−3 Row 1\htmlClass{lc-blue}{\text{Row } 2 - 3\,\text{Row } 1}
Row 3\htmlClass{lc-violet}{\text{Row } 3}
?{?}

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 E1E_1 subtracted 3\rowone{3} times Row 1 from Row 2, E1−1E_1^{-1} adds 3\rowone{3} times Row 1 back to Row 2, while a scaling matrix with 5\rowtwo{5} on the diagonal is inverted by dividing Row 2 by 5\rowtwo{5}.
E1=[100−310001]  ⟹  E1−1=[100310001],[100050001]−1=[1000150001]\displaystyle \begin{aligned} E_1 &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{-3} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \\ \implies E_1^{-1} &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{3} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}, \\[6pt] \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{5} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}^{-1} &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{\frac{1}{5}} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \end{aligned}
Transpose PP to put reordered rows backWhen PP moves old Row 2 to Row 1, old Row 3 to Row 2, and old Row 1 to Row 3, the inverse P−1P^{-1} must put Row 3 back into Row 1, Row 1 into Row 2, and Row 2 into Row 3, moving every 11 at entry (i,j)(i, j) in PP to entry (j,i)(j, i) in P−1P^{-1}.
P=[010001100]  ⟹  P−1=[001100010]⏟PT (swaps rows and columns)\displaystyle P = \begin{bmatrix} 0 & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \\ \rowone{1} & 0 & 0 \end{bmatrix} \implies P^{-1} = \underbrace{\begin{bmatrix} 0 & 0 & \rowone{1} \\ \rowtwo{1} & 0 & 0 \\ 0 & \rowthree{1} & 0 \end{bmatrix}}_{P^T \text{ (swaps rows and columns)}}

If PP moves Row jj to Row ii with a 11 at (i,j)(i, j), its inverse moves Row ii back to Row jj with a 11 at (j,i)(j, i). That means P−1=PTP^{-1} = P^T 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][A \mid I] Inverse Method Works

We want to see why row-reducing [A∣I][A \mid I] until the left side becomes II turns the right side into A−1\built{A^{-1}}.

Why the [A | I] Inverse Method Works
[ A∣I ]⟶[ I∣A−1 ]\displaystyle [\,A \mid I\,] \longrightarrow [\,I \mid \built{A^{-1}}\,]
Why?\displaystyle \text{Why?}

After kk row operations, the combined matrix M=Ek⋯E2E1\built{M} = \built{E_k \cdots E_2 E_1} has multiplied both sides of [A∣I][A \mid I]:

[A∣I]→E1,E2,…,Ek[(Ek⋯E2E1)⏟M=A−1A  |  (Ek⋯E2E1)⏟MI]=[I∣A−1]\displaystyle \begin{aligned} &[A \mid I] \xrightarrow{E_1, E_2, \dots, E_k} \\ &\left[ \underbrace{\built{(E_k \cdots E_2 E_1)}}_{\built{M} = \built{A^{-1}}} A \;\middle|\; \underbrace{\built{(E_k \cdots E_2 E_1)}}_{\built{M}} I \right] \\ &= [I \mid \built{A^{-1}}] \end{aligned}

Because MA=I\built{M}A = I, the product M=Ek⋯E2E1\built{M} = \built{E_k \cdots E_2 E_1} is A−1\built{A^{-1}}, and starting with II on the right side simply multiplies those elementary matrices together into MI=M=A−1\built{M}I = \built{M} = \built{A^{-1}}.

6

Factoring a Matrix into Elementary Matrices

When a chain of elementary matrices reduces AA to II, we can undo those elementary matrices on the left side one by one using their inverses to write AA itself as a product of elementary matrices.

Factoring a Matrix into Elementary Matrices
1\htmlClass{lc-green}{1}2\htmlClass{lc-green}{2}
3\htmlClass{lc-pink}{3}8\htmlClass{lc-pink}{8}
AA
Ek⋯E2E1AE_k \cdots E_2E_1A
=I= I
AA
=?= {?}

Here are the steps to reduce A=[1238]A = \begin{bmatrix} \rowone{1} & \rowone{2} \\ \rowtwo{3} & \rowtwo{8} \end{bmatrix} to II and factor AA into elementary matrices.

Text solution
Row-reduce AA to II using E1E_1, E2E_2, and E3E_3Subtract 3\rowone{3} times Row 1 from Row 2 (E1E_1), scale Row 2 by 12\rowtwo{\frac{1}{2}} (E2E_2), and subtract 2\rowtwo{2} times Row 2 from Row 1 (E3E_3).
[1−201]⏟E3[10012]⏟E2[10−31]⏟E1[1238]⏟A=[1001]=I\displaystyle \begin{aligned} &\underbrace{\begin{bmatrix} \rowone{1} & \rowtwo{-2} \\ 0 & \rowtwo{1} \end{bmatrix}}_{E_3} \underbrace{\begin{bmatrix} \rowone{1} & 0 \\ 0 & \rowtwo{\frac{1}{2}} \end{bmatrix}}_{E_2} \underbrace{\begin{bmatrix} \rowone{1} & 0 \\ \rowone{-3} & \rowtwo{1} \end{bmatrix}}_{E_1} \underbrace{\begin{bmatrix} \rowone{1} & \rowone{2} \\ \rowtwo{3} & \rowtwo{8} \end{bmatrix}}_{A} \\ &= \begin{bmatrix} \built{1} & \built{0} \\ \built{0} & \built{1} \end{bmatrix} = I \end{aligned}
Undo E3E_3, E2E_2, and E1E_1 from the outside inMultiply both sides on the left by E3−1E_3^{-1}, then E2−1E_2^{-1}, and finally E1−1E_1^{-1} (or use the rule for the inverse of a product, (E3E2E1)−1=E1−1E2−1E3−1(\built{E_3E_2E_1})^{-1} = E_1^{-1}E_2^{-1}E_3^{-1}) to solve for AA.
E3E2E1A=I  ⟹  E2E1A=E3−1  ⟹  E1A=E2−1E3−1  ⟹  A=E1−1E2−1E3−1\displaystyle \begin{aligned} E_3 E_2 E_1 A &= I \\ \implies E_2 E_1 A &= E_3^{-1} \\ \implies E_1 A &= E_2^{-1} E_3^{-1} \\ \implies A &= E_1^{-1} E_2^{-1} E_3^{-1} \end{aligned}
Write each inverse by reversing its row operationChange −3\rowone{-3} to +3\rowone{+3} in E1−1E_1^{-1}, change 12\rowtwo{\frac{1}{2}} to 2\rowtwo{2} in E2−1E_2^{-1}, and change −2\rowtwo{-2} to +2\rowtwo{+2} in E3−1E_3^{-1}.
A=[1238]=[1031]⏟E1−1[1002]⏟E2−1[1201]⏟E3−1\displaystyle A = \begin{bmatrix} \rowone{1} & \rowone{2} \\ \rowtwo{3} & \rowtwo{8} \end{bmatrix} = \underbrace{\begin{bmatrix} \rowone{1} & 0 \\ \rowone{3} & \rowtwo{1} \end{bmatrix}}_{E_1^{-1}} \underbrace{\begin{bmatrix} \rowone{1} & 0 \\ 0 & \rowtwo{2} \end{bmatrix}}_{E_2^{-1}} \underbrace{\begin{bmatrix} \rowone{1} & \rowtwo{2} \\ 0 & \rowtwo{1} \end{bmatrix}}_{E_3^{-1}}

Key concepts

To turn any single row operation into a matrix, apply that operation directly to II: subtracting 3\rowone{3} times Row 1 from Row 2 puts −3\rowone{-3} into Row 2, Column 1 of II to give E1=[10−31]E_1 = \begin{bmatrix} \rowone{1} & 0 \\ \rowone{-3} & \rowtwo{1} \end{bmatrix}. When you need the inverse of a single elementary or permutation matrix, do not set up [E∣I][E \mid I] and row-reduce. Just undo the single operation in the same spot by flipping the sign of an off-diagonal elimination entry ([10−31]−1=[1031]\begin{bmatrix} \rowone{1} & 0 \\ \rowone{-3} & \rowtwo{1} \end{bmatrix}^{-1} = \begin{bmatrix} \rowone{1} & 0 \\ \rowone{3} & \rowtwo{1} \end{bmatrix}), inverting a scaling factor ([10012]−1=[1002]\begin{bmatrix} \rowone{1} & 0 \\ 0 & \rowtwo{\tfrac{1}{2}} \end{bmatrix}^{-1} = \begin{bmatrix} \rowone{1} & 0 \\ 0 & \rowtwo{2} \end{bmatrix}), or transposing a permutation matrix (P−1=PTP^{-1} = P^T, which equals PP itself when PP 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 AA: reducing AA to II in three steps gives E3E2E1A=IE_3E_2E_1A = I. Keep that product in the same order when you want A−1\built{A^{-1}}, and invert the matrices in reverse order when you want to factor AA:

E3E2E1A=I  ⟹  A−1=E3E2E1andA=E1−1E2−1E3−1\displaystyle \begin{aligned} E_3 E_2 E_1 A &= I \\ \implies \built{A^{-1}} &= \built{E_3 E_2 E_1} \\ \text{and} \quad A &= E_1^{-1} E_2^{-1} E_3^{-1} \end{aligned}
7

Practice

1

Let A=[1−12410035]A = \begin{bmatrix} 1 & -1 & 2 \\ 4 & 1 & 0 \\ 0 & 3 & 5 \end{bmatrix}. Write the 3×33 \times 3 elementary matrix EE that eliminates the 44 in Row 2, Column 1 using Row 1, and compute EAEA.

What operation on the rows of II eliminates a +4+4 in Row 2, Column 1 using the 11 above it in Row 1?

To eliminate the 4\rowtwo{4} in Row 2, Column 1, we perform R2←R2−4R1\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{4R_1} on II, which places −4\rowone{-4} in Row 2, Column 1 (watch out for keeping the +4\wrong{+4} sign, which gives [100410001]\wrong{\begin{bmatrix} 1 & 0 & 0 \\ 4 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}} and adds 4R1\wrong{4R_1} instead of subtracting, or putting −4\wrong{-4} in Row 1, Column 2, which changes Row 1 instead of Row 2):
E=[100−410001]\displaystyle E = \begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{-4} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}
Multiplying EAEA leaves Row 1 and Row 3 unchanged and replaces every entry of Row 2 with Row 2−4(Row 1)\rowtwo{\text{Row } 2} - \rowone{4(\text{Row } 1)} (be careful to multiply all of Row 1 by −4\rowone{-4}, not just the first column, or you would leave the rest of Row 2 unchanged and get [010]\wrong{\begin{bmatrix} 0 & 1 & 0 \end{bmatrix}}):
EA=[100−410001][1−12410035]=[1−1205−8035]\displaystyle EA = \begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{-4} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \begin{bmatrix} \rowone{1} & \rowone{-1} & \rowone{2} \\ \rowtwo{4} & \rowtwo{1} & \rowtwo{0} \\ \rowthree{0} & \rowthree{3} & \rowthree{5} \end{bmatrix} = \begin{bmatrix} \rowone{1} & \rowone{-1} & \rowone{2} \\ \built{0} & \built{5} & \built{-8} \\ \rowthree{0} & \rowthree{3} & \rowthree{5} \end{bmatrix}
2

Find the inverses of E1=[100010−501]E_1 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -5 & 0 & 1 \end{bmatrix} and E2=[1000−40001]E_2 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & -4 & 0 \\ 0 & 0 & 1 \end{bmatrix} without row reduction by undoing the row operation each matrix performs.

Describe in words what E1E_1 does to Row 3 and what E2E_2 does to Row 2, then write the opposite operation for each.

The matrix E1E_1 subtracts 5\rowone{5} times Row 1 from Row 3, so E1−1E_1^{-1} adds 5\rowone{5} times Row 1 back to Row 3. The matrix E2E_2 scales Row 2 by −4\rowtwo{-4}, so E2−1E_2^{-1} divides Row 2 by −4\rowtwo{-4} (do not treat the diagonal scaling entry −4\rowtwo{-4} like an off-diagonal elimination entry and flip its sign to +4\wrong{+4}, which gives the wrong inverse [100040001]\wrong{\begin{bmatrix} 1 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 1 \end{bmatrix}}):
E1−1=[100010501],E2−1=[1000−140001]\displaystyle \begin{aligned} E_1^{-1} &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ \rowone{5} & 0 & \rowthree{1} \end{bmatrix}, \\[6pt] E_2^{-1} &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{-\frac{1}{4}} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \end{aligned}
3

Starting with a 3×33 \times 3 matrix AA, you first subtract 22 times Row 1 from Row 2 (E1E_1), and second subtract 33 times the new Row 2 from Row 3 (E2E_2). Write E1E_1 and E2E_2, write the product that performs both steps on AA in the correct order, and multiply the two elementary matrices into a single matrix MM that performs the two-step elimination at once.

Which elementary matrix acts on AA first, and which side must the second matrix go on to act on that result?

Applying R2←R2−2R1\rowtwo{R_2} \leftarrow \rowtwo{R_2} - \rowone{2R_1} and R3←R3−3R2\rowthree{R_3} \leftarrow \rowthree{R_3} - \rowtwo{3R_2} separately to II gives:
E1=[100−210001],E2=[1000100−31]\displaystyle \begin{aligned} E_1 &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ \rowone{-2} & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix}, \\[6pt] E_2 &= \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & \rowtwo{-3} & \rowthree{1} \end{bmatrix} \end{aligned}
Because E1E_1 acts on AA first and E2E_2 acts on E1AE_1A from the left, the product is E2E1AE_2E_1A. Multiplying M=E2E1\built{M} = \built{E_2E_1} subtracts 3\rowtwo{3} times Row 2 of E1E_1 from Row 3 of E1E_1 (writing the matrices in left-to-right order E1E2\wrong{E_1E_2} is a common mistake here, which misses how the new Row 2 is used to update Row 3 and gives [100−2100−31]\wrong{\begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & -3 & 1 \end{bmatrix}}):
M=E2E1=[1000100−31][100−210001]=[100−2106−31]\displaystyle \built{M} = \built{E_2E_1} = \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & \rowtwo{-3} & \rowthree{1} \end{bmatrix} \begin{bmatrix} \rowone{1} & \rowone{0} & \rowone{0} \\ \rowtwo{-2} & \rowtwo{1} & \rowtwo{0} \\ \rowthree{0} & \rowthree{0} & \rowthree{1} \end{bmatrix} = \begin{bmatrix} \rowone{1} & \rowone{0} & \rowone{0} \\ \rowtwo{-2} & \rowtwo{1} & \rowtwo{0} \\ \built{6} & \built{-3} & \built{1} \end{bmatrix}
4

Write the 3×33 \times 3 permutation matrix PP that moves Row 3 to Row 1, Row 1 to Row 2, and Row 2 to Row 3, and find its inverse P−1P^{-1}.

For each row of PP, pick the row of II that takes the needed old row.

Row 1 takes old Row 3 ([001]\begin{bmatrix} 0 & 0 & \rowthree{1} \end{bmatrix}), Row 2 takes old Row 1 ([100]\begin{bmatrix} \rowone{1} & 0 & 0 \end{bmatrix}), and Row 3 takes old Row 2 ([010]\begin{bmatrix} 0 & \rowtwo{1} & 0 \end{bmatrix}). To undo a three-row cycle, take the transpose P−1=PTP^{-1} = P^T (do not assume P−1=P\wrong{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):
P=[001100010],P−1=PT=[010001100]\displaystyle \begin{aligned} P &= \begin{bmatrix} 0 & 0 & \rowthree{1} \\ \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \end{bmatrix}, \\[6pt] P^{-1} = P^T &= \begin{bmatrix} 0 & \rowone{1} & 0 \\ 0 & 0 & \rowtwo{1} \\ \rowthree{1} & 0 & 0 \end{bmatrix} \end{aligned}
5

Row-reducing [A∣I][A \mid I] to [I∣A−1][I \mid A^{-1}] takes three steps: first swap Row 1 and Row 2 (P1P_1), second subtract 44 times Row 1 from Row 3 (E2E_2), and third scale Row 3 by 12\frac{1}{2} (E3E_3). Express A−1A^{-1} in terms of P1P_1, E2E_2, and E3E_3 and compute A−1A^{-1}.

Since E3E2P1A=IE_3E_2P_1A = I, apply those three row operations in order starting from II.

Chaining the three steps from the inside out gives E3E2P1A=IE_3E_2P_1A = I, so A−1=E3E2P1\built{A^{-1}} = \built{E_3E_2P_1} (do not invert the matrices into P1−1E2−1E3−1=[010100402]\wrong{P_1^{-1}E_2^{-1}E_3^{-1}} = \wrong{\begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 4 & 0 & 2 \end{bmatrix}}, which gives AA instead of A−1\built{A^{-1}}). Applying P1P_1, then E2E_2, and then E3E_3 to II in order (notice that after P1P_1 swaps Row 1 and Row 2, the new Row 1 is [010]\begin{bmatrix} \rowone{0} & \rowone{1} & \rowone{0} \end{bmatrix}, so subtracting 4\rowone{4} times Row 1 from Row 3 puts −4\rowone{-4} in Column 2, not Column 1 as in [010100−2012]\wrong{\begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ -2 & 0 & \tfrac{1}{2} \end{bmatrix}}):
A−1=E3E2P1=[1000100012][100010−401][010100001]=[0101000−212]\displaystyle \begin{aligned} & \built{A^{-1}} = \built{E_3E_2P_1} \\ &\quad = \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ 0 & 0 & \rowthree{\frac{1}{2}} \end{bmatrix} \begin{bmatrix} \rowone{1} & 0 & 0 \\ 0 & \rowtwo{1} & 0 \\ \rowone{-4} & 0 & \rowthree{1} \end{bmatrix} \\ &\qquad \begin{bmatrix} 0 & \rowtwo{1} & 0 \\ \rowone{1} & 0 & 0 \\ 0 & 0 & \rowthree{1} \end{bmatrix} \\ &\quad = \begin{bmatrix} \built{0} & \built{1} & \built{0} \\ \built{1} & \built{0} & \built{0} \\ \built{0} & \built{-2} & \built{\frac{1}{2}} \end{bmatrix} \end{aligned}
6

Row-reduce A=[13210]A = \begin{bmatrix} 1 & 3 \\ 2 & 10 \end{bmatrix} to II in three steps: eliminate the 22 below the first pivot (E1E_1), scale Row 2 to make the second pivot 11 (E2E_2), and eliminate the 33 above the second pivot (E3E_3). Write E1E_1, E2E_2, and E3E_3 so that E3E2E1A=IE_3E_2E_1A = I, and then factor AA as a product of three elementary matrices.

After finding the three operations that reduce AA to II, undo E3E_3, E2E_2, and E1E_1 on the left side starting with the outermost matrix E3E_3.

Subtracting 2\rowone{2} times Row 1 from Row 2 gives [1304]\begin{bmatrix} \rowone{1} & \rowone{3} \\ \built{0} & \built{4} \end{bmatrix}, scaling Row 2 by 14\rowtwo{\frac{1}{4}} gives [1301]\begin{bmatrix} \rowone{1} & \rowone{3} \\ \built{0} & \built{1} \end{bmatrix}, and subtracting 3\rowtwo{3} times Row 2 from Row 1 gives II:
E1=[10−21],E2=[10014],E3=[1−301]\displaystyle \begin{aligned} E_1 &= \begin{bmatrix} \rowone{1} & 0 \\ \rowone{-2} & \rowtwo{1} \end{bmatrix}, \\[6pt] E_2 &= \begin{bmatrix} \rowone{1} & 0 \\ 0 & \rowtwo{\frac{1}{4}} \end{bmatrix}, \\[6pt] E_3 &= \begin{bmatrix} \rowone{1} & \rowtwo{-3} \\ 0 & \rowtwo{1} \end{bmatrix} \end{aligned}
Solving E3E2E1A=IE_3E_2E_1A = I for AA reverses the order of the matrices and inverts each one (keeping the same order E3−1E2−1E1−1\wrong{E_3^{-1}E_2^{-1}E_1^{-1}} is a common mistake here, which multiplies to [251284]\wrong{\begin{bmatrix} 25 & 12 \\ 8 & 4 \end{bmatrix}} instead of [13210]\begin{bmatrix} \rowone{1} & \rowone{3} \\ \rowtwo{2} & \rowtwo{10} \end{bmatrix}):
A=E1−1E2−1E3−1=[1021][1004][1301]\displaystyle A = E_1^{-1}E_2^{-1}E_3^{-1} = \begin{bmatrix} \rowone{1} & 0 \\ \rowone{2} & \rowtwo{1} \end{bmatrix} \begin{bmatrix} \rowone{1} & 0 \\ 0 & \rowtwo{4} \end{bmatrix} \begin{bmatrix} \rowone{1} & \rowtwo{3} \\ 0 & \rowtwo{1} \end{bmatrix}