3.4  Elementary Matrices and Inverses

Gaussian elimination is a list of instructions: swap these rows, scale that one, add a multiple of one row to another. So far it lives outside algebra, as something we do to a matrix. This section turns every row operation into a matrix, so that “apply an operation” becomes “multiply on the left”. With that one observation the algorithm becomes a tool for proofs. We use it to prove the main theorem about invertible matrices, to show that a one-sided inverse of a square matrix is automatically two-sided, which Chapter 0 stated after Definition 0.9.13 but could not prove, and to compute inverses.

Throughout, F is a field, and we use the three elementary row operations of Definition 3.2.1 with their notation: the swap Ri↔Rj (i≠j), the scaling Ri→cRi (c nonzero), and the replacement Ri→Ri+cRj (i≠j, any c∈F).

3.4.1. Row operations are matrix multiplications

We have already seen one row operation disguised as a product. In Example (Row equivalence) of Chapter 0, multiplying A=(121250) on the left by E=(10−21) replaced row 2 by row 2 minus twice row 1, that is, it performed R2→R2−2R1. Look at E itself: it is what that same operation does to the identity matrix I2. This is no accident, and it deserves a name.

An elementary matrix is the identity matrix after one row operation.

Definition 3.4.1 (Elementary matrix)

Let m≥1. A matrix E∈Mm(F) is an elementary matrix if it is obtained from Im by performing exactly one elementary row operation. Writing Eij for the matrix unit (1 in entry (i,j), 0 elsewhere; see Example (Standard Bases)), the three kinds are:

  1. Pij, obtained by Ri↔Rj with i≠j: the identity with rows i and j swapped;
  2. Di(c)=diag(1,…,1,c,1,…,1), with c in position i, obtained by Ri→cRi with c≠0;
  3. Im+cEij, obtained by Ri→Ri+cRj with i≠j and c∈F: the identity with an extra c in entry (i,j).

In words: start from Im, do one operation, and record the result. The size m is the number of rows of the matrices we plan to operate on. Type 3 puts c in row i, column j: the row that changes is i, and the row that gets copied is j.

Examples. In M3(F), P13=(001010100),D2(5)=(100050001),I3−3E31=(100010−301) come from R1↔R3, R2→5R2 (over a field where 5≠0), and R3→R3−3R1. The degenerate case is worth a look: D1(1)=Im is elementary, since “multiply row 1 by 1” is a legal operation, and so is Im+0E12. The identity is an elementary matrix. For m=1 the elementary matrices are exactly the 1×1 matrices (c) with c≠0, since there are no two distinct rows to swap or combine.

Nonexample by minimal change. Change c=5 in D2(5) to c=0. The matrix diag(1,0,1) is still diagonal and still differs from I3 in one entry, but “multiply row 2 by 0” is not an elementary row operation: the clause c≠0 fails. Likewise (001100010) is a rearrangement of the rows of I3, but every one of its rows has moved, and a single swap moves only two rows. So it is not elementary. It is, however, the product P12P23 of two elementary matrices, as Exercise A1 at the end of this section checks.

The whole point of the definition is the next theorem. To perform a row operation on any matrix, multiply on the left by what that operation does to the identity.

Theorem 3.4.1 (Row operations are left multiplications)

Let ρ be an elementary row operation on matrices with m rows, and let E=ρ(Im) be the corresponding elementary matrix. Then for every n≥1 and every A∈Mm×n(F), ρ(A)=EA.

Idea. Each operation builds every new row as a combination of the old rows, with coefficients that do not depend on the matrix: for Ri→Ri+cRj, new row i is 1⋅(row i)+c⋅(row j), and every other row is copied. Feed in Im, whose rows are the standard row vectors, and the coefficients appear as the entries of E. Then the row view of a product says EA forms exactly those combinations of the rows of A.

Proof. Let r1,…,rm be the rows of A, and write el⊤ for the l-th row of Im. By Definition 3.2.1, for each k there are scalars ck1,…,ckm, depending on ρ but not on A, such that row k of ρ(A) is ck1r1+⋯+ckmrm. Explicitly, every row that the operation does not touch has ckk=1 and all other ckl=0, and the touched rows are:

  • for Ri↔Rj: row i is rj and row j is ri;
  • for Ri→cRi: row i is cri;
  • for Ri→Ri+cRj: row i is ri+crj.

Applying ρ to Im, row k of E is ck1e1⊤+⋯+ckmem⊤=(ck1⋯ckm). So the (k,l)-entry of E is ckl. By Theorem 0.9.2 (rows), row k of EA is (row k of E)A, and by Theorem 0.9.3 (rows version) this equals ck1r1+⋯+ckmrm, which is row k of ρ(A). Since every row agrees, ρ(A)=EA. This proves the theorem.

