The Determinant of a Square Matrix

Visual Linear Algebra Online, Section 1.10

The absolute value of the determinant of a <img src='https://s0.wp.com/latex.php?latex=2%5Ctimes+2&bg=ffffff&fg=000000&s=0' alt='2\times 2' title='2\times 2' class='latex' /> matrix gives the area of the parallelogram determined by its column vectors.
The absolute value of the determinant of a 2\times 2 matrix gives the area of the parallelogram determined by its column vectors.

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 {\bf v}=\left[\begin{array}{c} a \\ c \end{array}\right] and {\bf w}=\left[\begin{array}{c} b \\ d \end{array}\right] as shown below.

The determinant of a matrix has a beautiful geometric interpretation in two dimensions.
Two copies of each of the two the vectors {\bf v}=\left[\begin{array}{c} a \\ c \end{array}\right] and {\bf w}=\left[\begin{array}{c} b \\ d \end{array}\right].

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 {\bf v} and {\bf w}, the 2\times 2 matrix A=[{\bf v}\  {\bf w}]=\left[\begin{array}{cc} a & b \\ c & d \end{array}\right]. That is,

\mbox{Area of Parallelogram}=|\det(A)|=|ad-bc|.

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.

The determinant of a matrix has a beautiful geometric interpretation in two dimensions. It also has a beautiful derivation.
The area of the white parallelogram is the area of the entire surrounding rectangle minus the area of the four triangles and the two small rectangles.

Assume, as illustrated, that a,b,c,d>0. We are also assuming in this picture that a>b and c<d so that ad>bc. Then we can say that

\mbox{Area of Parallelogram}=\mbox{Area of Surrounding Rectangle}-(\mbox{Area of All 4 Triangles}+\mbox{Area of Both Small Rectangles})

=(a+b)(c+d)-((ac+bd)+2bc)=ac+ad+bc+bd-ac-bd-2bc=ad-bc.

This last expression is equal to |ad-bc| for the picture above because we are assuming that ad>bc and therefore ad-bc>0.

In the case where ad<bc, the area would equal bc-ad>0. But that is also the same as |ad-bc| when ad<bc.

If {\bf v} and {\bf w} are parallel, then {\bf v}=\lambda {\bf w} for some nonzero scalar \lambda. But then a=\lambda b and c=\lambda d and ad-bc=\lambda bd-\lambda bd=0. 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 T:{\Bbb R}^{2}\longrightarrow {\Bbb R}^{2} be a linear transformation. And let A be a 2\times 2 matrix such that T({\bf x})=A{\bf x} for all {\bf x}\in {\Bbb R}^{2}. Furthermore, let S\subseteq {\Bbb R}^{2} 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 S is some sort of generic “blob” with a piecewise-smooth boundary.

In this setting, the area of the image T(S)=\{T({\bf x})\ |\ {\bf x}\in S\} is related in an elegant way to the area of S. The relationship can be expressed with the equation

\mbox{Area}(T(S))=|\det(A)|\cdot \mbox{Area}(S)=|ad-bc|\cdot \mbox{Area}(S)

when A=\left[\begin{array}{cc} a & b \\ c & d \end{array}\right].

Furthermore, if S undergoes a “flipping” as T is applied (without being precise about what “flipping” means), then we could think of the image T(S) as having a negative “signed area”. In this situation, we can write

\mbox{SignedArea}(T(S))=\det(A)\cdot \mbox{Area}(S)=(ad-bc)\cdot \mbox{Area}(S).

All this also means that if \det(A)=0, then T 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 S undergoing a “flipping” as T is applied. We can do this with an example and an animation.

Let A=\left[\begin{array}{cc} 1 & 2 \\ 2 & 1\end{array}\right] and let T({\bf x})=A{\bf x}. Then \det(A)=1\cdot 1-2\cdot 2=1-4=-3. So, for this linear transformation, we can say that \mbox{Area}(T(S))=3\cdot \mbox{Area}(S) and \mbox{SignedArea}(T(S))=-3\cdot \mbox{Area}(S).

