Visual Linear Algebra Online, Section 1.10
Mathematical beauty arises in many ways, though for most people, it is typically tied to something visual. The beauty of the more austere realm of abstract mathematics usually takes more time to appreciate.
It may surprise you to learn that the determinant of a matrix, as we have learned about especially in Section 1.9, “The Inverse Matrix of a Linear Transformation”, has geometric interpretations that are quite beautiful. We now describe one of these interpretations.
Area Interpretation of the Determinant of a Matrix in Two Dimensions
Suppose we draw two copies each of the two vectors and as shown below.
The beautiful geometric interpretation of the determinant is this. The area of the parallelogram shown is the absolute value of the determinant of the matrix whose columns are and , the matrix . That is,
.
Why is this considered to be beautiful? In large part, because it is both simple and surprising. Another reason it is considered to be beautiful is because it has a simple and intriguing visual derivation.
Deriving the Formula
The derivation involves adding rectangles and triangles to the picture in a clever, though natural, way. This is shown in the figure below. The rectangles and triangles are labeled with their areas.
Assume, as illustrated, that . We are also assuming in this picture that and so that . Then we can say that
This last expression is equal to for the picture above because we are assuming that and therefore .
In the case where , the area would equal . But that is also the same as when .
If and are parallel, then for some nonzero scalar . But then and and . In this situation, the parallelogram is “degenerate”. This means it is actually just a line and has no area.
Signed Area Interpretation of the Corresponding Linear Transformation
Let be a linear transformation. And let be a matrix such that for all . Furthermore, let be a “nice” set whose area exists. Understanding of what it means to be such a “nice” set is the graduate-school level topic of measure theory. For our purposes, it suffices to imagine that is some sort of generic “blob” with a piecewise-smooth boundary.
In this setting, the area of the image is related in an elegant way to the area of . The relationship can be expressed with the equation
when .
Furthermore, if undergoes a “flipping” as is applied (without being precise about what “flipping” means), then we could think of the image as having a negative “signed area”. In this situation, we can write
.
All this also means that if , then is somehow “degenerate” as a mapping. It maps sets that have positive area to image sets that have zero area.
An Example and an Animation
Let’s take an intuitive approach to the idea of undergoing a “flipping” as is applied. We can do this with an example and an animation.
Let and let . Then . So, for this linear transformation, we can say that and .
Let be the region inside the five-petal flower shape (outlined in red) in the animation below. We visually see that seems to be undergoing a “flipping” to obtain the image region (outlined in blue) as the animation parameter increases from 0 to 1. The area of is also three times as large as the area of . Its signed area is negative three times the area of .
But what about determinants of higher-dimensional square matrices? How should they be defined? Do they have beautiful geometric interpretations as well?
We will answer these questions soon. First, however, we continue to focus on two-dimensional determinants.
Some Algebraic Properties of Two-Dimensional Determinants
Determinants of matrices have some algebraic properties that generalize to higher dimensions. In fact, some of these properties are even useful for the computation of determinants of higher-dimensional square matrices.
Triangular Matrices
The first property worth noting is the determinant of a “triangular” matrix.
An upper triangular matrix has the form . Note there must be a zero in the lower-left and that the other (possibly nonzero) entries form a “triangle shape” in the upper-right part of the matrix. Also note that the “hypotenuse” of this “triangle” is along the “line” from the upper left entry to the lower right entry. This “line” is called the “main diagonal” of the square matrix.
A lower triangular matrix has the form . Note that there must be a zero in the upper-right and that the other (possibly nonzero) entries form a “triangle shape” in the lower-left part of the matrix. Also note that the “hypotenuse” of this “triangle” is again the main diagonal of the matrix.
A matrix is triangular if it is either upper triangular or lower triangular. Note that this does not include cases where the only zero entry is in the upper-left or lower-right. In other words, the main diagonal must be the “hypotenuse” of a the “triangle” in a triangular matrix. There are good reasons for this exclusion, one of which is the theorem below.
The following theorem is worth stating because it is important and it generalizes to higher dimensions. It is trivial to prove, however.
Theorem 1.10.1: The determinant of a triangular matrix is the product of the entries along the main diagonal. In formulas, and .
Behavior of Determinants under Elementary Row Operations
Let so that . Let’s explore how the determinant of this matrix is affected if we perform elementary row operations to to obtain related (row equivalent) matrices.
Interchanging Rows
If we interchange the rows of , the new matrix obtained is . This allows us to conclude that .
Therefore, swapping the rows of a matrix causes the determinant to change by a factor of . This fact will generalize to higher dimensions.
Multiplying a Row by a Constant
If we multiply the first row of by a constant , the new matrix obtained is . This allows us to conclude that .
If we multiply the second row of by a constant , the new matrix obtained is . This allows us to conclude that .
Therefore, a row of a matrix by a constant causes the determinant to get multiplied by that constant. This fact will generalize to higher dimensions.
Of course, this represents an elementary row operation if and only if .
Note that this also means that if we multiply all the entries of (both rows) by the same constant to get a new matrix , then . This generalizes to higher dimensions, though the power of changes to match the number of rows (and columns) of the square matrix in question.
Also note that is new notation that represents multiplying the entire matrix by the scalar . This operation is defined by multiplication of every entry of by .
Row Replacement
Recall that the final row operation, called row replacement (introduced in Section 1.3, “Systems of Linear Equations in Two Dimensions”), can be described as follows. We are allowed to multiply any row by a constant, add the result to another row, and replace that second row by the result.
The constant can be zero, though such an operation would leave the matrix unchanged. It would be a “vacuous” row operation.
For , if we multiply the first row by , add this to the second row, and replace the second row with the result, we get the new matrix .
The determinant of the new matrix is The determinant is unchanged!
If we perform the same operation and replace the first row, the new matrix is .
The determinant of the new matrix is Once again, the determinant is unchanged!
The Determinant of the Product of Two Matrices
The determinant of the product of two matrices is related to the determinants of the factors. In fact, if you think in terms of transformations, it should be clear that the determinant of the product is the product of the determinants.
Why? Let and be matrices. Let and be linear transformations defined by and . And let be such that exists.
As seen in Section 1.8, “Matrix Multiplication and Composite Transformations”, the composition will be defined by the matrix product . Therefore
.
But, just as clearly, thinking step-by-step with each transformation individually,
.
Thus, .
Let’s confirm that this works out entry-wise. Let and . Then
.
Hence,
.
On the other hand, the product of the determinants is the same: .
Using mathematical induction, it can be shown that this property works for the product of a finite number of matrices. That is, .
Also note that since , if is invertible, then . Therefore, when is invertible.
Summary of Observations and an Algorithm for Calculating Determinants
Even though we have not defined higher-dimensional determinants yet, we now summarize all these observations in a theorem that works in any dimension. The calculations above are sufficient to prove this theorem for the case where . The proof of the case where will be an exercise. We will not prove this theorem for an arbitrary positive integer .
An upper triangular matrix has all zeros below its main diagonal (from upper left to lower right). A lower triangular matrix has all zeros above its main diagonal. A triangular matrix is one that is either upper triangular or lower triangular.
Theorem 1.10.2: For a square matrix, the following facts are true. a) The determinant of a triangular matrix is the product of the entries on the main diagonal. b) Interchanging two rows multiplies the determinant by . c) Multiplying a row by a constant multiplies the determinant by that same constant (though this is only an elementary row operation when the constant is nonzero). d) Performing a row replacement row operation leaves the determinant unchanged. e) The determinant of the product of a finite number of matrices is the product of their individual determinants. f) The determinant of an inverse matrix is the multiplicative inverse of the determinant of the original matrix.
Part (c) also implies that if is an matrix and is a scalar (a number), then .
An Algorithm to Compute Determinants
The first four parts of this theorem give us an algorithm to compute the determinant of any square matrix.
- Row reduce the matrix to a row echelon form (REF), keeping track of your row operations along the way.
- Compute the determinant of the REF, which will be an upper triangular matrix. That determinant will be the product of the entries on the main diagonal of the upper triangular matrix (part (a) of Theorem 1.10.2).
- Finally, use the theorem (parts (b) through (d)) to compute the determinant of the original matrix.
It’s a bit silly to use this method for a matrix. On the other hand, it can definitely be handy for higher-dimensional matrices, where the determinant calculations are often much more complicated.
Two-Dimensional Example
But let’s illustrate this method with a two-dimensional example anyway. Let . Here is a sequence of row operations to obtain a REF of .
The final matrix is now in row echelon form (it is not necessary to go all the way to reduced row echelon form (RREF)). Our row operations were to 1) multiply row one by the nonzero constant and 2) do a row replacement operation.
Now the determinant of the final upper triangular matrix is . Therefore, by Theorem 1.10.2, the determinant of the original matrix is .
Obviously, this can be quickly confirmed by direct computation from the entries of .
Review: Our Original Motivation for the Determinant
Recall from Section 1.3, “Systems of Linear Equations in Two Dimensions” our original motivation for the determinant. We wanted to give a condition under which an arbitrary system of two equations and two unknowns would have a unique solution.
Here is the result. A system of the form
,
has unique solution if and only if . That is, there is a unique solution if and only if the determinant of the system’s coefficient matrix is nonzero.
For higher dimensions, we want to define the determinant so that this fact generalizes. In other words, we want to be able to say that a system of linear equations in unknowns has a unique solution if and only if the determinant of the coefficient matrix of the system is nonzero.
Determinants of Three-Dimensional Matrices
Near the end of Section 1.9, “The Inverse Matrix of a Linear Transformation”, we saw that the formula for the determinant of a matrix is:
.
Derivation of the Formula in the Three-Dimensional Case
There was no derivation previously given for this formula. Let’s give one now. Let’s do row operations to (partially) see that an arbitrary linear system with three equations and three unknowns will have a unique solution if and only if the determinant of its coefficient matrix is nonzero.
We can write such an arbitrary system as follows:
The corresponding augmented matrix for this system would have a last (fourth) column consisting of the entries , and . The values in this column as we perform row operations are irrelevant to seeing whether there is a unique solution or not.
Instead, we can just focus on the first three columns. In other words, we can just perform row operations on the coefficient matrix. Our goal is to obtain an REF (upper triangular) form of this matrix and then think about its meaning in terms of the original system.
Row Operations on the Coefficient Matrix
For convenience, we will assume that we are never dividing by zero during the following computation. In particular, we are assuming that . The case where has to be handled separately. Here are the computations. Make sure you check each of these.
Continuing,
And,
Relationship to the Determinant
Note that we are also assuming that and in the preceding computations.
Now the question is this. Under what condition on the quantity in the lower right corner of this last matrix will the original system be guaranteed to not have a unique solution? This would mean it would have no solutions or infinitely many.
Remember that the quantity in the lower right corner of the last matrix above is the coefficient of in the row equivalent system that corresponds to the REF form. This new system is guaranteed to not have a unique solution if that coefficient is zero. Make sure you think about why this makes sense!
Therefore, the condition for lack of a unique solution is . By expansion, this is equivalent to the equation
.
But this simplifies to . Since we are assuming that , this is equivalent to
But the expression is the determinant of the coefficient matrix of the system!
Ultimately, we can say that the original linear system of three equations and three unknowns has a unique solution if and only if the determinant of its coefficient matrix is nonzero.
Geometric Interpretations of Three-Dimensional Determinants
Let be a matrix with columns , in that order, so . If this ordered list of vectors is oriented according to the right-hand rule (see the link for a picture and description), then is positive and is the volume of the parallelepiped determined by the vectors. This is a slanted box-like shape that is essentially a three-dimensional analog of a parallelogram. It is pictured below.
Let be a linear transformation. Let be a matrix such that for all .
Suppose is a “nice” three-dimensional “blob” in space that has a well-defined volume. Then, in analogy with the area interpretation in the two-dimensional situation, we have
.
Suppose, under the mapping, that the orientation of the ordered list , , and does not follow the right-hand rule. Then we can consider the signed volume of the parallelepiped determined by these three vectors to be negative (and would undergo some kind of higher-dimensional “flipping” under the action of ). If the orientation continues to follow the right-hand rule, then its signed volume is considered to be positive.
In both of these cases, we have
.
Computation of a Three-Dimensional Determinant Via Row Operations
Let’s illustrate the use of the first four parts of Theorem 1.10.2 in computing the determinant of a matrix. Let
.
Here’s the computation using the formula above
.
Now let’s use row operations to obtain an REF of that is an upper triangular matrix. We can even do this using only row replacement operations so the determinant does not change.
By multiplying the entries on the main diagonal, we confirm that .
This determinant is negative. Here’s an animation illustrating this fact. It shows how the orientation of the ordered list of vectors (red), (blue), and (green) gets “flipped” while applying the mapping to obtain the ordered list of images , , and . Notice how the green vector gets reoriented relative to the other two vectors as it transforms into .
High-Dimensional Determinants
Let be an matrix. If , the most common way to compute the determinant of is via a so-called cofactor (Laplace) expansion across the first row of . This consists of an alternating sum of multiples of determinants of certain submatrices of .
Recall the formula for the determinant of a matrix:
.
Notice that the expressions , , and are determinants of, respectively, the submatrices , , and .
The first submatrix is obtained by deleting the first row and first column of (the same row and column that the entry is in). The second submatrix is obtained by deleting the first row and second column of (the same row and column that the entry is in). And the third submatrix is obtained by deleting the first row and third column of (the same row and column that the entry is in).
Also note that the signs of the multiples in the formula alternate .
Building on this Idea
It turns out we can iteratively build on this idea for higher-dimensional matrices. For instance,
,
where , and are the submatrices obtained by deleting the first row along with, respectively, the first, second, third, and fourth columns of . For instance, .
This pattern can then be used to build to determinants of matrices, then matrices, etc… As you might imagine, the computations become very laborous.
We also note that it is possible to expand the determinant alternating sum along any other row or column. If a row or column has many zeros, it is especially advantageous (work-saving) to expand along that row or column.
An Example
Let’s compute the determinant of a matrix. Then we will confirm once again that the first four parts of Theorem 1.10.2 give the same answer. To be more efficient, we also introduce and use the shorthand “absolute value” notation for the determinant of a matrix. Don’t let this make you think that determinants must be non-negative, however!
.
Continuing, we get
.
And now we check this by using row operations to REF.
Therefore, since row replacement operations leave the determinant unchanged, we confirm that .
Geometric Intepretation
The determinant of an matrix, where , has a geometric interpretation. But this geometric interpretation cannot be literally imagined with our limited three-dimensional minds.
We can certainly describe this interpretation in symbols, however. Suppose a set is “nice” in the sense that its -dimensional (hyper-) volume can be defined. Suppose is an matrix and let be the corresponding linear transformation. Then
.
Furthermore, if the columns of are the column vectors , then is the -dimensional (hyper-) volume of the -dimensional parallelepiped determined by these vectors. In symbols, this parallelepiped is defined by .
If , then a set will undergo some type of “flipping” as is applied, and we could consider the signed (hyper-) volume of to be equal to .
If , then is “degenerate” in that it maps sets with positive (hyper-) volume to sets with zero (hyper-) volume.
A Few Other Applications of the Determinant of a Matrix
As you would expect, it turns out that the determinant of a matrix being nonzero is sufficient for a linear system with the same number of equations as unknowns to have a unique solution.
We will not prove this fact, but here is its statement.
Theorem 1.10.3: A system of linear equations in unknowns has a unique solution if and only if the determinant of its coefficient matrix is nonzero. Furthermore, if the determinant of the coefficient matrix is zero, the system will either have no solution or infinitely many solutions.
Cramer’s Rule
Historically, determinants were sometimes found to be useful for the computation of solutions of linear systems via Cramer’s Rule. We will state Cramer’s Rule here, but we will not use it.
First, we need some notation. Let be an matrix and let . Let be the matrix obtained from by replacing the column of by .
Theorem 1.10.4 (Cramer’s Rule): Suppose is an invertible matrix an let be the right-hand side vector of a system of linear equations whose coefficient matrix is (in matrix/vector form, the system is ). Then the unique solution has entry equal to .
Eigenvalues, Differential Equations, and Difference Equations
Finally, we allude to the fact that in Chapter 3 of this online text, we will make use of determinants for the computation of so-called “eigenvalues” of square matrices. These are numbers that characterize a given square matrix in useful ways.
Most prominently, especially in light of ideas in Section 1.1, “Points, Coordinates, and Graphs in Two Dimensions”, they are intimately related to important kinds of changes of coordinates. These coordinate changes are then extremely useful in, for example, the subject of ordinary differential equations (ODEs). In particular, they are a problem-solving tool for helping us solve and understand solutions of linear systems of differential equations. On the discrete side of things, we will also find them useful for solving linear difference equations (recurrence relations).
Exercises
- Compute the determinant of the matrix in two ways: a) using the direct formula (cofactor expansion along the top row) and b) using row operations and Theorem 1.10.2. Is invertible? If so, what is ?
- Compute the determinant of the matrix in two ways: a) using the direct formula (cofactor expansion along the top row) and b) using row operations and Theorem 1.10.2. Is invertible? If so, what is ?
- Prove Theorem 1.10.2 in the case where .