So a sequence of operations ρ1,ρ2,…,ρk, performed in that order, turns A into ρk(⋯ρ2(ρ1(A))⋯)=Ek⋯E2E1A,Ei=ρi(Im), by applying the theorem k times and using associativity. The whole of Gaussian elimination is a single matrix Ek⋯E1 standing on the left.

Warning. The first operation stands rightmost. Doing R1↔R2 and then R1→R1+R2 on I2 gives (I2+E12)P12=(1110), while the product in the other order is P12(I2+E12)=(0111). Also, multiplying by E on the right performs a column operation: A(I2+E12) adds column 1 to column 2, and column operations change solution sets.

Example (Three operations, three products)

Let A=(120134)∈M3×2(R). Compute P13A, D2(5)A and (I3−3E31)A, and check that each is the result of the corresponding row operation.

Solution. By the row view, row k of EA is the combination of the rows of A whose weights are row k of E.

  • Rows of P13 are e3⊤,e2⊤,e1⊤, so P13A=(340112): rows 1 and 3 are swapped.
  • Row 2 of D2(5) is 5e2⊤, so D2(5)A=(120534): row 2 is multiplied by 5.
  • Row 3 of I3−3E31 is (−301), so row 3 of the product is −3(1,2)+(3,4)=(0,−2), and (I3−3E31)A=(12010−2): this is R3→R3−3R1.

In each case the product agrees with the operation, as Theorem 3.4.1 predicts.

Quick check. Which 3×3 elementary matrix performs R2→R2+4R3? Which operation undoes it, and what is its matrix?

Solution. Apply the operation to I3: row 2 becomes e2⊤+4e3⊤, so the matrix is I3+4E23, with 4 in entry (2,3). The operation R2→R2−4R3 undoes it, since row 3 is unchanged by both; its matrix is I3−4E23.

Every row operation can be undone by another row operation, and the matching statement for matrices is:

Theorem 3.4.2 (Elementary matrices are invertible)

Every elementary matrix is invertible, and its inverse is an elementary matrix of the same kind: Pij−1=Pij,Di(c)−1=Di(c−1),(Im+cEij)−1=Im−cEij(i≠j).

Proof. Let E=ρ(Im), and let ρ′ be the operation on the same line of the display: ρ′=ρ for a swap, Ri→c−1Ri for Ri→cRi (legal, since c≠0 gives c−1≠0), and Ri→Ri−cRj for Ri→Ri+cRj. In each case ρ′(ρ(A))=A and ρ(ρ′(A))=A for every A, as in Theorem 3.2.2 (a): swapping twice restores the order; scaling by c and c−1 multiplies row i by cc−1=1; and adding crj and then −crj to row i restores row i, because i≠j means row j is not changed in between. Let E′=ρ′(Im). By Theorem 3.4.1, E′E=ρ′(E)=ρ′(ρ(Im))=ImandEE′=ρ(E′)=ρ(ρ′(Im))=Im. Hence E is invertible with E−1=E′, which is the matrix in the display. This proves the theorem.

The hypothesis i≠j did real work: “add c times row i to row i” is scaling by 1+c, which destroys row i when c=−1 and cannot be undone. That is why Definition 3.2.1 excludes it.

3.4.2. The invertible matrix theorem

Chapter 0 defined an invertible matrix by the existence of a two-sided inverse, and gave only one practical test, ad−bc≠0, for 2×2 matrices (Theorem 0.9.8). For larger matrices, searching for B with AB=BA=In directly is hopeless. What we want is a list of conditions, each of which we can check by a method we already have, that are all equivalent to invertibility. Then we may test whichever is cheapest.

We need one small fact about square matrices in reduced form.

Lemma 3.4.3 (Square reduced matrices)

Let R∈Mn(F) be in reduced row echelon form. Then either R=In, or the last row of R is zero.

Proof. Suppose the last row of R is not zero. Since zero rows of a matrix in echelon form come after all nonzero rows (Definition 3.2.3), no row of R is zero, so each of the n rows has a pivot. Let the pivot of row k be in column ck. Pivots move strictly to the right as we go down, so 1≤c1<c2<⋯<cn≤n. A strictly increasing list of n integers in {1,…,n} must be 1,2,…,n, so ck=k. By Definition 3.2.4, each pivot equals 1 and is the only nonzero entry of its column, so column k of R is ek for every k. Hence R=In.

Here is the theorem. It collects, for a square matrix, facts about solving systems, about row reduction, and about the columns as vectors in the sense of Chapter 1.