Let S be the region inside the five-petal flower shape (outlined in red) in the animation below. We visually see that S seems to be undergoing a “flipping” to obtain the image region T(S) (outlined in blue) as the animation parameter \lambda increases from 0 to 1. The area of T(S) is also three times as large as the area of S. Its signed area is negative three times the area of S.

The signed area of the image region is the determinant of the matrix times the original area of the region.
An animation showing S (the region inside the red flower shape) get mapped to T(S) (the region inside the blue flower shape) while undergoing a ‘flipping’. This happens because the determinant of the matrix representative A of T is negative. The signed area of the image T(S) is negative three times the area of S.

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 2\times 2 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 2\times 2 matrix has the form \left[\begin{array}{cc} a & b \\ 0 & d\end{array}\right]. 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 2\times 2 matrix has the form \left[\begin{array}{cc} a & 0 \\ c & d\end{array}\right]. 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 2\times 2 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 2\times 2 matrix is the product of the entries along the main diagonal. In formulas, \det\left(\left[\begin{array}{cc} a & b \\ 0 & d\end{array}\right]\right)=ad and \det\left(\left[\begin{array}{cc} a & 0 \\ c & d\end{array}\right]\right)=ad.

Behavior of Determinants under Elementary Row Operations

Let A=\left[\begin{array}{cc} a & b \\ c & d\end{array}\right] so that \det(A)=ad-bc. Let’s explore how the determinant of this matrix is affected if we perform elementary row operations to A to obtain related (row equivalent) matrices.

Interchanging Rows

If we interchange the rows of A, the new matrix obtained is B=\left[\begin{array}{cc} c & d \\ a & b\end{array}\right]. This allows us to conclude that \det(B)=cb-da=-(ad-bc)=-\det(A).

Therefore, swapping the rows of a 2\times 2 matrix causes the determinant to change by a factor of -1. This fact will generalize to higher dimensions.

Multiplying a Row by a Constant

If we multiply the first row of A by a constant \lambda, the new matrix obtained is B=\left[\begin{array}{cc} \lambda a & \lambda b \\ c & d\end{array}\right]. This allows us to conclude that \det(B)=\lambda ad-\lambda bc=\lambda(ad-bc)=\lambda\det(A).

If we multiply the second row of A by a constant \lambda, the new matrix obtained is B=\left[\begin{array}{cc}  a &  b \\ \lambda c & \lambda d\end{array}\right]. This allows us to conclude that \det(B)=a(\lambda d)-b(\lambda c)=\lambda(ad-bc)=\lambda\det(A).

Therefore, a row of a 2\times 2 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 \lambda\not=0.

Note that this also means that if we multiply all the entries of A (both rows) by the same constant \lambda to get a new matrix B=\lambda A, then \det(B)=\det(\lambda A)=\lambda^{2}\det(A). This generalizes to higher dimensions, though the power of \lambda changes to match the number of rows (and columns) of the square matrix in question.

Also note that \lambda A is new notation that represents multiplying the entire matrix A by the scalar \lambda. This operation is defined by multiplication of every entry of A by \lambda.

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 A=\left[\begin{array}{cc} a & b \\ c & d\end{array}\right], if we multiply the first row by \lambda, add this to the second row, and replace the second row with the result, we get the new matrix B=\left[\begin{array}{cc} a & b \\ \lambda a+c & \lambda b+d\end{array}\right].

The determinant of the new matrix is \det(B)=a(\lambda b+d)-b(\lambda a+c)=\lambda ab+ad-\lambda ab-bc=ad-bc=\det(A). The determinant is unchanged!

If we perform the same operation and replace the first row, the new matrix is B=\left[\begin{array}{cc} a+\lambda c & b+\lambda d \\ c & d\end{array}\right].

