8.5 Determinants and Cramer's Rule
Definition and Properties of the Determinant
In this section we assign to each square matrix a real number, called the determinant of , which will eventually lead us to yet another technique for solving consistent independent systems of linear equations. The determinant is defined recursively, that is, we define it for matrices and give a rule by which we can reduce determinants of matrices to a sum of determinants of matrices.1 This means we will be able to evaluate the determinant of a matrix as a sum of the determinants of matrices; the determinant of a matrix as a sum of the determinants of matrices, and so forth. To explain how we will take an matrix and distill from it an , we use the following notation.
For example, using the matrix below, we find the matrix by deleting the second row and third column of .
We are now in the position to define the determinant of a matrix.
There are two commonly used notations for the determinant of a matrix : `' and `' We have chosen to use the notation as opposed to because we find that the latter is often confused with absolute value, especially in the context of a matrix. In the expansion , the notation `' means that the signs alternate and the final sign is dictated by the sign of the quantity . Since the entries , and so forth up through comprise the first row of , we say we are finding the determinant of by `expanding along the first row'. Later in the section, we will develop a formula for which allows us to find it by expanding along any row.
Applying Definition to the matrix we get
For a generic matrix we get
This formula is worth remembering
Applying Definition to the matrix we obtain
To evaluate the determinant of a matrix, we would have to evaluate the determinants of four matrices, each of which involves the finding the determinants of three matrices. As you can see, our method of evaluating determinants quickly gets out of hand and many of you may be reaching for the calculator. There is some mathematical machinery which can assist us in calculating determinants and we present that here. Before we state the theorem, we need some more terminology.
We note that in Definition, the sum
can be rewritten as
which, in the language of cofactors is
We are now ready to state our main theorem concerning determinants.
Unfortunately, while we can easily demonstrate the results in Theorem, the proofs of most of these properties are beyond the scope of this text. We could prove these properties for generic or even matrices by brute force computation, but this manner of proof belies the elegance and symmetry of the determinant. We will prove what few properties we can after we have developed some more tools such as the Principle of Mathematical Induction in Section.4 For the moment, let us demonstrate some of the properties listed in Theorem on the matrix below. (Others will be discussed in the Exercises.)
We found by expanding along the first row. To take advantage of the in the second row, we use Theorem to find by expanding along that row.
In general, the sign of in front of the minor in the expansion of the determinant follows an alternating pattern. Below is the pattern for , and matrices, and it extends naturally to higher dimensions.
The reader is cautioned, however, against reading too much into these sign patterns. In the example above, we expanded the matrix by its second row and the term which corresponds to the second entry ended up being negative even though the sign attached to the minor is . These signs represent only the signs of the in the formula; the sign of the corresponding entry as well as the minor itself determine the ultimate sign of the term in the expansion of the determinant.
To illustrate some of the other properties in Theorem, we use row operations to transform our matrix into an upper triangular matrix, keeping track of the row operations, and labeling each successive matrix.5
Theorem guarantees us that since we are replacing a row with itself plus a multiple of another row moving from one matrix to the next. Furthermore, since is upper triangular, is the product of the entries on the main diagonal, in this case . This demonstrates the utility of using row operations to assist in calculating determinants. This also sheds some light on the connection between a determinant and invertibility. Recall from Section that in order to find , we attempt to transform to using row operations
As we apply our allowable row operations on to put it into reduced row echelon form, the determinant of the intermediate matrices can vary from the determinant of by at most a nonzero multiple. This means that if , then the determinant of 's reduced row echelon form must also be nonzero, which, according to Definition means that all the main diagonal entries on 's reduced row echelon form must be . That is, 's reduced row echelon form is , and is invertible. Conversely, if is invertible, then can be transformed into using row operations. Since , our same logic implies . Basically, we have established that the determinant determines whether or not the matrix is invertible.6
It is worth noting that when we first introduced the notion of a matrix inverse, it was in the context of solving a linear matrix equation. In effect, we were trying to `divide' both sides of the matrix equation by the matrix . Just like we cannot divide a real number by , Theorem tells us we cannot `divide' by a matrix whose determinant is . We also know that if the coefficient matrix of a system of linear equations is invertible, then system is consistent and independent. It follows, then, that if the determinant of said coefficient is not zero, the system is consistent and independent.
Cramer's Rule and Matrix Adjoints
In this section, we introduce a theorem which enables us to solve a system of linear equations by means of determinants only. As usual, the theorem is stated in full generality, using numbered unknowns , , etc., instead of the more familiar letters , , , etc. The proof of the general case is best left to a course in Linear Algebra.
In words, Cramer's Rule tells us we can solve for each unknown, one at a time, by finding the ratio of the determinant of to that of the determinant of the coefficient matrix. The matrix is found by replacing the column in the coefficient matrix which holds the coefficients of with the constants of the system. The following example fleshes out this method.
Our last application of determinants is to develop an alternative method for finding the inverse of a matrix.7 Let us consider the matrix which we so extensively studied in Section
We found through a variety of methods that . To our surprise and delight, its inverse below has a remarkable number of 's in the denominators of its entries. This is no coincidence.
Recall that to find , we are essentially solving the matrix equation , where is a matrix. Because of how matrix multiplication is defined, the first column of is the product of with the first column of , the second column of is the product of with the second column of and the third column of is the product of with the third column of . In other words, we are solving three equations8
We can solve each of these systems using Cramer's Rule. Focusing on the first system, we have
If we expand along the first row, we get
Amazingly, this is none other than the cofactor of . The reader is invited to check this, as well as the claims that and .9 (To see this, though it seems unnatural to do so, expand along the first row.) Cramer's Rule tells us
So the first column of the inverse matrix is:
Notice the reversal of the subscripts going from the unknown to the corresponding cofactor of . This trend continues and we get
Putting all of these together, we have obtained a new and surprising formula for , namely
To see that this does indeed yield , we find all of the cofactors of
And, as promised,
To generalize this to invertible matrices, we need another definition and a theorem. Our definition gives a special name to the cofactor matrix, and the theorem tells us how to use it along with to find the inverse of a matrix.
This new notation greatly shortens the statement of the formula for the inverse of a matrix.
For matrices, Theorem reduces to a fairly simple formula.
The proof of Theorem is, like so many of the results in this section, best left to a course in Linear Algebra. In such a course, not only do you gain some more sophisticated proof techniques, you also gain a larger perspective. The authors assure you that persistence pays off. If you stick around a few semesters and take a course in Linear Algebra, you'll see just how pretty all things matrix really are - in spite of the tedious notation and sea of subscripts. Within the scope of this text, we will prove a few results involving determinants in Section once we have the Principle of Mathematical Induction well in hand. Until then, make sure you have a handle on the mechanics of matrices and the theory will come eventually.
Exercises
In Exercises -, compute the determinant of the given matrix. (Some of these matrices appeared in Exercises - in Section.)
- Carl's Sasquatch Attack! Game Card Collection is a mixture of common and rare cards. Each common card is worth while each rare card is worth . If his entire 117 card collection is worth , how many of each kind of card does he own?
- How much of a 5 gallon salt solution should be replaced with pure water to obtain 5 gallons of a solution?
- How much of a 10 liter acid solution must be replaced with pure acid to obtain 10 liters of a solution?
- Daniel's Exotic Animal Rescue houses snakes, tarantulas and scorpions. When asked how many animals of each kind he boards, Daniel answered: `We board 49 total animals, and I am responsible for each of their 272 legs and 28 tails.' How many of each animal does the Rescue board? (Recall: tarantulas have 8 legs and no tails, scorpions have 8 legs and one tail, and snakes have no legs and one tail.)
- This exercise is a continuation of Exercise in Section. Just because a system is consistent independent doesn't mean it will admit a solution that makes sense in an applied setting. Using the nutrient values given for Ippizuti Fish, Misty Mushrooms, and Sun Berries, use Cramer's Rule to determine the number of servings of Ippizuti Fish needed to meet the needs of a daily diet which requires 2500 calories, 1000 grams of protein, and 400 milligrams of Vitamin X. Now use Cramer's Rule to find the number of servings of Misty Mushrooms required. Does a solution to this diet problem exist?
Let
- Show that
- Show that
- Show that
For , , and below, show that , and .
Let be an arbitrary invertible matrix.
- Show that . (See footnote10 below.)
Using the facts that and , show that
In Exercises -, use Cramer's Rule to solve the system of linear equations.
In Exercises -, use Cramer's Rule to solve for .
In Exercises -, find the inverse of the given matrix using their determinants and adjoints.
The purpose of Exercises - is to introduce you to the eigenvalues and eigenvectors of a matrix.11 We begin with an example using a matrix and then guide you through some exercises using a matrix. Consider the matrix
from Exercise. We know that which means that does not have a unique solution. So there is a nonzero matrix with . In fact, every matrix of the form
is a solution to , so there are infinitely many matrices such that . But consider the matrix
It is NOT a solution to , but rather,
In fact, if is of the form
then
for all . The big question is “How did we know to use ?”
We need a number such that has nonzero solutions. We have demonstrated that and both worked. Are there others? If we look at the matrix equation more closely, what we really wanted was a nonzero solution to which we know exists if and only if the determinant of is zero.12 So we computed
This is called the characteristic polynomial of the matrix and it has two zeros: and . That's how we knew to use in our work above. The fact that showed up as one of the zeros of the characteristic polynomial just means that itself had determinant zero which we already knew. Those two numbers are called the eigenvalues of . The corresponding matrix solutions to are called the eigenvectors of and the `vector' portion of the name will make more sense after you've studied vectors.
Now it's your turn. In the following exercises, you'll be using the matrix from Exercise.
- Show that the characteristic polynomial of is . That is, compute .
- Let . Find the parametric description of the solution to the system of linear equations given by .
- Let . Find the parametric description of the solution to the system of linear equations given by . Show that any solution to also has the property that .
- Let . Find the parametric description of the solution to the system of linear equations given by . Show that any solution to also has the property that .
Answers
- Carl owns 78 common cards and 39 rare cards.
- gallons.
- liters.
- The rescue houses 15 snakes, 21 tarantulas and 13 scorpions.
- Using Cramer's Rule, we find we need 53 servings of Ippizuti Fish to satisfy the dietary requirements. The number of servings of Misty Mushrooms required, however, is . Since it's impossible to have a negative number of servings, there is no solution to the applied problem, despite there being a solution to the mathematical problem. A cautionary tale about using Cramer's Rule: just because you are guaranteed a mathematical answer for each variable doesn't mean the solution will make sense in the `real' world.
Adapted from Precalculus, 3rd corrected edition, by Carl Stitz and Jeff Zeager (stitz-zeager.com), licensed under CC BY-NC-SA 3.0. Changes were made: reformatted as an accessible XYZ web edition. License: CC-BY-NC-SA-3.0.