Theorem 2.5 provides not only a method for determining whether a matrix is invert- ible, but also a method for actually calculating the inverse when it exists. We know that we can transform any n×n matrix A into a matrix R in reduced row echelon form by means of elementary row operations. Applying the same operations to the n×2n matrix [A In] transforms this matrix into an n×2n matrix [R B] for some n×n matrix B. Hence there is an invertible matrix P such thatP[A In]=[R B].
Thus
[R B]=P[A In]=[PA PIn]=[PA P].
It follows thatPA=R, andP =B. IfR=In, then we know thatAis not invertible by Theorem 2.5. On the other hand, ifR=In, thenAis invertible, again by Theorem 2.5.
Furthermore, sincePA=In and P =B, it follows that B =A−1. Thus we have the following algorithm for computing the inverse of a matrix:
Algorithm for Matrix Inversion
Let A be an n×n matrix. Use elementary row operations to transform [A In] into the form [R B], where R is a matrix in reduced row echelon form. Then either
(a)R=In, in which caseAis invertible andB =A−1; or (b) R=In, in which caseAis not invertible.
Example 2 We use the algorithm for matrix inversion to computeA−1for the invertible matrixA of Example 1. This algorithm requires us to transform [A I3] into a matrix of the form [I3 B] by means of elementary row operations. For this purpose, we use the Gaussian elimination algorithm in Section 1.4 to transformAinto its reduced row echelon form I3, while applying each row operation to the entire row of the 3×6 matrix.
[A I3]=
1 2 3 1 0 0
2 5 6 0 1 0 3 4 8 0 0 1
−2r1+r2→r2
−3r1+r3→r3
1 2 3 1 0 0
0 1 0 −2 1 0 0 −2 −1 −3 0 1
2r2+r3→r3
1 2 3 1 0 0
0 1 0 −2 1 0
0 0 −1 −7 2 1
−r3→r3
1 2 3 1 0 0
0 1 0 −2 1 0
0 0 1 7 −2 −1
−3r3+r1→r1
1 2 0 −20 6 3
0 1 0 −2 1 0
0 0 1 7 −2 −1
−2r2+r1→r1
1 0 0 −16 4 3
0 1 0 −2 1 0
0 0 1 7 −2 −1
=[I3 B]
Thus
A−1=B =
−16 4 3
−2 1 0
7 −2 −1
.
In the context of the preceding discussion, if [R B] is in reduced row echelon form, then so isR. (See Exercise 73.) This observation is useful if there is a calculator or computer available that can produce the reduced row echelon form of a matrix. In such a case, we simplyfind the reduced row echelon form [R B] of [A In]. Then, as before, either
(a)R=In, in which caseAis invertible andB =A−1; or (b)R=In, in which caseAis not invertible.
Example 3 To illustrate the previous paragraph, we test A=
1 1 2 2
for invertibility. If we are performing calculations by hand, we transform [A I2] into a matrix [R B] such thatR is in reduced row echelon form:
[A I2]=
1 1 1 0
2 2 0 1
−2r1+r2→r2
1 1 1 0
0 0 −2 1
=[R B] SinceR=I2,Ais not invertible.
Note that in this case [R B] is not in reduced row echelon form because of the
−2 in the (2, 3)-entry. If you use a computer or calculator to put [A I2] into reduced row echelon form, some additional steps are performed, resulting in the matrix
[R C]=
1 1 0 0.5
0 0 1 −0.5
.
Again, we see that Ais not invertible becauseR=I2. It is not necessary to perform these additional steps when solving the problem by hand—you can stop as soon as it becomes clear thatR=I2.
Practice Problem 1 䉴 For each of the matrices A=
1 −2 1
2 −1 −1
−2 −5 7
and B =
1 1 0
3 4 1
−1 4 4
,
determine whether the matrix is invertible. If so,find its inverse. 䉴 Practice Problem 2 䉴 Consider the system of linear equations
x1− x2+2x3= 2 x1+ 2x2 = 3
−x2+ x3= −1.
(a) Write the system in the form of a matrix equationAx=b.
(b) Show thatAis invertible, and findA−1.
(c) Solve the system by using the answer to (b). 䉴
Although the next theorem includes a very long list of statements, most of it follows easily from previous results. The key idea is that whenAis ann×nmatrix, the reduced row echelon form ofAequalsIn if and only ifAhas a pivot position in each row and if and only ifAhas a pivot position in each column. Thus, in the special case of ann×n matrix, each statement in Theorems 1.6 and 1.8 is true if and only if the reduced row echelon form ofAequalsIn. So all these statements are equivalent to each other.
THEOREM 2.6
(Invertible Matrix Theorem) Let A be an n×n matrix. The following state- ments are equivalent:
(a) Ais invertible.
(b) The reduced row echelon form ofAisIn. (c) The rank of Aequalsn.
(d) The span of the columns ofA isRn.
(e) The equationAx=bis consistent for everybinRn. (f) The nullity ofAequals zero.
(g) The columns ofA are linearly independent.
(h) The only solution of Ax=0 is0.
(i) There exists ann×n matrixB such thatBA=In. (j) There exists ann×n matrixC such thatAC =In. (k) Ais a product of elementary matrices.
PROOF Statements (a) and (b) are equivalent by Theorem 2.5. BecauseAis an n×n matrix, statement (b) is equivalent to each of (c), (d), and (e) by Theorem 1.6 on page 70. Similarly, statement (b) is equivalent to each of (f), (g), and (h) by Theorem 1.8 on page 78. Therefore statement (a) is equivalent to each of statements (b) through (h).
Proof that (a) implies (k): The assumption thatAis invertible implies that the reduced row echelon form ofAisIn. Then, as in the proof of Theorem 2.5, there exists an invertible n×n matrixP such thatPA=In (Theorem 2.3). Therefore A=P−1, and the discussion preceding Theorem 2.3 shows thatP is a product of invertible matrices. Thus P−1 is the product of the inverses of these elementary matrices (in reverse order), each of which is an elementary matrix. It follows that Ais a product of elementary matrices, and so (a) implies (k).
Proof that (k) implies (a): Suppose thatAis a product of elementary matrices.
Since elementary matrices are invertible,Ais the product of invertible matrices and henceAis invertible, establishing (a). Thus statements (a) and (k) are equivalent.
It remains to show that (a) is equivalent to (i) and (j).
Clearly, (a) implies (i), withB =A−1. Conversely, assume (i). Letv be any vector inRn such thatAv=0. Then
v=Inv=(BA)v=B(Av)=B0=0.
It follows that (i) implies (h). But (h) implies (a); so (i) implies (a). Thus state- ments (a) and (i) are equivalent.
Clearly, (a) implies (j), withC =A−1. Conversely, assume (j). Letbbe any vector inRn andv=Cb. Then
Av=A(Cb)=(AC)b=Inb=b.
It follows that (j) implies (e). Since (e) implies (a), it follows that (j) implies (a).
Hence (a) and (j) are equivalent.
Therefore all of the statements in the Invertible Matrix Theorem are equiva-
lent.
Statements (i) and (j) of the Invertible Matrix Theorem are the two conditions in the definition of invertibility. It follows from the Invertible Matrix Theorem that we need verify only one of these conditions to show that a square matrix is invertible.
For example, suppose that for a given n×n matrix A, there is an n×n matrix C such thatAC =In. ThenAis invertible by the Invertible Matrix Theorem, and so we may multiply both sides of this equation on the left by A−1 to obtain the equation A−1(AC)=A−1In, which reduces toC =A−1. Similarly, ifBA=In for some matrix B, thenAis invertible by the Invertible Matrix Theorem, and
B =BIn =B(AA−1)=(BA)A−1=InA−1 =A−1.
Note that the matricesB andC in statements (i) and (j) of the Invertible Matrix Theorem must be square. There are nonsquare matricesAandC for which the product AC is an identity matrix. For instance, let
A=
1 1 0 1 2 1
and C =
2 1
−1 −1
0 2
.
Then
AC =
1 1 0 1 2 1
2 1
−1 −1
0 2
= 1 0
0 1
=I2.
Of course,AandC are not invertible.