The determinant of the new matrix is \det(B)=(a+\lambda c)d-(b+\lambda d)c=ad+\lambda cd-bc-\lambda cd=ad-bc=\det(A). 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 A and B be 2\times 2 matrices. Let S and T be linear transformations defined by S({\bf x})=A{\bf x} and T({\bf x})=B{\bf x}. And let X\subseteq {\Bbb R}^{2} be such that \mbox{Area}(X) exists.

As seen in Section 1.8, “Matrix Multiplication and Composite Transformations”, the composition S\circ T:{\Bbb R}^{2}\longrightarrow {\Bbb R}^{2} will be defined by the matrix product (S\circ T)({\bf x})=S(T({\bf x}))=A(B{\bf x})=(AB){\bf x}. Therefore

\mbox{SignedArea}((S\circ T)(X))=\det(AB)\cdot \mbox{Area}(X).

But, just as clearly, thinking step-by-step with each transformation individually,

\mbox{SignedArea}((S\circ T)(X))=\det(A)\cdot (\det(B)\cdot \mbox{Area}(X))

=(\det(A)\cdot \det(B))\cdot \mbox{Area}(X).

Thus, \det(AB)=\det(A)\cdot \det(B)=\det(A)\det(B).

Let’s confirm that this works out entry-wise. Let A=\left[\begin{array}{cc} a & b  \\ c & d \end{array}\right] and B=\left[\begin{array}{cc} e & f  \\ g & h \end{array} \right]. Then

AB=\left[\begin{array}{cc} ae+bg & af+bh  \\ ce+dg & cf+dh \end{array}\right].

Hence, \det(AB)=(ae+bg)(cf+dh)-(af+bh)(ce+dg)

=acef+adeh+bcfg+bdgh-acef-adfg-bceh-bdgh

=adeh-adfg-bceh+bcfg.

On the other hand, the product of the determinants is the same: \det(A)\det(B)=(ad-bc)(eh-fg)=adeh-adfg-bceh+bcfg.

Using mathematical induction, it can be shown that this property works for the product of a finite number of 2\times 2 matrices. That is, \det(A_{1}\cdot A_{2}\cdots A_{m})=\det(A_{1})\cdot \det(A_{2})\cdots \det(A_{m}).

Also note that since \det(I_{2})=\det\left(\left[\begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right]\right)=1, if A is invertible, then 1=\det(I_{2})=\det(A^{-1}A)=\det(A^{-1})\det(A). Therefore, \det(A^{-1})=\frac{1}{\det(A)}=(\det(A))^{-1} when A 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 n=2. The proof of the case where n=3 will be an exercise. We will not prove this theorem for an arbitrary positive integer n.

An upper triangular n\times n matrix has all zeros below its main diagonal (from upper left to lower right). A lower triangular n\times n matrix has all zeros above its main diagonal. A triangular n\times n matrix is one that is either upper triangular or lower triangular.

Theorem 1.10.2: For a square n\times n 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 -1. 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 n\times n 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 A is an n\times n matrix and \lambda is a scalar (a number), then \det(\lambda A)=\lambda^{n}\det(A).

An Algorithm to Compute Determinants

The first four parts of this theorem give us an algorithm to compute the determinant of any square matrix.

  1. Row reduce the matrix to a row echelon form (REF), keeping track of your row operations along the way.
  2. 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).
  3. 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 2\times 2 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 A=\left[\begin{array}{cc} 2 & -6 \\ -3 & 5\end{array}\right]. Here is a sequence of row operations to obtain a REF of A.

\left[\begin{array}{cc} 2 & -6 \\ -3 & 5\end{array}\right]\xrightarrow{\frac{1}{2}R_{1}\rightarrow R_{1}}\left[\begin{array}{cc} 1 & -3 \\ -3 & 5\end{array}\right]\xrightarrow{3R_{1}+R_{2}\rightarrow R_{2}}\left[\begin{array}{cc} 1 & -3 \\ 0 & -4\end{array}\right]

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 \frac{1}{2} and 2) do a row replacement operation.