Theorem 3.4.4 (Invertible Matrix Theorem)

Let A∈Mn(F), with columns a1,…,an∈Fn. The following are equivalent.

  • (a) A is invertible.
  • (b) The homogeneous system Ax=0 has only the trivial solution x=0.
  • (c) The reduced row echelon form of A is In.
  • (d) A is a product of elementary matrices.
  • (e) For every b∈Fn, the system Ax=b has a solution.
  • (f) The columns (a1,…,an) are linearly independent.
  • (g) The columns (a1,…,an) span Fn.
  • (h) The columns (a1,…,an) form a basis of Fn.

Idea. Eight conditions would need 56 implications if proved pairwise; a cycle through them needs far fewer. The plan:

① the core cycle (a) ⇒ (b) ⇒ (c) ⇒ (d) ⇒ (a), where each arrow uses one earlier tool (cancel by A−1; row reduction; elementary matrices; products of invertible matrices);

② (b) ⇔ (f), which is the column view Ax=x1a1+⋯+xnan;

③ (f) ⇔ (h) ⇔ (g), which is “count instead of check” in the n-dimensional space Fn;

④ (g) ⇔ (e), which is “consistent means b is in the column span”.

The only arrow that needs a new argument is (b) ⇒ (c); the others quote a result we already have. An RREF that is not In has a zero row, so it really has fewer equations than unknowns, and such a homogeneous system has a nontrivial solution.

Proof. (a) ⇒ (b). Suppose A is invertible and Ax=0. Multiplying on the left by A−1 and using Theorem 0.9.4, x=(A−1A)x=A−1(Ax)=A−10=0.

(b) ⇒ (c). Suppose (b) holds. By Theorem 3.2.3, A is row equivalent to a matrix R in reduced row echelon form, and R is the RREF of A by Theorem 3.3.4. By Lemma 3.3.1, Rx=0 has the same solutions as Ax=0, so it too has only the trivial solution. Suppose, for a contradiction, that R≠In. By Lemma 3.4.3, the last row of R is zero. If n=1, then R=O1 and x=(1) is a nontrivial solution. If n≥2, the last equation of Rx=0 reads 0=0, so Rx=0 has the same solutions as the homogeneous system R′x=0 formed by the first n−1 rows. That system has n−1 equations in n>n−1 unknowns, so by Corollary 3.2.5 it has a nontrivial solution. Either way we contradict (b). Hence R=In.

(c) ⇒ (d). Suppose the RREF of A is In. By Definition 3.2.2 there are row operations ρ1,…,ρk taking A to In. If k=0, then A=In=D1(1) is elementary. Otherwise, with Ei=ρi(In), Theorem 3.4.1 gives Ek⋯E1A=In. Each Ei is invertible by Theorem 3.4.2, so multiplying on the left by Ek−1, then Ek−1−1, and so on, gives A=E1−1E2−1⋯Ek−1, and each Ei−1 is elementary by Theorem 3.4.2.

(d) ⇒ (a). Suppose A=E1⋯Ek with each Ei elementary and k≥1. Each Ei is invertible by Theorem 3.4.2, and a product of two invertible matrices is invertible by Theorem 0.9.7 (part 3). By induction on k, A is invertible.

So far (a), (b), (c), (d) are equivalent.

(b) ⇔ (f). By Theorem 0.9.3, Ax=x1a1+⋯+xnan. So “Ax=0 only for x=0” says exactly that x1a1+⋯+xnan=0 forces x1=⋯=xn=0, which is Definition 1.4.1 for the columns.

(f) ⇔ (h) ⇔ (g). The columns form a list of exactly n vectors in Fn, and dim⁡Fn=n (Example (Dimensions of the Running Examples)). By Theorem 1.6.4, such a list is a basis if it is linearly independent, and also if it spans. Conversely a basis is independent and spanning by Definition 1.5.1. Hence (f) ⇒ (h) ⇒ (g) ⇒ (h) ⇒ (f).

(g) ⇔ (e). By Theorem 3.1.1, Ax=b has a solution if and only if b∈span(a1,…,an). So (e) says every b∈Fn lies in this span, that is, Fn⊆span(a1,…,an). The reverse inclusion always holds, so (e) is equivalent to (g).

Combining the four parts, all eight conditions are equivalent. This proves the theorem.

In practice the theorem is a menu. To show a matrix is invertible, pick the most convenient item, very often (b): take a solution of Ax=0 and show it is 0. To show a matrix is not invertible, exhibit one nonzero solution of Ax=0, or one linear relation among the columns. The list grows in both directions. Chapter 2 has already given the operator form of it, in terms of kernels and images (Theorem 2.5.7), and later chapters add determinants in Chapter 7, eigenvalues in Chapter 9, and positive definiteness and singular values in Chapter 13.

