In this section, we provide a method for calculating the determinant of a matrix by using row reduction. For large matrices, this technique is computationally more efficient than cofactor expansion. We will also use the relationship between determinants and row reduction to establish a link between determinants and rank.
Determinants of Upper Triangular Matrices
We begin by proving the following simple formula for the determinant of an upper triangular matrix. Our goal will be to reduce every other determinant computation to this special case using row reduction.
Theorem 3.2 LetAbe an upper triangularnnmatrix. Then|A|a11a22ãããann,the product of the entries ofAalong the main diagonal.
Because we have defined the determinant recursively, we prove Theorem 3.2 by induction.
Proof. We use induction onn.
Base Step:n1. In this case,A[a11], and|A|a11,which verifies the formula in the theorem.
Inductive Step:Letn>1. Assume that for any upper triangular(n1)(n1)matrix B,|B|b11b22ãããb(n1)(n1).We must prove that the formula given in the theorem holds for anynnmatrixA.
Now, |A|an1An1an2An2ãããannAnn0An10An2ããã0A(n1)(n1) annAnn, because ani0for i<n sinceA is upper triangular. Thus, |A|annAnn ann(1)nn|Ann|ann|Ann|(sincennis even). However, the(n1)(n1) sub- matrixAnnis itself an upper triangular matrix, sinceAis upper triangular. Thus, by the induc- tive hypothesis,|Ann|a11a22ãããa(n1)(n1).Hence,|A|ann(a11a22ãããa(n1)(n1)) a11a22ãããann, completing the proof.
Example 1 By Theorem 3.2,
4 2 0 1
0 3 9 6
0 0 1 5
0 0 0 7
(4)(3)(1)(7) 84.
As a special case of Theorem 3.2, notice that for alln 1, we have|In|1, since Inis upper triangular with all its main diagonal entries equal to 1.
Effect of Row Operations on the Determinant
The following theorem describes explicitly how each type of row operation affects the determinant:
Theorem 3.3 LetAbe annnmatrix, with determinant|A|, and letcbe a scalar.
(1) IfR1is the row operationi ←ciof type (I), then|R1(A)|c|A|.
(2) IfR2is the row operation j
←ci j
of type (II), then|R2(A)||A|. (3) IfR3is the row operationi ↔
j
of type (III), then|R3(A)| |A|.
All three parts of Theorem 3.3 are proved by induction. The proof of part (1) is easiest and is outlined in Exercise 8. Part (2) is easier to prove after part (3) is proven, and we outline the proof of part (2) in Exercises 9 and 10.The proof of part (3) is done by induction. Most of the proof of part (3) is given after the next example, except for one tedious case, which has been placed in Appendix A.
Example 2 Let
A
⎡
⎢⎣
5 2 1
4 3 1
2 1 0
⎤
⎥⎦.
You can quickly verify by the basketweaving method that |A|7. Consider the following matrices:
B1
⎡
⎢⎣
5 2 1
4 3 1
6 3 0
⎤
⎥⎦, B2
⎡
⎢⎣
5 2 1
4 3 1
12 3 2
⎤
⎥⎦, and B3
⎡
⎢⎣
4 3 1
5 2 1
2 1 0
⎤
⎥⎦.
Now,B1is obtained fromAby the operation3 ←33of type (I). Hence, part (1) of The- orem 3.3 asserts that|B1| 3|A|(3)(7) 21.
Next,B2 is obtained fromAby the operation3 ←213of type (II). By part (2) of Theorem 3.3,|B2||A|7.
Finally,B3is obtained fromAby the operation1 ↔ 2of type (III). Then, by part (3) of Theorem 3.3,B3 |A| 7.
You can use basketweaving on B1,B2, and B3 to verify that the values given for their determinants are indeed correct.
Proof. Proof of Part (3) of Theorem 3.3: We proceed by induction onn. Notice that for n1, we cannot have a type (III) row operation, son2for the Base Step.
Base Step: n2. Then R must be the row operation 1 ↔ 2, and |R(A)|
R
a11 a12 a21 a22
a21 a22 a11 a12
a21a12a22a11 (a11a22a12a21) |A|.
Inductive Step: Assume n 3, and that switching two rows of an (n1)(n1) matrix results in a matrix whose determinant has the opposite sign. We consider three separate cases.
Case 1: Suppose R is the row operation i ↔ j
, where in and jn. Let B R(A). Then, since the last row of A is not changed, bnkank, for 1kn.
Also, Bnk, the (n,k) submatrix of B, equals R(Ank) (why?). Therefore, by the inductive hypothesis, |Bnk| |Ank|, implying Bnk(1)nk|Bnk| (1)nk(1)|Ank| Ank, for1kn. Hence,|B|bn1Bn1ãããbnnBnn
an1(An1)ãããann(Ann) (an1An1ãããannAnn) |A|. Case 2: Suppose R is the row operation n1 ↔ n, switching the last two rows.
This case is proved by brute-force calculation, the details of which appear in Appendix A.
Case 3: SupposeRis the row operationi ↔ n, within2. In this case, our strategy is to expressRas a sequence of row swaps from the two previous cases. LetR1be the row operationi ↔ n1andR2be the row operationn1 ↔ n.Then BR(A)R1(R2(R1(A)))(why?). Using the previous two cases, we have|B|
|R(A)||R1(R2(R1(A)))| |R2(R1(A))|(1)2|R1(A)|(1)3|A| |A|. This completes the proof.
Theorem 3.3 can be used to prove that if a matrixAhas a row with all entries zero, or has two identical rows, then|A|0 (see Exercises 11 and 12).
Part (1) of Theorem 3.3 can be used to multiply each of thenrows of a matrixA bycin turn, thus proving the following corollary1:
Corollary 3.4 IfAis annnmatrix, andcis any scalar, then|cA|cn|A|.
Example 3
A quick calculation shows that
0 2 1
3 3 2
16 7 1
1.
Therefore,
0 4 2
6 6 4 32 14 2
2
⎡
⎢⎣
0 2 1
3 3 2
16 7 1
⎤
⎥⎦
(2)3
0 2 1
3 3 2
16 7 1
(8)(1)8.
Calculating the Determinant by Row Reduction
We will now illustrate how to use row operations to calculate the determinant of a given matrixAby finding an upper triangular matrixBthat is row equivalent toA.
Example 4 Let
A
⎡
⎢⎣
0 14 8
1 3 2
2 0 6
⎤
⎥⎦.
We row reduce A to upper triangular form, as follows, keeping track of the effect on the determinant at each step:
A
⎡
⎢⎣
0 14 8
1 3 2
2 0 6
⎤
⎥⎦
1You were also asked to prove this result in Exercise 13 of Section 3.1 directly from the definition of the determinant using induction.
(III):1 ↔ 2 ⇒ B1
⎡
⎢⎣
1 3 2
0 14 8
2 0 6
⎤
⎥⎦ (|B1| |A|)
(II):3 ←213 ⇒ B2
⎡
⎢⎣
1 3 2
0 14 8
0 6 10
⎤
⎥⎦ (|B2||B1| |A|)
(I):2 ←141 2 ⇒ B3
⎡
⎢⎣
1 3 2
0 1 47 0 6 10
⎤
⎥⎦
|B3| 141|B2| 141|A|
(II):3 ←623 ⇒ B
⎡
⎢⎢
⎣ 1 3 2 0 1 47 0 0 467
⎤
⎥⎥
⎦
|B||B3| 141|A|
.
Because the last matrixBis in upper triangular form, we stop. (Notice that we do not target the entries above the main diagonal, as in reduced row echelon form.) From Theorem 3.2,
|B|(1)(1) 46
7
467.Since|B| 141|A|, we see that|A|14|B|1446 7
92.
A more convenient method of calculating|A|is to create a variableP(for “product”) with initial value 1, and updatePappropriately as each row operation is performed.
That is, we replace the current value ofPby
1Pc for type (I) row operations P(1) for type (III) row operations .
Of course, row operations of type (II) do not affect the determinant. Then, using the final value ofP, we can solve for|A|using|B|P|A|, whereBis the upper triangular result of the row reduction process. This method is illustrated in the next example.
Example 5
Let us redo the calculation for|A|in Example 4. We create a variableP and initializePto1.
Listed below are the row operations used in that example to convertAinto upper triangular form B, with|B|467.After each operation, we update the value ofPaccordingly.
Row Operation Effect P
(III): 1 ↔ 2 MultiplyPby1 1
(II): 3 ←213 No change 1
(I): 2 ←141 2 MultiplyPby141 141
(II): 3 ←623 No change 1
14
Then|A|equals the reciprocal of the final value of Ptimes|B|; that is,|A|(1/P)|B|
14467 92.
Determinant Criterion for Matrix Singularity
The next theorem gives an alternative way of determining whether the inverse of a given square matrix exists.
Theorem 3.5 AnnnmatrixAis nonsingular if and only if|A| 0.
Proof. Let D be the unique matrix in reduced row echelon form for A. Now, using Theorem 3.3, we see that a single row operation of type (I), (II), or (III) cannot convert a matrix having a nonzero determinant to a matrix having a zero determinant (why?). Because Ais converted toDusing a finite number of such row operations, Theorem 3.3 assures us that|A|and|D|are either both zero or both nonzero.
Now, ifAis nonsingular (which impliesDIn), we know that|D|10and there- fore|A| 0,and we have completed half of the proof.
For the other half, assume that|A| 0. Then|D| 0. BecauseDis a square matrix with a staircase pattern of pivots, it is upper triangular. Because |D| 0, Theorem 3.2 asserts that all main diagonal entries of D are nonzero. Hence, they are all pivots, and DIn.Therefore, row reduction transformsAtoIn, soAis nonsingular.
Notice that Theorem 3.5 agrees with Theorem 2.13 in asserting that an inverse for a b
c d
exists if and only if a b
c d
adbc0.
Theorem 2.14 and Theorem 3.5 together imply the following:
Corollary 3.6 LetAbe annnmatrix. Then rank(A)nif and only if|A| 0.
Example 6
Consider the matrixA +
1 6 3 5 ,
. Now,|A|230. Hence, rank(A)2by Corollary 3.6.
Also, becauseAis the coefficient matrix of the system 1 x6y20
3x5y 9
and|A| 0, this system has a unique solution by Theorems 3.5 and 2.15. In fact, the solution is(2, 3).
On the other hand, the matrix
B
⎡
⎢⎣
1 5 1
2 1 7
1 2 6
⎤
⎥⎦
has determinant zero. Thus, rank(B) <3. Also, because B is the coefficient matrix for the homogeneous system
⎧⎪
⎨
⎪⎩
x15x2 x30 2x1 x27x30 x12x26x30 ,
this system has nontrivial solutions by Theorem 2.5. You can verify that its solution set is 2c(4,1, 1)c∈R3
.
For reference, we summarize many of the results obtained in Chapters 2 and 3 in Table 3.1.You should be able to justify each equivalence inTable 3.1 by citing a relevant
definition or result.
Table 3.1 Equivalent conditions for singular and nonsingular matrices
Assume thatAis annnmatrix. Assume thatAis annnmatrix.
Then the following are all equivalent: Then the following are all equivalent:
Ais singular (A1does not exist). Ais nonsingular (A1exists).
Rank(A)n. Rank(A)n.
|A|0. |A| 0.
Ais not row equivalent toIn. Ais row equivalent toIn.
AXOhas a nontrivial solution forX. AXOhas only the trivial solution forX.
AXBdoes not have a unique solution AXBhas a unique solution forX (no solutions or infinitely many solutions). (namely,XA1B).
Highlights
■ The determinant of an upper (or lower) triangular matrix is the product of the main diagonal entries.
■ A row operation of type (I) involving multiplication bycmultiplies the determi- nant byc.
■ A row operation of type (II) has no effect on the determinant.
■ A row operation of type (III) negates the determinant.
■ If annnmatrixAis multiplied bycto produceB, then|B|cn|A|.
■ The determinant of a matrix can be found by row reducing the matrix to upper triangular form and keeping track of the row operations performed and their effects on the determinant.
■ AnnnmatrixAis nonsingular iff|A| 0iff rank(A)n.