Now the determinant of the final upper triangular matrix B=\left[\begin{array}{cc} 1 & -3 \\ 0 & -4\end{array}\right] is \det(B)=1\cdot -4=-4. Therefore, by Theorem 1.10.2, the determinant of the original matrix A is \det(A)=2\det(B)=2\cdot (-4)=-8.

Obviously, this can be quickly confirmed by direct computation from the entries of A.

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

\begin{cases}\begin{array}{ccccc} ax & + & by & = & u \\ cx & + & dy & = & v\end{array}\end{cases},

has unique solution (x,y)=\left(\frac{du-bv}{ad-bc},\frac{av-cu}{ad-bc}\right) if and only if ad-bc\not=0. 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 n linear equations in n 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 3\times 3 matrix A is:

\det(A)=\det\left(\left[\begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array}\right]\right)=a(ei-fh)-b(di-fg)+c(dh-eg)

=aei-afh-bdi+bfg+cdh-ceg.

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:

\begin{cases}\begin{array}{ccccccc} ax & + & by & + & cz & = & u \\ dx & + & ey & + & fz & = & v \\ gx & + & hy & + & iz & = & w\end{array}\end{cases}

The corresponding augmented matrix for this system would have a last (fourth) column consisting of the entries u, v, and w. 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 a\not=0. The case where a=0 has to be handled separately. Here are the computations. Make sure you check each of these.

\left[\begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array}\right]\xrightarrow{\frac{1}{a}R_{1}\rightarrow R_{1}}\left[\begin{array}{ccc} 1 & \frac{b}{a} & \frac{c}{a} \\ d & e & f \\ g & h & i \end{array}\right]\xrightarrow{\begin{array}{c} -dR_{1}+R_{2}\rightarrow R_{2} \\ -gR_{1}+R_{3}\rightarrow R_{3}\end{array}}\left[\begin{array}{ccc} 1 & \frac{b}{a} & \frac{c}{a} \\ 0 & \frac{ae-bd}{a} & \frac{af-cd}{a} \\ 0 & \frac{ah-bg}{a} & \frac{ai-cg}{a} \end{array}\right]

Continuing,

\left[\begin{array}{ccc} 1 & \frac{b}{a} & \frac{c}{a} \\ 0 & \frac{ae-bd}{a} & \frac{af-cd}{a} \\ 0 & \frac{ah-bg}{a} & \frac{ai-cg}{a} \end{array}\right]\xrightarrow{\begin{array}{c} \frac{a}{ae-bd}R_{2}\rightarrow R_{2} \\ \frac{a}{ah-bg}R_{3}\rightarrow R_{3} \end{array}}\left[\begin{array}{ccc} 1 & \frac{b}{a} & \frac{c}{a} \\ 0 & 1 & \frac{af-cd}{ae-bd} \\ 0 & 1 & \frac{ai-cg}{ah-bg} \end{array}\right]

And,

\left[\begin{array}{ccc} 1 & \frac{b}{a} & \frac{c}{a} \\ 0 & 1 & \frac{af-cd}{ae-bd} \\ 0 & 1 & \frac{ai-cg}{ah-bg} \end{array}\right]\xrightarrow{-R_{2}+R_{3}\rightarrow R_{3}}\left[\begin{array}{ccc} 1 & \frac{b}{a} & \frac{c}{a} \\ 0 & 1 & \frac{af-cd}{ae-bd} \\ 0 & 0 & \frac{(ai-cg)(ae-bd)-(af-cd)(ah-bg)}{(ah-bg)(ae-bd)} \end{array}\right]

Relationship to the Determinant

Note that we are also assuming that ah-bg\not=0 and ae-bd\not=0 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 z 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 (ai-cg)(ae-bd)-(af-cd)(ah-bg)=0. By expansion, this is equivalent to the equation

a^{2}ei-abdi-aceg+bcdg-(a^{2}fh-abfg-acdh+bcdg)=0.