Quick check. Is A=(123011134)∈M3(R) invertible? Use whichever item of Theorem 3.4.4 is quickest.

Solution. No. The third column is the sum of the first two: (1,0,1)+(2,1,3)=(3,1,4). So a1+a2−a3=0 is a linear relation with coefficients not all zero, item (f) fails, and hence (a) fails. Equivalently, x=(1,1,−1) is a nontrivial solution of Ax=0.

Warning. The theorem is about square matrices. For A=(101011)∈M2×3(R), the columns span R2 (the first two are e1,e2), so (g) holds, but x=(1,1,−1) solves Ax=0, so (b) fails. The proof of (f) ⇔ (g) used that the number of columns equals dim⁡Fn, and that is exactly what breaks.

3.4.3. One-sided inverses are two-sided

Chapter 0 left a gap on purpose. The definition of invertibility (Definition 0.9.13) asks for both AB=In and BA=In. Chapter 0 then stated that, for square matrices, the first equation already implies the second, but that nothing there could prove it: the entries of AB and BA are different sums. Now we can prove it, and the proof uses the menu above instead of entries.

Theorem 3.4.5 (One-sided inverses of square matrices)

Let A,B∈Mn(F). If AB=In, then BA=In. Hence A and B are both invertible, B=A−1 and A=B−1.

Idea. We cannot touch BA directly, so we aim at invertibility of one factor instead. Which one? From AB=In, a vector killed by B is killed by AB=In, so it is 0. That is item (b) for B. Once B−1 exists, we may cancel it: A=(AB)B−1=B−1.

Proof. Suppose AB=In, and let x∈Fn with Bx=0. Then, by Theorem 0.9.4, x=Inx=(AB)x=A(Bx)=A0=0. So Bx=0 has only the trivial solution, and B is invertible by Theorem 3.4.4 ((b) ⇒ (a)). Multiplying AB=In on the right by B−1 and using associativity, A=A(BB−1)=(AB)B−1=InB−1=B−1. Therefore BA=BB−1=In. Since A=B−1 is invertible with inverse B by Theorem 0.9.7 (part 2), we get A−1=B. This proves the theorem.

By symmetry, BA=In also implies AB=In: apply the theorem with the roles of A and B swapped. So from now on, to verify that B is the inverse of a square matrix A, one product suffices. We also get a useful consequence of the same kind: if A,B∈Mn(F) and AB is invertible, then A and B are invertible (Exercise B3 at the end of this section).

Warning. For nonsquare matrices a one-sided inverse need not be two-sided. Let A=(100010),B=(100100). Then AB=I2, but BA=diag(1,1,0)≠I3. In fact no C∈M3×2(F) has CA=I3: Ae3=0, so CAe3=0≠e3=I3e3. The proof above breaks because Bx=0⇒x=0 no longer gives invertibility: B is not square, so Theorem 3.4.4 does not apply.

3.4.4. Computing the inverse

Theorem 3.4.4 (c) says A is invertible exactly when it row reduces to In. The proof of (c) ⇒ (d) even produced a matrix: if Ek⋯E1A=In, then Ek⋯E1 is a left inverse, hence the inverse by Theorem 3.4.5. We do not want to multiply out the Ei by hand. The trick is to let the operations act on In at the same time as on A: since Ek⋯E1In=Ek⋯E1, the operations that turn A into In turn In into A−1. We write [A∣In] for the n×2n matrix whose first n columns are those of A and whose last n columns are those of In.

Algorithm. Input: A∈Mn(F).

  1. Form the n×2n matrix [A∣In].
  2. Row reduce it to reduced row echelon form [R∣C], with R,C∈Mn(F).
  3. If R=In, output A−1=C. Otherwise, output “A is not invertible”.

In practice, stop as soon as a zero row appears in the left half: A is then not invertible (see the remark after the theorem).

Theorem 3.4.6 (Inverse by row reduction)

Let A∈Mn(F), and let [R∣C] be the reduced row echelon form of [A∣In], with R,C∈Mn(F). Then R is the reduced row echelon form of A. Consequently, A is invertible if and only if R=In, and in that case A−1=C.

Idea. Two things need checking. First, the operations act on the two halves independently, so the left half is transformed exactly as A alone would be. Second, the left half of a reduced matrix is itself reduced, so it really is the RREF of A. The first is the column view of a product; the second is a small check on the staircase shape. After that, R=EA and C=EIn=E, and Theorem 3.4.5 finishes.

