In Theorem 2 of Section 3.5 we saw that the 2×2
is invertible if and only if ad−bc≠0.
In particular, note the vertical bars that distinguish a determinant from a matrix. Sometimes we write det(A)
Determinants are often used in elementary algebra to solve a 2×2
It follows from Theorems 2 and 7 in Section 3.5 that this system has a unique solution if and only if its coefficient determinant—the determinant of its coefficient matrix A—is nonzero:
Then Cramer’s rule says that this unique solution is given by
Thus Cramer’s rule gives each of x and y as a quotient of two determinants, the denominator in each case being the determinant of the coefficient matrix. In the numerator for x the coefficients a11
The proof of Cramer’s rule is a routine calculation—to verify that evaluation of the determinant in (4) gives the same expressions for x and y as are obtained by solution of (2) by the method of elimination.
To apply Cramer’s rule to solve the system
with coefficient determinant
we simply substitute in the equations in (4) to get
We define 3×3
The determinant detA=|aij|
Note the single minus sign on the right-hand side. The three 2×2
The definition of higher-order determinants is simplified by the following notation and terminology.
For example, the minor of a12
The minor of a32
According to Eq. (6), the cofactor Aij
Note that a plus sign always appears in the upper left corner and that the signs alternate horizontally and vertically. In the 4×4
and so forth.
With this notation, the definition of 3×3
The last formula is the cofactor expansion of det A along the first row of A. Its natural generalization yields the definition of the determinant of an n×n
In numerical computations, it frequently is more convenient to work first with minors rather than with cofactors and then attach signs in accord with the checkerboard pattern illustrated previously. Note that determinants have been defined only for square matrices.
To evaluate the determinant of
we observe that there are only two nonzero terms in the cofactor expansion along the first row. We need not compute the cofactors of zeros, because they will be multiplied by zero in computing the determinant; hence
Each of the 3×3
Note that, if we could expand along the second row in Example 4, there would be only a single 3×3
The formulas in (9) and (10) provide 2n different cofactor expansions of an n×n
In a specific example, we naturally attempt to choose the expansion that requires the least computational labor.
To evaluate the determinant of
we expand along the third column, because it has only a single nonzero entry. Thus
In addition to providing ways of evaluating determinants, the theorem on cofactor expansions is a valuable tool for investigating the general properties of determinants. For instance, it follows immediately from the formulas in (9) and (10) that, if the square matrix A has either an all-zero row or an all-zero column, then detA=0.
We now list seven properties of determinants that simplify their computation. Each of these properties is readily verified directly in the case of 2×2
Property 1: If the n×n
For instance, if the ith row of A is multiplied by k, then the elements off the ith row of A are unchanged. Hence for each j=1,2,…,n,
and thus detB=kdetA
Property 1 implies simply that a constant can be factored out of a single row or column of a determinant. Thus we see that
by factoring 3 out of the second column.
Property 2: If the n×n
To see why this is so, suppose (for instance) that the first row is not one of the two that are interchanged (recall that n≥3
and thus detB=−detA
Property 3: If two rows (or two columns) of the n×n
To see why, let B denote the matrix obtained by interchanging the two identical rows of A. Then B=A,
Property 4: Suppose that the n×n
This result also holds if columns are involved instead of rows.
Property 4 is readily established by expanding B along its ith row. In Problem 45 we ask you to supply the details for a typical case. The main importance (at this point) of Property 4 is that it implies the following property relating determinants and elementary row operations.
Property 5: If the n×n
Thus the value of a determinant is not changed either by the type of elementary row operation described or by the corresponding type of elementary column operation. The following computation with 3×3
So B is the result of adding k times the first column of A to its third column. Then
Here we first applied Property 4 and then factored k out of the second summand with the aid of Property 1. Now the first determinant on the right-hand side in (11) is simply detA,
Although we use only elementary row operations in reducing a matrix to echelon form, Properties 1, 2, and 5 imply that we may use both elementary row operations and the analogous elementary column operations in simplifying the evaluation of determinants.
The matrix
has no zero elements to simplify the computation of its determinant as it stands, but we notice that we can “knock out” the first two elements of its third column by adding twice the first column to the third column. This gives
The moral of the example is this: Evaluate determinants with your eyes open.
An upper triangular matrix is a square matrix having only zeros below its main diagonal. A lower triangular matrix is a square matrix having only zeros above its main diagonal. A triangular matrix is one that is either upper triangular or lower triangular, and thus looks like
The next property tells us that determinants of triangular matrices are especially easy to evaluate.
Property 6: The determinant of a triangular matrix is equal to the product of its diagonal elements.
The reason is that the determinant of any triangular matrix can be evaluated as in the following computation:
At each step we expand along the first column and pick up another diagonal element as a factor of the determinant.
To evaluate
we first add the first row to the second and then subtract twice the first row from the third. This yields
because we produced a triangular matrix having a zero on its main diagonal. (Can you see an even quicker way to do it by keeping your eyes open?)
The transpose AT
More generally, the transpose of the m×n
Note the reversal of subscripts; this means that the element of AT
and
If the matrix A is square, then we get AT
In Problems 47 and 48 we ask you to verify the following properties of the transpose operation (under the assumption that A and B are matrices of appropriate sizes and c is a number):
(AT)T=A
(A+B)T=AT+BT
(cA)T=cAT
(AB)T=BTAT
Property 7: If A is a square matrix, then det(AT)=detA
This property of determinants can be verified by writing the cofactor expansion of det A along its first row and the cofactor expansion of det(AT)
We began this section with the remark that a 2×2
This theorem (along with the others in this section) is proved in Appendix B. So now we can add the statement that detA≠0
According to Problem 61, the determinant of the matrix
is
Note that |V|≠0
is invertible.
The connection between nonzero determinants and matrix invertibility is closely related to the fact that the determinant function “respects” matrix multiplication in the sense of the following theorem.
The fact that |AB|=|A||B|
As a first application of Theorem 3, we can calculate the determinant of the inverse of an invertible matrix A:
so
and therefore
Now |A|≠0
The determinant of
happens to be |A|=320≠0.
Suppose that we need to solve the n×n
where
We assume that the coefficient matrix A is invertible, so we know in advance that a unique solution x of (16) exists. The question is how to write x explicitly in terms of the coefficients aij
If we denote by a1,a2,…,an
The desired formula for the ith unknown xi
For instance, the unique solution (x1,x2,x3)
with |A|=|aij|≠0
Use Cramer’s rule to solve the system
We find that
then the formulas in (19) yield
and
The inverse A−1
If we write the coefficient matrix A=[a1a2⋯an],
for j=1,2,…,n.
for i, j=1,2,…,n.
We see in (23) the transpose of the cofactor matrix [Aij]
Apply the formula in (23) to find the inverse of the matrix
of Example 10, in which we saw that |A|=29
First we calculate the cofactors of A, arranging our computations in a natural 3×3
(Note the familiar checkerboard pattern of signs.) Thus the cofactor matrix of A is
Next, we interchange rows and columns to obtain the adjoint matrix
Finally, in accord with Eq. (23), we divide by |A|=29 to get the inverse matrix
The amount of labor required to complete a numerical calculation is measured by the number of arithmetical operations it involves. So let us count just the number of multiplications required to evaluate an n×n determinant using cofactor expansions. If n=5, for instance, then the cofactor expansion along a row or column requires computations of five 4×4 determinants. A cofactor expansion of each of these five 4×4 determinants involves four 3×3 determinants. Each of these four 3×3 determinants leads to three 2×2 determinants, and finally each of these 2×2 determinants requires two multiplications for its evaluation. Hence the total number of multiplications required to evaluate the original 5×5 determinant is
In general, the number of multiplications required to evaluate an n×n determinant completely by cofactor expansions is
Thus, if we ignore the smaller number of additions involved, then our operations count for an n×n determinant is n!. For instance, the evaluation of a 25×25 determinant by cofactor expansion would require about 25!≈1.55×1025 operations. If we used a supercomputer capable of a billion operations per second this task would require about (1.55×1016)/(365.25×24×3600)≈492 million years! This same supercomputer would require about 9.64×1047 years—incomparably longer than the estimated age of the universe (perhaps 20 billion years)—to evaluate a 50×50 determinant by cofactor expansion. Contemporary scientific and engineering applications routinely involve matrices of size 1000×1000 (or larger) whose cofactor expansions would require incomprehensibly long times with any conceivable computer.
However, a typical 2000-era desktop computer, using Matlab and performing “only” about 100 million operations per second, calculates the determinant or inverse of a randomly generated 100×100 matrix almost instantaneously. How is this possible? Obviously not by using cofactor expansions!
The answer is that determinants are much more efficiently calculated by Gaussian elimination—that is, by reduction to triangular form, so that only the product of the remaining diagonal elements need be calculated. Similarly, the inverse of the invertible matrix A is much more efficiently calculated by reduction of the augmented matrix [AI] to reduced echelon form (as in Section 3.5) than by use of Cramer’s rule (as in Theorem 5 here). A careful count reveals that the number of arithmetic operations required to reduce an n×n matrix to echelon form is of the order of n3 rather than n!. As indicated in the table of Fig. 3.6.1, n3 is dramatically smaller than n! if n is fairly large. Consequently, cofactor expansions of determinants and Cramer’s rule for the solution of systems are primarily of theoretical importance, and are seldom used in numerical problems where n is greater than 3 or 4.
n | 5 | 10 | 25 | 50 | 100 |
---|---|---|---|---|---|
23n3 | 83 | 667 | 10,417 | 83,333 | 666,667 |
n! | 120 | 3,628,800 | 1.55×1025 | 3.04×1064 | 9.33×10157 |
Use cofactor expansions to evaluate the determinants in Problems 1–6. Expand along the row or column that minimizes the amount of computation that is required.
|003400050|
|210121012|
|10002050369840107|
|511873−2623000−304017|
|0010020000000300000405000|
|3011−50−2413650050076−917700820|
In Problems 7–12, evaluate each given determinant after first simplifying the computation (as in Example 6) by adding an appropriate multiple of some row or column to another.
|111222333|
|234−2−31327|
|3−2505176−412|
|−3651−2−42−512|
|1234056700892469|
|200−301111200513−4007|
Use the method of elimination to evaluate the determinants in Problems 13–20.
|−44−1−1−22143|
|42−231−5−5−43|
|−254531145|
|24−2−5−4−1−421|
|2331043−32−1−1−30−4−32|
|144101−22331401−3−2|
|100301−20−23−230−333|
|121−1213301−23−14−24|
Use Cramer’s rule to solve the systems in Problems 21–32.
3x+4y=25x+7y=1
5x+8y=38x+13y=5
17x+7y=612x+5y=4
11x+15y=108x+11y=7
5x+6y=123x+4y=6
6x+7y=38x+9y=4
5x1+2x2−2x3=1x1+5x2−3x3=−25x1−3x2+5x3=2
5x1+4x2−2x3=42x1+3x3=22x1−x2+x3=1
3x1−x2−5x3=34x1−4x2−3x3=−4x1−5x3=2
x1+4x2+2x3=34x1+2x2+x3=12x1−2x2−5x3=−3
2x1−5x3=−34x1−5x2+3x3=3−2x1+x2+x3=1
3x1+4x2−3x3=53x1−2x2+4x3=73x1+2x2−x3=3
Apply Theorem 5 to find the inverse A−1 of each matrix A given in Problems 33–40.
[−5−2215−35−31]
[203−5−422−11]
[352−23−4−50−5]
[−4433−1−510−5]
[−415−245−3−3−1]
[34−332−1−32−4]
[−3−2303223−5]
[24−32−3−1−50−3]
Show that (AB)T=BTAT if A and B are arbitrary 2×2 matrices.
Consider the 2×2 matrices
where x and y denote the row vectors of B. Then the product AB can be written in the form
Use this expression and the properties of determinants to show that
Thus the determinant of a product of 2×2 matrices is equal to the product of their determinants.
Each of Problems 43–46 lists a special case of one of Property 1 through Property 5. Verify it by expanding the determinant on the left-hand side along an appropriate row or column.
|ka11a12a13ka21a22a23ka31a32a33|=k|a11a12a13a21a22a23a31a32a33|
|a21a22a23a11a12a13a31a32a33|=−|a11a12a13a21a22a23a31a32a33|
|a1b1c1+d1a2b2c2+d2a3b3c3+d3|=|a1b1c1a2b2c2a3b3c3|+|a1b1d1a2b2d2a3b3d3|
|a11+ka12a12a13a21+ka22a22a23a31+ka32a32a33|=|a11a12a13a21a22a23a31a32a33|
Problems 47 through 49 develop properties of matrix transposes.
Suppose that A and B are matrices of the same size. Show that: (a) (AT)T=A; (b) (cA)T=cAT; and (c) (A+B)T=AT+BT.
Let A and B be matrices such that AB is defined. Show that (AB)T=BTAT. Begin by recalling that the ijth element of AB is obtained by multiplying elements in the ith row of A with those in the jth column of B. What is the ijth element of BTAT?
Let A=[aij] be a 3×3 matrix. Show that det(AT)=detA by expanding det A along its first row and det(AT) along its first column.
Suppose that A2=A. Prove that |A|=0 or |A|=1.
Suppose that An=0 (the zero matrix) for some positive integer n. Prove that |A|=0.
The square matrix A is called orthogonal provided that AT=A−1. Show that the determinant of such a matrix must be either +1 or −1.
The matrices A and B are said to be similar provided that A=P−1BP for some invertible matrix P. Show that if A and B are similar, then |A|=|B|.
Deduce from Theorems 2 and 3 that if A and B are n×n invertible matrices, then AB is invertible if and only if both A and B are invertible.
Let A and B be n×n matrices. Suppose it is known that either AB=I or BA=I. Use the result of Problem 54 to conclude that B=A−1.
Let A be an n×n matrix with detA=1 and with all elements of A integers.
Show that A−1 has only integer entries.
Suppose that b is an n-vector with only integer entries. Show that the solution vector x of Ax=b has only integer entries.
Let A be a 3×3 upper triangular matrix with nonzero determinant. Show by explicit computation that A−1 is also upper triangular.
Figure 3.6.2 shows an acute triangle with angles A, B, and C and opposite sides a, b, and c. By dropping a perpendicular from each vertex to the opposite side, derive the equations
Regarding these as linear equations in the unknowns cos A, cos B, and cos C, use Cramer’s rule to derive the law of cosines by solving for
Thus
Note that the case A=π/2(90°) reduces to the Pythagorean theorem.
Show that
Consider the n×n determinant
in which each entry on the main diagonal is a 2, each entry on the two adjacent diagonals is a 1, and every other entry is zero.
Expand along the first row to show that
Prove by induction on n that Bn=n+1 for n≥2.
Problems 61–64 deal with the Vandermonde determinant
that will play an important role in Section 3.7.
Show by direct computation that V(a,b)=b−a and that
The formulas in Problem 61 are the cases n=2 and n=3 of the general formula
The case n=4 is
Prove this as follows. Given x1, x2, and x3, define the cubic polynomial P(y) to be
Because P(x1)=P(x2)=P(x3)=0 (why?), the roots of P(y) are x1, x2, and x3. It follows that
where k is the coefficient of y3 in P(y). Finally, observe that expansion of the 4×4 determinant in (26) along its last row gives k=V(x1,x2,x3) and that V(x1,x2,x3,x4)=P(x4).
Generalize the argument in Problem 62 to prove the formula in (25) by induction on n. Begin with the (n−1)st-degree polynomial
Use the formula in (25) to evaluate the two determinants given next.
|1111124813927141664|
|1−11−112481−24−813927|
3.133.137.169