But this simplifies to a(aei-bdi-ceg-afh+bfg+cdh)=0. Since we are assuming that a\not=0, this is equivalent to aei-afh-bdi+bfg+cdh-ceg=a(ei-fh)-b(di-fg)+c(dh-eg)=0.

But the expression a(ei-fh)-b(di-fg)+c(dh-eg) is the determinant of the 3\times 3 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 3\times 3 coefficient matrix is nonzero.

Geometric Interpretations of Three-Dimensional Determinants

Let A be a 3\times 3 matrix with columns {\bf u}, {\bf v},{\bf w}\in {\Bbb R}^{3}, in that order, so A=[{\bf u}\ {\bf v}\ {\bf w}]. If this ordered list of vectors is oriented according to the right-hand rule (see the link for a picture and description), then \det(A) 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.

The determinant of a matrix gives the volume of a parallelepiped determined by its column vectors, when they satisfy the right-hand rule.
The vectors {\bf u}, {\bf v}, and {\bf w} are oriented according to the right-hand rule. The determinant of the matrix whose columns are these vectors (in order) is the volume of the parallelepiped determined by the three vectors.

Let T:{\Bbb R}^{3}\longrightarrow {\Bbb R}^{3} be a linear transformation. Let A be a 3\times 3 matrix such that T({\bf x})=A{\bf x} for all {\bf x}\in {\Bbb R}^{3}.

Suppose S\subseteq {\Bbb R}^{3} 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

\mbox{Volume}(T(S))=|\det(A)|\cdot \mbox{Volume}(S).

Suppose, under the mapping, that the orientation of the ordered list T({\bf u}), T({\bf v}), and T({\bf w}) 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 S would undergo some kind of higher-dimensional “flipping” under the action of T). 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

\mbox{SignedVolume}(T(S))=\det(A)\cdot \mbox{Volume}(S).

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 3\times 3 matrix. Let

A=\left[\begin{array}{ccc} 1 & -2 & 3 \\ 2 & 1 & -2 \\ -1 & 1 & -2 \end{array}\right].

Here’s the computation using the formula above

\det(A)=1\cdot (1\cdot (-2)-(-2)\cdot 1)-(-2)\cdot (2\cdot (-2)-(-2)\cdot (-1))+3\cdot (2\cdot 1-1\cdot (-1))

=-2+2-8-4+6+3=0-12+9=-3.

Now let’s use row operations to obtain an REF of A that is an upper triangular matrix. We can even do this using only row replacement operations so the determinant does not change.

\left[\begin{array}{ccc} 1 & -2 & 3 \\ 2 & 1 & -2 \\ -1 & 1 & -2 \end{array}\right]\xrightarrow{\begin{array}{c} -2R_{1}+R_{2}\rightarrow R_{2} \\ R_{1}+R_{3}\rightarrow R_{3} \end{array}}\left[\begin{array}{ccc} 1 & -2 & 3 \\ 0 & 5 & -8 \\ 0 & -1 & 1 \end{array}\right]\xrightarrow{\frac{1}{5}R_{2}+R_{3}\rightarrow R_{3}}\left[\begin{array}{ccc} 1 & -2 & 3 \\ 0 & 5 & -8 \\ 0 & 0 & -\frac{3}{5}\end{array}\right]

By multiplying the entries on the main diagonal, we confirm that \det(A)=1\cdot 5\cdot \left(-\frac{3}{5}\right)=-3.

This determinant is negative. Here’s an animation illustrating this fact. It shows how the orientation of the ordered list of vectors {\bf u}=\left[\begin{array}{c} 1 \\ 0 \\ 0 \end{array}\right] (red), {\bf v}=\left[\begin{array}{c} 0 \\ 1 \\ 0 \end{array}\right] (blue), and {\bf w}=\left[\begin{array}{c} 0 \\ 0 \\ 1 \end{array}\right] (green) gets “flipped” while applying the mapping T({\bf x})=A{\bf x} to obtain the ordered list of images T({\bf u}), T({\bf v}), and T({\bf w}). Notice how the green vector {\bf w} gets reoriented relative to the other two vectors as it transforms into T({\bf w}).