Proof. Let ρ1,…,ρk be row operations taking [A∣In] to [R∣C], and put E=Ek⋯E1 with Ei=ρi(In) (and E=In if k=0). By Theorem 3.4.1, [R∣C]=E[A∣In]. By Theorem 0.9.2 (columns), each column of E[A∣In] is E times the corresponding column, so R=EAandC=EIn=E.

Claim. R is in reduced row echelon form.

Proof. If row k of R is nonzero, its first nonzero entry is also the first nonzero entry of row k of [R∣C], so the pivots of the nonzero rows of R are pivots of [R∣C], in the same positions. Suppose row k of R is zero but some later row l>k of R is nonzero. Row k of [R∣C] cannot be zero, since zero rows of [R∣C] come after its nonzero rows and row l is nonzero. So its pivot lies in a column >n, while the pivot of row l lies in a column ≤n, to the left: this contradicts the staircase condition of Definition 3.2.3. Hence the zero rows of R come last, the pivots of R move strictly right, and each pivot of R is 1 and the only nonzero entry in its column, because this holds in [R∣C]. So R satisfies Definition 3.2.4.

Now R=Ek⋯E1A is obtained from A by the operations ρ1,…,ρk (Theorem 3.4.1), so A is row equivalent to R, and R is in reduced form. By Theorem 3.3.4, R is the RREF of A. By Theorem 3.4.4 ((a) ⇔ (c)), A is invertible if and only if R=In. If R=In, then EA=In, and Theorem 3.4.5 gives A−1=E=C. This proves the theorem.

Remark. The early stop is justified the same way. If, after some operations, [A∣In] has become [A′∣E′] with a zero row in A′, then, exactly as in the proof, E′ is the product of the elementary matrices of the operations used so far and A′=E′A. So E′ is invertible by Theorem 3.4.2 and Theorem 0.9.7 (part 3). A matrix with a zero row k is not invertible, since row k of A′X is zero for every X, so A′X≠In. If A were invertible, A′=E′A would be invertible by Theorem 0.9.7 (part 3). Hence A is not invertible.

Example (A 3×3 inverse)

Find the inverse of A=(121253133)∈M3(R), or show that it does not exist.

Solution. Row reduce [A∣I3], naming each operation. [121100253010133001]→R3→R3−R1R2→R2−2R1[121100011−210012−101]→R3→R3−R2[121100011−2100011−11] The left half now has three pivots, so no zero row will appear. Clear above the pivots, from the bottom up: →R1→R1−R3R2→R2−R3[12001−1010−32−10011−11]→R1→R1−2R2[1006−31010−32−10011−11]. The left half is I3, so by Theorem 3.4.6 A is invertible and A−1=(6−31−32−11−11). Check one product: row 1 of A times the columns of A−1 gives 6−6+1=1, −3+4−1=0, 1−2+1=0; rows 2 and 3 give (0,1,0) and (0,0,1) in the same way. So AA−1=I3, and by Theorem 3.4.5 this single product is enough.

Example (When the algorithm stops)

Decide whether A=(123257134)∈M3(R) is invertible.

Solution. Row reduce [A∣I3]: [123100257010134001]→R3→R3−R1R2→R2−2R1[123100011−210011−101]→R3→R3−R2[123100011−2100001−11]. A zero row has appeared in the left half, so by the remark after Theorem 3.4.6, A is not invertible. The right half of that row is not wasted: it records the combination of rows that produced zero. Row 3 of the left half is 1⋅(row 1)−1⋅(row 2)+1⋅(row 3) of A, and indeed (1,2,3)−(2,5,7)+(1,3,4)=(0,0,0).

Finally, the method writes an invertible matrix as a product of elementary matrices, as in Theorem 3.4.4 (d).

Example (Factoring into elementary matrices)

Write A=(2153)∈M2(R) as a product of elementary matrices, and read off A−1.

Solution. Reduce A to I2, keeping integers: (2153)→R2→R2−2R1(2111)→R1→R1−R2(1011)→R2→R2−R1(1001). The elementary matrices of these operations are E1=I2−2E21, E2=I2−E12, E3=I2−E21, and by Theorem 3.4.1, E3E2E1A=I2. Multiplying on the left by E3−1, then E2−1, then E1−1, and using Theorem 3.4.2, A=E1−1E2−1E3−1=(1021)(1101)(1011). Multiplying out confirms it: the last two factors give (2111), and then the first factor adds twice row 1 to row 2, giving (2153). Also E3E2E1 is a left inverse of A, hence A−1 by Theorem 3.4.5: A−1=E3E2E1=(3−1−52), which agrees with Theorem 0.9.8, since ad−bc=1. The factorization is not unique: a different sequence of operations gives different factors.

3.4.5. Permutation matrices

