Lecture 36 · Week 9· 19:34
Determinants and invertibility
det(AB) = det A det B, adjugate, Cramer's rule.
Saved in this browser only. No account needed.
TranscriptThe full text of the lecture. Click any sentence to play the video from there.
Today: what the determinant is good for
Welcome back. In the last two lectures we defined the determinant of a square matrix, and we learned to compute it. Today we see what it is good for. First, a recap of how row operations change the determinant. Swapping two rows changes its sign. Multiplying a row by a number c multiplies the determinant by c. And adding a multiple of one row to another row leaves the determinant unchanged. We also know that the determinant of a triangular matrix is the product of its diagonal entries. For this matrix, it is two times three times minus one, which is minus six. In particular, the identity matrix has determinant one.
Here is the plan. First, a test for invertibility. Then the product rule: the determinant of A B is the determinant of A times the determinant of B. Then a formula for the inverse, built from cofactors, called the adjugate. And finally Cramer's rule, a formula for the solution of a linear system.
The invertibility test
We start with elementary matrices, from lecture seventeen. An elementary matrix E is the identity matrix after one row operation, and E times a matrix B performs that row operation on B. So the recap gives the determinant of each elementary matrix: just apply the operation to the identity, which has determinant one. A swap matrix has determinant minus one. A scaling matrix, which multiplies a row by a nonzero number c, has determinant c. And a replacement matrix has determinant one. And the recap gives more. For every n by n matrix B, the determinant of E B is the determinant of E times the determinant of B. For a swap, E B is B with two rows swapped, so its determinant is minus the determinant of B, and minus one is exactly the determinant of E. The scaling and the replacement work the same way, with the factors c and one.
Notice that none of these factors is zero: a scaling always uses a nonzero number c. Now the first theorem. Let A be an n by n matrix over a field F. Then A is invertible if and only if its determinant is not zero. The proof is short, but it combines several earlier results, so take it slowly. Row reduce A to an echelon form U. Each row operation is a multiplication by an elementary matrix, so U is E k times, and so on, E one times A.
Apply the rule for elementary matrices once for each factor. The determinant of U is the determinant of E k, times and so on, times the determinant of E one, times the determinant of A. None of these factors is zero, so the determinant of U is zero exactly when the determinant of A is zero. Now U is a square echelon form, so it is upper triangular, and its determinant is the product of its diagonal entries. If U has n pivots, there is one pivot in every row and in every column, so the pivots are the diagonal entries, and the determinant of U is not zero. If U has fewer than n pivots, then some row of U is zero. Zero rows come last, so the last row is zero, the last diagonal entry is zero, and the determinant of U is zero.
So the determinant of A is not zero exactly when A has n pivots. And by the invertible matrix theorem of lecture seventeen, that happens exactly when A is invertible. So the invertible matrix theorem gets a thirteenth statement: the determinant of A is not zero. A single number decides whether a square matrix is invertible. An example. For a real number t, let A have the rows (one, t), and (t, four). Its determinant is one times four, minus t times t, which is four minus t squared. So A is invertible for every t except two and minus two.
For t equal to two, the rows are (one, two), and (two, four). The second row is twice the first, so subtracting twice the first row leaves a zero row. A has only one pivot, as the theorem predicts.
The product rule
Next, products. Let A and B be n by n matrices over a field F. Then the determinant of A B is the determinant of A times the determinant of B. Let's check it on an example first. Take A with the rows (two, one), and (one, three). Its determinant is six minus one, which is five. Take B with the rows (one, minus one), and (two, one). Its determinant is one plus two, which is three. Now the product A B, entry by entry. In the first row: two times one, plus one times two, is four. And two times minus one, plus one times one, is minus one.
In the second row: one times one, plus three times two, is seven. And one times minus one, plus three times one, is two. The determinant of A B is four times two, minus minus one times seven. That is eight plus seven, which is fifteen. And five times three is fifteen too. Now the proof. It is worth taking slowly, and it has two cases. First, suppose A is not invertible. Then A B is not invertible either. Indeed, if A B had an inverse X, then A times B X would be the identity. By lecture sixteen, one product is enough, so A would be invertible.
So in this case, A and A B both have determinant zero, by our first theorem. Both sides of the product rule are zero, and they are equal. Second, suppose A is invertible. By lecture seventeen, A is a product of elementary matrices: E one times E two, and so on, up to E k. Then A B is E one times, and so on, E k, times B. Peel off one elementary matrix at a time with the rule for elementary matrices. The determinant of A B is the determinant of E one, times and so on, times the determinant of E k, times the determinant of B.
Now take B to be the identity. The same peeling gives the determinant of A as the determinant of E one, times and so on, times the determinant of E k, times the determinant of the identity, which is one. Put this into the line above, and the determinant of A B is the determinant of A times the determinant of B. This proves the product rule. A warning: there is no such rule for sums. Take the two by two identity matrix. I plus I is two I, whose determinant is two times two, which is four. But the determinant of I, plus the determinant of I, is only two.
Consequences of the product rule
The product rule has quick consequences. Let A be an invertible n by n matrix. Then A times A inverse is the identity, so the determinant of A times the determinant of A inverse is one. So the determinant of A inverse is one over the determinant of A. Next, powers. For every n by n matrix A and every positive integer k, the determinant of A to the k is the determinant of A, to the power k. For k equal to one there is nothing to prove. By induction, suppose it holds for k. Then A to the k plus one is A to the k times A, so by the product rule its determinant is the determinant of A, to the power k, times the determinant of A. That is the determinant of A, to the power k plus one. Similar matrices have the same determinant. If B is P inverse A P, then the determinant of B is the determinant of P inverse, times the determinant of A, times the determinant of P. These are numbers in F, so we can reorder them. The determinant of P inverse times the determinant of P is one, so the determinant of B equals the determinant of A.
This gives a determinant for linear maps. Let V be a vector space over F, of finite dimension at least one, and let T from V to V be linear. In lecture thirty two we saw that the matrices of T relative to any two bases are similar. So they all have the same determinant, and we call it the determinant of T. For example, take differentiation D on P two of R, with the basis one, x, x squared. D sends one to zero, x to one, and x squared to two x. Written in the basis, the coefficients of these images are the columns of the matrix of D. This matrix is triangular with zeros on the diagonal, so the determinant of D is zero. And D is not invertible, since it sends the constant polynomial one to zero. This is true in general. By lectures thirty and thirty one, T is invertible exactly when its kernel is zero, because V is both its domain and its target. By lecture thirty two, that happens exactly when the null space of its matrix is zero. By the invertible matrix theorem, that is when the matrix is invertible, and so exactly when the determinant of T is not zero.
The adjugate
Now we look for a formula for the inverse. Recall cofactors, from lecture thirty five. For an n by n matrix A, with n at least two, the minor A i j is A with row i and column j removed. The cofactor C i j is minus one to the power i plus j, times the determinant of that minor. Cofactor expansion along row i says that the determinant of A is the sum over j of a i j times C i j. Each entry of row i is multiplied by its own cofactor. Here is the new definition. The adjugate of A, written with the three letters a d j, is the n by n matrix whose entry in row i and column j is the cofactor C j i. In words: put the cofactors in a matrix, and transpose it.
For a two by two matrix with the rows (a, b), and (c, d), the minors are single entries. So the cofactor C one one is d, C one two is minus c, C two one is minus b, and C two two is a. Transposing gives the adjugate, with the rows (d, minus b), and (minus c, a). This is the matrix in the inverse formula of lecture sixteen: if a d minus b c is not zero, the inverse is one over a d minus b c, times this matrix. The general formula has the same shape. Here is the theorem. For every n by n matrix A over a field F, with n at least two, A times the adjugate of A is the determinant of A times the identity, and so is the adjugate of A times A. Before we prove it, let's see what it gives.
Dividing by the determinant gives the inverse. If the determinant of A is not zero, then A inverse is one over the determinant of A, times the adjugate of A. Let's compute one. Take the matrix A whose first row is (one, two, zero), its second row is (zero, one, one), and its third row is (one, zero, one). We need all nine cofactors. The first row. C one one is the determinant of the minor with the rows (one, one), and (zero, one), which is one. C one two is minus the determinant of the rows (zero, one), and (one, one), so minus minus one, which is one. C one three is the determinant of the rows (zero, one), and (one, zero), which is minus one.
The second row. C two one is minus the determinant of the rows (two, zero), and (zero, one), so minus two. C two two is the determinant of the rows (one, zero), and (one, one), which is one. C two three is minus the determinant of the rows (one, two), and (one, zero), so minus minus two, which is two. The third row. C three one is the determinant of the rows (two, zero), and (one, one), which is two. C three two is minus the determinant of the rows (one, zero), and (zero, one), so minus one. C three three is the determinant of the rows (one, two), and (zero, one), which is one. Expanding along the first row, the determinant of A is one times one, plus two times one, plus zero times minus one, which is three.
Transposing the cofactors gives the adjugate of A. Its first row is (one, minus two, two), its second row is (one, one, minus one), and its third row is (minus one, two, one). So A inverse is one third of this matrix. As a check, the first row of A times the first column of the adjugate is one plus two plus zero, which is three. And the first row of A times the second column of the adjugate is minus two plus two plus zero, which is zero, as the theorem says. Now the proof. It is the most demanding part of today, so pause or rewatch it if you need to. The entry in row i and column l of A times the adjugate of A is row i of A times column l of the adjugate of A. Column l of the adjugate of A holds the cofactors C l j. So the entry is the sum over j of a i j times C l j.
When l equals i, this is an entry on the diagonal of A times the adjugate, and the sum is exactly the cofactor expansion along row i. So every diagonal entry is the determinant of A. When l is not i, the entry is off the diagonal. To find it, build a new matrix A prime: copy A, but replace its row l by row i. Then A prime has two equal rows, so its determinant is zero. Expand the determinant of A prime along row l. That row holds the entries a i j. Its cofactors are the cofactors C l j of A, because they never use row l, the only row that changed. So zero is the sum over j of a i j times C l j, and every entry off the diagonal is zero. So A times the adjugate of A is the determinant of A times the identity.
For the adjugate of A times A, we use the transpose. The minors of A transpose are the transposes of the minors of A, and transposing does not change a determinant. So the adjugate of A transpose is the transpose of the adjugate of A. Now apply the first part to A transpose. A transpose times its adjugate is the determinant of A times the identity, since A transpose has the same determinant as A. Transpose this equation. The product reverses its order, and we get the adjugate of A times A equals the determinant of A times the identity. A word on cost. For large matrices this formula is slow: it needs n squared determinants of size n minus one. Gauss Jordan inversion, from lecture sixteen, is far faster. The adjugate is a tool for theory. For example, it shows that every entry of A inverse is a cofactor divided by the determinant of A.
Cramer's rule
Last, Cramer's rule. Let A be an invertible n by n matrix over F, and let b be a vector in F n. For each i, let A i of b be the matrix A with its column i replaced by b. Then the equation A x equals b has exactly one solution, and its entry x i is the determinant of A i of b, divided by the determinant of A. The proof uses one clever matrix, so take it slowly. Since A is invertible, the equation has exactly one solution, A inverse b, by lecture sixteen. Call it x, and let I i of x be the identity matrix with its column i replaced by x. We multiply A by this matrix, one column at a time.
For j not equal to i, column j of I i of x is e j, and A times e j is column j of A. Column i is x, and A times x is b. So A times I i of x is exactly A i of b. Next, the determinant of I i of x. Row i of this matrix is zero except for x i on the diagonal. Expand along row i: removing row i and column i leaves an identity matrix, with determinant one. So the determinant of I i of x is x i. Now take determinants of both sides, with the product rule. The determinant of A, times x i, is the determinant of A i of b. The determinant of A is not zero, so divide by it, and we have Cramer's rule.
An example. Solve two x one plus x two equals seven, and x one plus three x two equals eleven. Its matrix is our A from the product rule, with determinant five. Replace the first column by b: the rows are (seven, one), and (eleven, three), with determinant twenty one minus eleven, which is ten. So x one is ten over five, which is two. Replace the second column by b: the rows are (two, seven), and (one, eleven), with determinant twenty two minus seven, which is fifteen. So x two is fifteen over five, which is three.
So the solution is x one equals two, and x two equals three. Check: two times two, plus three, is seven. And two, plus three times three, is eleven. There is a picture behind the rule. In the plane, b is x one times the first column of A, plus x two times the second column. The determinant of A one of b is the signed area of the parallelogram on b and the second column. Slide the tip of b along the second column, until b becomes x one times the first column. This is a shear, so the area does not change. The new parallelogram is x one times the parallelogram on the two columns. So its area is x one times the determinant of A, and dividing gives x one.
Like the adjugate, Cramer's rule is a tool for theory and for small systems. For larger systems, elimination is much faster. What the rule gives is an explicit formula: it shows exactly how the solution depends on b and on the entries of A.
Summary
To sum up. A square matrix is invertible exactly when its determinant is not zero. The determinant of a product is the product of the determinants. So the inverse has the reciprocal determinant, similar matrices have the same determinant, and every linear map from a space to itself has a determinant. The adjugate, the transposed matrix of cofactors, satisfies A times the adjugate of A equals the determinant of A times the identity. This gives a formula for the inverse. And Cramer's rule writes each entry of the solution of A x equals b as a ratio of two determinants.
Before the next lecture, read section seven point four of the course book, try the problems on sheet nine about determinants and invertibility, and do the lecture check on this lecture's page at Open Semester dot com. Next time, we begin week ten with eigenvalues: a number lambda is an eigenvalue of A exactly when the determinant of A minus lambda I is zero. See you there.
In this lecture
Materials
Check yourself
3 questions, from warm-up to stretch
Work each one out on paper, type your answer and press Check. Stuck? Open a hint; the worked solution is there when you need it.
- Question 1 of 3 Warm-up
Let with a real number . Find for . For which value of is not invertible?
Hint 1 of 2
By Theorem 7.4.1, is invertible exactly when . So find as an expression in and set it to zero.
Hint 2 of 2
Expand along the first row: , with .
Worked solution
- Expand along the first row (Lecture 35): and . The third entry of the row is .
- So . For this is .
- By Theorem 7.4.1, is invertible exactly when , that is when . So is not invertible only for .
- Question 2 of 3 Core
Let and be invertible matrices with and . Find and .
Hint 1 of 2
Use the product rule (Theorem 7.4.3) on each factor, and Corollary 7.4.5 for powers and inverses.
Hint 2 of 2
Write each determinant through and : and , then multiply.
Worked solution
- By the product rule and Corollary 7.4.5: .
- .
- This is Corollary 7.4.5(c): is similar to , and similar matrices have the same determinant.
- Question 3 of 3 Stretch
Let and . Find , then use Cramer's rule to find the second entry of the solution of . Finally, use the adjugate to find the entry of in row , column .
Hint 1 of 2
Cramer's rule (Theorem 7.4.15): , where is with its second column replaced by . For the inverse, (Corollary 7.4.12 and Remark 7.4.14): note the swapped indices.
Hint 2 of 2
, and , where removes row and column of .
Worked solution
- Along the first row: . It is not zero, so is invertible (Theorem 7.4.1).
- Replace the second column by : . So .
- Check: the whole solution is , and indeed , , .
- By Corollary 7.4.12 and Remark 7.4.14, , and the adjugate is the transposed matrix of cofactors, so .
- , so .
How did it go?