The determinant of a matrix is directly related to volume and signed volume under a linear transformation.
The determinant of the matrix of this transformation T:{\Bbb R}^{3}\longrightarrow {\Bbb R}^{3} is negative. The orientation of the ordered list {\bf u}, {\bf v}, and {\bf w} gets ‘flipped’ as it transforms into the ordered list T({\bf u}), T({\bf v}), and T({\bf w}). The position of the green vector relative to the red and blue vectors is what gets flipped. This means that the overall orientation of the triad of vectors changes from one that follows the right-hand rule to one that does not follow the right-hand rule.

High-Dimensional Determinants

Let A be an n\times n matrix. If n>3, the most common way to compute the determinant of A is via a so-called cofactor (Laplace) expansion across the first row of A. This consists of an alternating sum of multiples of determinants of certain (n-1)\times (n-1) submatrices of A.

Recall the formula for the determinant of a 3\times 3 matrix:

\det(A)=\det\left(\left[\begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array}\right]\right)=a(ei-fh)-b(di-fg)+c(dh-eg).

Notice that the expressions ei-fh, di-fg, and dh-eg are determinants of, respectively, the 2\times 2 submatrices \left[\begin{array}{cc} e & f \\ h & i \end{array}\right], \left[\begin{array}{cc} d & f \\ g & i \end{array}\right], and \left[\begin{array}{cc} d & e \\ g & h \end{array}\right].