A row swap is one elementary matrix. Doing several of them in a row is not, but the product is still a matrix of a single recognizable kind, and it is worth naming here because it turns up far beyond this chapter: it is how a relabeling of coordinates becomes a matrix.

Definition 3.4.2 (Permutation matrix)

Let σ∈Sn be a permutation of {1,…,n}. The permutation matrix of σ is Pσ=(eσ(1)eσ(2)⋯eσ(n))∈Mn(F), the matrix whose j-th column is eσ(j). A matrix is a permutation matrix if it equals Pσ for some σ∈Sn.

Equivalently, a permutation matrix has exactly one 1 in each row and in each column, and zeros elsewhere. The identity is Pid, and (0110) is Pτ for the transposition τ=(1 2), which is also the elementary matrix P12. By contrast (1101) is not a permutation matrix: each column is still nonzero, but its first row contains two 1’s, and its second column (1,1) is not a standard basis vector.

Lemma 3.4.7 (Permutation matrices)

Let σ,τ∈Sn.

  • (a) PσPτ=Pσ∘τ. In particular a product of permutation matrices is a permutation matrix.
  • (b) Pσ is invertible and Pσ−1=Pσ⊤.
  • (c) If τ=(r s) is a transposition, then Pτ is the elementary matrix Prs that swaps rows r and s, and Pτ2=I.

Proof.

  • (a) By Theorem 0.9.3, Pτej=eτ(j) and so PσPτej=Pσeτ(j)=eσ(τ(j)). So the j-th column of PσPτ is e(σ∘τ)(j), for every j, which is the claim.

  • (b) By Theorem 0.9.2, (Pσ⊤Pσ)ij=eσ(i)⊤eσ(j), which is 1 if σ(i)=σ(j) and 0 otherwise. Since σ is injective, σ(i)=σ(j) exactly when i=j. Hence Pσ⊤Pσ=I, and by Theorem 3.4.5, Pσ is invertible with inverse Pσ⊤.

  • (c) Swapping rows r and s of I produces a matrix whose column r is es, whose column s is er, and whose other columns j are ej. These are the columns eτ(j), so the swap matrix is Pτ. Since τ∘τ=id, part (a) gives Pτ2=Pid=I. This proves the lemma.

By (c) and Theorem 3.4.1, PτA is A with rows r and s swapped, and by (a) every permutation matrix is a product of such swaps applied in turn, since for n≥2 every permutation is a product of transpositions (Theorem 0.10.4). So PσA is always A with its rows rearranged.

3.4.6. Row equivalence, revisited

Two descriptions of “row equivalent” are now on the table. Example (Row equivalence) of Chapter 0 said B=EA for some invertible E. Definition 3.2.2 says B is reachable from A by finitely many row operations. Chapter 0 promised that they agree, and now it is one line each way.

Theorem 3.4.8 (Row equivalence is left multiplication by an invertible matrix)

Let A,B∈Mm×n(F). Then A is row equivalent to B (that is, B can be reached from A by row operations) if and only if B=EA for some invertible E∈Mm(F).

Proof. (⇒) Suppose row operations ρ1,…,ρk take A to B. By Theorem 3.4.1, B=Ek⋯E1A with Ei=ρi(Im), and E=Ek⋯E1 is invertible by Theorem 3.4.2 and Theorem 0.9.7 (part 3). (If k=0, take E=Im.)

(⇐) Suppose B=EA with E invertible. By Theorem 3.4.4 ((a) ⇒ (d)), E=Ek⋯E1 for some elementary matrices Ei. Let ρi be the operation with ρi(Im)=Ei. By Theorem 3.4.1, performing ρ1, then ρ2, …, then ρk on A produces Ek⋯E1A=B. Hence A is row equivalent to B.

So the equivalence relation of Example (Row equivalence) is the one Gaussian elimination moves along, and “two matrices have the same RREF” is the same as “each is an invertible matrix times the other”. In the next section this form, B=EA, is what makes row spaces and ranks easy to compare.

3.4.7. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define an elementary matrix, and write down the 3×3 elementary matrix that performs R3→R3+7R1.
  • (b) State four of the conditions in Theorem 3.4.4.
  • (c) True or false: the product of two elementary matrices is always an elementary matrix. Justify your answer.
  • (d) True or false: if A∈M2×3(F), B∈M3×2(F) and AB=I2, then BA=I3. Justify your answer.
  • (e) True or false: if A∈Mn(F) and Ax=ej has a solution for each j=1,…,n, then A is invertible. Justify your answer.
  • (f) Describe the method for computing the inverse of a square matrix, and how it detects a matrix that is not invertible.

Solution.

  • (a) An elementary matrix in Mm(F) is one obtained from Im by exactly one elementary row operation (Definition 3.4.1). Applying R3→R3+7R1 to I3 gives I3+7E31=(100010701).
  • (b) For A∈Mn(F), each of the following is equivalent to A being invertible: Ax=0 has only the trivial solution; the RREF of A is In; A is a product of elementary matrices; the columns of A form a basis of Fn.
  • (c) False. A single row operation changes at most two rows of I3 (a swap changes two, a scaling or an addition changes one), so every elementary 3×3 matrix has at least one row equal to the corresponding row of I3. But P12P23=(001100010) (by the row view, its rows are rows 2, 1, 3 of P23) differs from I3 in every row. Hence it is a product of two elementary matrices that is not elementary.
  • (d) False. With A=(100010) and B=(100100), AB=I2 but BA=diag(1,1,0)≠I3. Theorem 3.4.5 needs square matrices.
  • (e) True. Let xj solve Axj=ej, and let B have columns x1,…,xn. By Theorem 0.9.2, AB has columns e1,…,en, so AB=In, and A is invertible by Theorem 3.4.5.
  • (f) Row reduce [A∣In] to reduced form [R∣C]. If R=In, then A−1=C; if R≠In, in particular if a zero row appears in the left half at any stage, A is not invertible (Theorem 3.4.6).

B. Practice

Exercise (B1: Inverses by row reduction)

For each matrix, find the inverse or show that it is not invertible.

  • (a) A=(102213418)∈M3(R).
  • (b) B=(12−101125−1)∈M3(R).
  • (c) C=(110011111)∈M3(F2).

Solution.

  • (a) Row reduce [A∣I3]: [102100213010418001]→R3→R3−4R1R2→R2−2R1[10210001−1−210010−401]→R3→R3−R2[10210001−1−210001−2−11] →R1→R1−2R3R2→R2+R3[10052−2010−401001−2−11]. The left half is I3, so by Theorem 3.4.6, A−1=(52−2−401−2−11). Check: row 1 of A against the columns of A−1 gives 5−4=1, 2−2=0, −2+2=0, and rows 2 and 3 give (0,1,0) and (0,0,1), so AA−1=I3, which suffices by Theorem 3.4.5.
  • (b) Row reduce [B∣I3]: [12−110001101025−1001]→R3→R3−2R1[12−1100011010011−201]→R3→R3−R2[12−1100011010000−2−11]. A zero row appears in the left half, so B is not invertible (remark after Theorem 3.4.6). The right half of that row says −2(row 1)−(row 2)+(row 3)=0, that is, row 3 of B is 2(row 1)+(row 2).
  • (c) Over F2 we have −1=1, so subtracting a row is adding it. Row reduce [C∣I3]: [110100011010111001]→R3→R3+R1[110100011010001101]→R2→R2+R3[110100010111001101]→R1→R1+R2[100011010111001101]. Hence C−1=(011111101). Check in F2: row 1 of C is (1,1,0), and against the columns of C−1 it gives 0+1=1, 1+1=0, 1+1=0; rows 2 and 3 give (0,1,0) and (0,0,1) similarly.
Exercise (B2: A product of elementary matrices)

Let A=(1325)∈M2(R).

  • (a) Write A as a product of elementary matrices.
  • (b) Hence write A−1 as a product of elementary matrices, and compute it.

Solution.

  • (a) Reduce A to I2: (1325)→R2→R2−2R1(130−1)→R2→−R2(1301)→R1→R1−3R2(1001). With E1=I2−2E21, E2=D2(−1), E3=I2−3E12, Theorem 3.4.1 gives E3E2E1A=I2. Multiplying on the left by E3−1,E2−1,E1−1 in turn and using Theorem 3.4.2, A=E1−1E2−1E3−1=(1021)(100−1)(1301). Check: the last two factors give (130−1), and adding twice row 1 to row 2 gives (1325).
  • (b) Since E3E2E1A=I2, Theorem 3.4.5 gives A−1=E3E2E1=(1−301)(100−1)(10−21)=(−532−1). (The last two factors give (102−1), and R1→R1−3R2 then gives the answer.) This agrees with Theorem 0.9.8, since ad−bc=−1.
Exercise (B3: Invertible products)

Let A,B∈Mn(F), and suppose AB is invertible. Prove that A and B are both invertible.

Solution. Let C=(AB)−1. Then A(BC)=(AB)C=In by associativity, so A has the right inverse BC, and by Theorem 3.4.5 A is invertible. Similarly (CA)B=C(AB)=In, so B has the left inverse CA. By Theorem 3.4.5 with the roles of the two matrices swapped (CA times B is In), B is invertible. This proves the claim.