The first submatrix is obtained by deleting the first row and first column of A (the same row and column that the entry a is in). The second submatrix is obtained by deleting the first row and second column of A (the same row and column that the entry b is in). And the third submatrix is obtained by deleting the first row and third column of A (the same row and column that the entry c 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,

\det(A)=\det\left(\left[\begin{array}{cccc} a & b & c & d \\ e & f & g & h \\ i & j & k & \ell \\ m & n & o & p \end{array}\right]\right)

=a\det(A_{11})-b\det(A_{12})+c\det(A_{13})-d\det(A_{14}),

where A_{11}, A_{12}, A_{13}, and A_{14} are the 3\times 3 submatrices obtained by deleting the first row along with, respectively, the first, second, third, and fourth columns of A. For instance, A_{13}=\left[\begin{array}{ccc} e & f & h \\ i & j & \ell \\ m & n & p \end{array}\right].

This pattern can then be used to build to determinants of 5\times 5 matrices, then 6\times 6 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 4\times 4 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 |A|=\det(A) for the determinant of a matrix. Don’t let this make you think that determinants must be non-negative, however!

\det(A)=|A|=\left|\begin{array}{cccc} 1 & 3 & 0 & -2\\ -4 & 2 & 3 & 1 \\ 0 & 2 & 1 & -4 \\ 0 & -5 & -2 & 1 \end{array}\right|

=1\cdot \left|\begin{array}{ccc} 2 & 3 & 1 \\ 2 & 1 & -4 \\ -5 & -2 & 1\end{array}\right|-3\cdot \left|\begin{array}{ccc} -4 & 3 & 1 \\ 0 & 1 & -4 \\ 0 & -2 & 1\end{array}\right|+0-(-2)\cdot \left|\begin{array}{ccc} -4 & 2 & 3 \\ 0 & 2 & 1 \\ 0 & -5 & -2\end{array}\right|.

Continuing, we get

\det(A)=[2(1-8)-3(2-20)+(-4+5)]-[3(-4(1-8))]+[2(-4(-4+5))]

=[-14+54+1]-84-8=-51.

And now we check this by using row operations to REF.

\left[\begin{array}{cccc} 1 & 3 & 0 & -2\\ -4 & 2 & 3 & 1 \\ 0 & 2 & 1 & -4 \\ 0 & -5 & -2 & 1 \end{array}\right]\xrightarrow{4R_{1}+R_{2}\rightarrow R_{2}}\left[\begin{array}{cccc} 1 & 3 & 0 & -2\\ 0 & 14 & 3 & -7 \\ 0 & 2 & 1 & -4 \\ 0 & -5 & -2 & 1 \end{array}\right] \xrightarrow{\begin{array}{c} -\frac{1}{7}R_{2}+R_{3}\rightarrow R_{3} \\ \frac{5}{14}R_{2}+R_{4}\rightarrow R_{4}\end{array}}\left[\begin{array}{cccc} 1 & 3 & 0 & -2\\ 0 & 14 & 3 & -7 \\ 0 & 0 & \frac{4}{7} & -3 \\ 0 & 0 & -\frac{13}{14} & -\frac{3}{2} \end{array}\right]\xrightarrow{\frac{13}{8}R_{3}+R_{4}\rightarrow R_{4}}\left[\begin{array}{cccc} 1 & 3 & 0 & -2\\ 0 & 14 & 3 & -7 \\ 0 & 0 & \frac{4}{7} & -3 \\ 0 & 0 & 0 & -\frac{51}{8} \end{array}\right]

Therefore, since row replacement operations leave the determinant unchanged, we confirm that \det(A)=1\cdot 14\cdot \frac{4}{7}\cdot (-\frac{51}{8})=-51.

Geometric Intepretation

The determinant of an n\times n matrix, where n>3, 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 S\subseteq {\Bbb R}^{n} is “nice” in the sense that its n-dimensional (hyper-) volume \mbox{Vol}_{n}(S) can be defined. Suppose A is an n\times n matrix and let T({\bf x})=A{\bf x} be the corresponding linear transformation. Then

\mbox{Vol}_{n}(T(S))=|\det(A)|\cdot \mbox{Vol}_{n}(S).

Furthermore, if the columns of A are the column vectors {\bf v}_{1}, {\bf v}_{2},\ldots, {\bf v}_{n}, then |\det(A)| is the n-dimensional (hyper-) volume of the n-dimensional parallelepiped determined by these vectors. In symbols, this parallelepiped is defined by \left\{c_{1}{\bf v}_{1}+c_{2}{\bf v}_{2}+\cdots+c_{n}{\bf v}_{n}\ |\ 0\leq c_{i}\leq 1\mbox{ for each }i=1,2,\ldots,n\right\}.

If \det(A)<0, then a set S\subseteq {\Bbb R}^{n} will undergo some type of “flipping” as T is applied, and we could consider the signed (hyper-) volume of T(S) to be equal to \det(A)\cdot\mbox{Vol}_{n}(S)<0.

If \det(A)=0, then T 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 n linear equations in n 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 A be an n\times n matrix and let {\bf b}\in {\Bbb R}^{n}. Let A_{i}({\bf b}) be the n\times n matrix obtained from A by replacing the i^{th} column of A by {\bf b}.

Theorem 1.10.4 (Cramer’s Rule): Suppose A is an invertible n\times n matrix an let {\bf b}\in {\Bbb R}^{n} be the right-hand side vector of a system of linear equations whose coefficient matrix is A (in matrix/vector form, the system is A{\bf x}={\bf b}). Then the unique solution {\bf x}\in {\Bbb R}^{n} has i^{th} entry equal to x_{i}=\frac{\det(A_{i}({\bf b}))}{\det(A)}.

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

  1. Compute the determinant of the matrix A=\left[\begin{array}{ccc} 1 & -3 & 4 \\ -1 & 1 & 5 \\ 4 & -3 & 2 \end{array}\right] 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 A invertible? If so, what is \det(A^{-1})?
  2. Compute the determinant of the matrix A=\left[\begin{array}{cccc} 2 & 4 & -2 & 0 \\ 1 & 3 & -1 & 1 \\ 2 & 4 & -3 & -5 \\ 0 & -2 & 2 & 5 \end{array}\right] 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 A invertible? If so, what is \det(A^{-1})?
  3. Prove Theorem 1.10.2 in the case where n=3.