C. Going deeper

Exercise (C1: Triangular matrices)

Let U=(uij)∈Mn(F) be upper triangular (Definition 0.9.5).

  • (a) Prove that U is invertible if and only if uii≠0 for every i.
  • (b) Prove that if U is invertible, then U−1 is upper triangular.

Hint: for (a), use item (b) or item (f) of Theorem 3.4.4; for (b), consider the systems Ux=ek.

Solution.

  • (a) (⇐) Suppose every uii≠0, and let Ux=0. Row i of this system reads uiixi+ui,i+1xi+1+⋯+uinxn=0, since uij=0 for j<i. We show xn=xn−1=⋯=x1=0 by downward induction. Row n is unnxn=0, and unn≠0, so xn=0. If xi+1=⋯=xn=0, row i becomes uiixi=0, so xi=0 since uii≠0. Hence x=0, and U is invertible by Theorem 3.4.4 ((b) ⇒ (a)).

    (⇒) Suppose ukk=0 for some k. Every column j≤k of U has zero entries in rows k,k+1,…,n: below the diagonal by triangularity, and in row k of column k by assumption. So the k columns u1,…,uk all lie in span(e1,…,ek−1), a subspace of dimension k−1 (its spanning list is a sub-list of the standard basis, hence independent). By Theorem 1.6.3 (a), a list of k>k−1 vectors there is linearly dependent. A nontrivial relation among u1,…,uk, extended by zero coefficients on uk+1,…,un, is a nontrivial relation among all the columns. So the columns of U are dependent, and U is not invertible by Theorem 3.4.4 ((a) ⇒ (f)). (For k=1, the span is {0} and u1=0, so the same conclusion holds.)

  • (b) Suppose U is invertible, so every uii≠0 by (a). Fix k, and let x be the k-th column of U−1. By Theorem 0.9.2, Ux is the k-th column of UU−1=In, so Ux=ek. For i>k, row i of this system reads uiixi+⋯+uinxn=0. By the same downward induction as in (a), running only over i=n,n−1,…,k+1, we get xn=⋯=xk+1=0. So the k-th column of U−1 has zeros below position k. As k was arbitrary, U−1 is upper triangular.

Exercise (C2: All right inverses)

Let A=(101011)∈M2×3(R).

  • (a) Find all B∈M3×2(R) with AB=I2.
  • (b) Show that there is no C∈M3×2(R) with CA=I3.

Solution.

  • (a) By Theorem 0.9.2, AB=I2 means that the columns b1,b2 of B satisfy Ab1=e1 and Ab2=e2. The matrix A is already in reduced form with pivots in columns 1 and 2 and x3 free, so Ax=0 means x1=−x3, x2=−x3, and its solutions are the multiples of (−1,−1,1). One solution of Ax=e1 is (1,0,0), and one solution of Ax=e2 is (0,1,0). By Theorem 3.1.3, b1=(1,0,0)+s(−1,−1,1),b2=(0,1,0)+t(−1,−1,1)(s,t∈R). Hence the right inverses of A are exactly B=(1−s−t−s1−tst),s,t∈R, infinitely many of them.
  • (b) Suppose CA=I3, and let x=(−1,−1,1), so Ax=0. Then x=I3x=C(Ax)=C0=0, a contradiction since x≠0. Hence A has no left inverse.
Exercise (C3: Nilpotent perturbations of the identity)

Let A∈Mn(F) and suppose Ak=O for some integer k≥1.

  • (a) Prove that In+A is invertible, by using item (b) of Theorem 3.4.4.
  • (b) Verify that (In+A)(In−A+A2−⋯+(−1)k−1Ak−1)=In, and deduce a formula for (In+A)−1.

Solution.

  • (a) Let x∈Fn with (In+A)x=0. Then Ax=−x. Multiplying on the left by A and using this again, A2x=A(−x)=−Ax=(−1)2x, and inductively Ajx=(−1)jx for every j≥1. Taking j=k, 0=Akx=(−1)kx, so x=0 (multiply by (−1)k). By Theorem 3.4.4 ((b) ⇒ (a)), In+A is invertible.
  • (b) Expanding with Theorem 0.9.4, (In+A)∑j=0k−1(−1)jAj=∑j=0k−1(−1)jAj+∑j=0k−1(−1)jAj+1=In+(−1)k−1Ak=In, since the terms (−1)jAj for 1≤j≤k−1 in the first sum cancel against the terms (−1)j−1Aj of the second, and Ak=O. By Theorem 3.4.5, (In+A)−1=In−A+A2−⋯+(−1)k−1Ak−1.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.