Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

A.6 Determinant

For square matrices we define a useful quantity called the determinant. Define the determinant of a 1×11 \times 1 matrix as the value of its only entry

det([a])=defa.\det \left( \begin{bmatrix} a \end{bmatrix} \right) \overset{\text{def}}{=} a. \nonumber

For a 2×22 \times 2 matrix, define

det([abcd])=defadbc.\det \left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \right) \overset{\text{def}}{=} ad-bc. \nonumber

Before defining the determinant for larger matrices, we note the meaning of the determinant. An n×nn \times n matrix gives a mapping of the nn-dimensional euclidean space n{\mathbb{R}}^n to itself. So a 2×22 \times 2 matrix AA is a mapping of the plane to itself. The determinant of AA is the factor by which the area of objects changes. If we take the unit square (square of side 1) in the plane, then AA takes the square to a parallelogram of area |det(A)|\lvert\det(A)\rvert. The sign of det(A)\det(A) denotes a change of orientation (negative if the axes get flipped). For example, let

A=[1111].A = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix}. \nonumber

Then det(A)=1+1=2\det(A) = 1+1 = 2. Let us see where AA sends the unit square—the square with vertices (0,0)(0,0), (1,0)(1,0), (0,1)(0,1), and (1,1)(1,1). The point (0,0)(0,0) gets sent to (0,0)(0,0).

[1111][10]=[11],[1111][01]=[11],[1111][11]=[20].\begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}, \qquad \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \qquad \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix}. \nonumber

The image of the square is another square with vertices (0,0)(0,0), (1,1)(1,-1), (1,1)(1,1), and (2,0)(2,0). The image square has a side of length 2\sqrt{2}, and it is therefore of area 22. See Figure 1\PageIndex{1}.

Interactive figureImage of the unit square: area = |det A|Drag the Lower-right entry d slider from -2 to 2.
A dashed square sits with one corner at the origin, and a solid four-sided figure shares that corner — the square's image, leaning over and stretched into a parallelogram. Dragging the lower-right entry down from where it opens swings one pair of its sides: the parallelogram narrows until it flattens completely onto a single line segment with no area at all, the matrix at that setting having no inverse, and then opens out again on the other side with its corners traversed the opposite way round. Dragging it up from the opening view only widens the figure; the flat setting lies below the opening view, not above it. Adjustable parameter: Lower-right entry d (d) = 1. Viewing window: x from -3.75 to 5.75, y from -3.44 to 2.44.
XYZ Graph · viewer build 5edf91b
A = [1 1; −1 d] applied to the unit square (dashed blue) — at the default d = 1 this is the section's own example, det A = 2, and the image parallelogram (orange) has area |det A| = |d + 1|. Drag d down through −1 to collapse the parallelogram onto a single segment (area 0, the two columns identical, so A is not invertible), then keep going to see the orientation flip that the sign of det A records.
Image, which is rotated and enlarged, of the unit square via the mapping A
Figure 1\PageIndex{1}: Image of the unit square via the mapping AA.

In general, the image of a square is going to be a parallelogram. In high school geometry, you may have seen a formula for computing the area of a with vertices (0,0)(0,0), (a,c)(a,c), (b,d)(b,d) and (a+b,c+d)(a+b,c+d). The area is

|det([abcd])|=|adbc|.\left\lvert \, \det \left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \right) \, \right\lvert = \lvert a d - b c \rvert. \nonumber

The vertical lines above mean absolute value. The matrix [abcd]\left[ \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right] carries the unit square to the given parallelogram.

A translucent 3D parallelepiped spanned by the three column vectors (1,0,0), (a,1,0) and (0.4,0.3,1.2), drawn as six faces. Dragging the shear slider a from -1.5 to 1.5 makes the solid lean sideways like a stack of cards, but its volume stays exactly 1.2 - the absolute value of the determinant, unchanged by adding a multiple of one column to another.Explore in 3D (opens in a new tab)
The parallelepiped spanned by the columns u = (1, 0, 0), v = (a, 1, 0), w = (0.4, 0.3, 1.2). Drag the shear slider a: the solid leans, but its volume - the determinant, here 1.2 - never changes, because adding a multiple of one column to another leaves the determinant alone. The 3D sibling of the unit-square figure above.

There are a number of ways to define the determinant for an n×nn \times n matrix. Let us use the so-called cofactor expansion. We define AijA_{ij} as the matrix AA with the ithi^{\text{th}} row and the jthj^{\text{th}} column deleted. For example, if

IfA=[123456789],thenA12=[4679]andA23=[1278].\text{If} \qquad A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}, \qquad \text{then} \qquad A_{12} = \begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} \qquad \text{and} \qquad A_{23} = \begin{bmatrix} 1 & 2 \\ 7 & 8 \end{bmatrix}. \nonumber

We now define the determinant recursively

det(A)=defj=1n(1)1+ja1jdet(A1j),\det (A) \overset{\text{def}}{=} \sum_{j=1}^n {(-1)}^{1+j} a_{1j} \det (A_{1j}), \nonumber

or in other words

det(A)=a11det(A11)a12det(A12)+a13det(A13){+a1ndet(A1n)if n is odd,a1ndet(A1n)if n even.\det (A) = a_{11} \det (A_{11}) - a_{12} \det (A_{12}) + a_{13} \det (A_{13}) - \cdots \begin{cases} + a_{1n} \det (A_{1n}) & \text{if } n \text{ is odd,} \\ - a_{1n} \det (A_{1n}) & \text{if } n \text{ even.} \end{cases} \nonumber

For a 3×33 \times 3 matrix, we get det(A)=a11det(A11)a12det(A12)+a13det(A13)\det (A) = a_{11} \det (A_{11}) - a_{12} \det (A_{12}) + a_{13} \det (A_{13}). For example,

det([123456789])=1·det([5689])2·det([4679])+3·det([4578])=1(5·96·8)2(4·96·7)+3(4·85·7)=0.\begin{align}\begin{aligned} \det \left( \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \right) & = 1 \cdot \det \left( \begin{bmatrix} 5 & 6 \\ 8 & 9 \end{bmatrix} \right) - 2 \cdot \det \left( \begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} \right) + 3 \cdot \det \left( \begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix} \right) \\ & = 1 (5 \cdot 9 - 6 \cdot 8) - 2 (4 \cdot 9 - 6 \cdot 7) + 3 (4 \cdot 8 - 5 \cdot 7) = 0. \end{aligned}\end{align} \nonumber

It turns out that we did not have to necessarily use the first row. That is for any ii,

det(A)=j=1n(1)i+jaijdet(Aij).\det (A) = \sum_{j=1}^n {(-1)}^{i+j} a_{ij} \det (A_{ij}). \nonumber

It is sometimes useful to use a row other than the first. In the following example it is more convenient to expand along the second row. Notice that for the second row we are starting with a negative sign.

det([123050789])=0·det([2389])+5·det([1379])0·det([1278])=0+5(1·93·7)+0=60.\begin{align}\begin{aligned} \det \left( \begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} \right) & = - 0 \cdot \det \left( \begin{bmatrix} 2 & 3 \\ 8 & 9 \end{bmatrix} \right) + 5 \cdot \det \left( \begin{bmatrix} 1 & 3 \\ 7 & 9 \end{bmatrix} \right) - 0 \cdot \det \left( \begin{bmatrix} 1 & 2 \\ 7 & 8 \end{bmatrix} \right) \\ & = 0 + 5 (1 \cdot 9 - 3 \cdot 7) + 0 = -60. \end{aligned}\end{align} \nonumber

Let us check if it is really the same as expanding along the first row,

det([123050789])=1·det([5089])2·det([0079])+3·det([0578])=1(5·90·8)2(0·90·7)+3(0·85·7)=60.\begin{align}\begin{aligned} \det \left( \begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} \right) & = 1 \cdot \det \left( \begin{bmatrix} 5 & 0 \\ 8 & 9 \end{bmatrix} \right) - 2 \cdot \det \left( \begin{bmatrix} 0 & 0 \\ 7 & 9 \end{bmatrix} \right) + 3 \cdot \det \left( \begin{bmatrix} 0 & 5 \\ 7 & 8 \end{bmatrix} \right) \\ & = 1 (5 \cdot 9 - 0 \cdot 8) - 2 (0 \cdot 9 - 0 \cdot 7) + 3 (0 \cdot 8 - 5 \cdot 7) = -60. \end{aligned}\end{align} \nonumber

In computing the determinant, we alternately add and subtract the determinants of the submatrices AijA_{ij} multiplied by aija_{ij} for a fixed ii and all jj. The numbers (1)i+jdet(Aij){(-1)}^{i+j}\det(A_{ij}) are called cofactors of the matrix. And that is why this method of computing the determinant is called the cofactor expansion.

60-60
A determinant by second-row cofactor expansion ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text A determinant by second-row cofactor expansion, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.The text expands this determinant along the second row (where the zeros make the work short) and again along the first row, getting -60 both times. The build recomputes it directly, so the stated value is checked on every rebuild.

Similarly we do not need to expand along a row, we can expand along a column. For any jj,

det(A)=i=1n(1)i+jaijdet(Aij).\det (A) = \sum_{i=1}^n {(-1)}^{i+j} a_{ij} \det (A_{ij}). \nonumber

A related fact is that

det(A)=det(AT).\det (A) = \det (A^T). \nonumber

A matrix is upper triangular if all elements below the main diagonal are 00. For example,

[123056009]\begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 6 \\ 0 & 0 & 9 \end{bmatrix} \nonumber

is upper triangular. Similarly a lower triangular matrix is one where everything above the diagonal is zero. For example,

[100450789].\begin{bmatrix} 1 & 0 & 0 \\ 4 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix}. \nonumber

The determinant for triangular matrices is very simple to compute. Consider the lower triangular matrix. If we expand along the first row, we find that the determinant is 1 times the determinant of the lower triangular matrix [5089]\left[ \begin{smallmatrix} 5 & 0 \\ 8 & 9 \end{smallmatrix} \right]. So the deteriminant is just the product of the diagonal entries:

det([100450789])=1·5·9=45.\det \left( \begin{bmatrix} 1 & 0 & 0 \\ 4 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} \right) = 1 \cdot 5 \cdot 9 = 45. \nonumber

Similarly for upper triangular matrices

det([123056009])=1·5·9=45.\det \left( \begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 6 \\ 0 & 0 & 9 \end{bmatrix} \right) = 1 \cdot 5 \cdot 9 = 45. \nonumber

In general, if AA is triangular, then

det(A)=a11a22ann.\det (A) = a_{11} a_{22} \cdots a_{nn}. \nonumber

If AA is diagonal, then it is also triangular (upper and lower), so same formula applies. For example,

det([200030005])=2·3·5=30.\det \left( \begin{bmatrix} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 5 \end{bmatrix} \right) = 2 \cdot 3 \cdot 5 = 30. \nonumber

In particular, the identity matrix II is diagonal, and the diagonal entries are all 1. Thus,

det(I)=1.\det(I) = 1. \nonumber

The determinant is telling you how geometric objects scale. If BB doubles the sizes of geometric objects and AA triples them, then ABAB (which applies BB to an object and then it applies AA) should make size go up by a factor of 66. This is true in general:

This property is one of the most useful, and it is employed often to actually compute determinants. A particularly interesting consequence is to note what it means for the existence of inverses. Take AA and BB to be inverses, that is AB=IAB=I. Then

det(A)det(B)=det(AB)=det(I)=1.\det(A)\det(B) = \det(AB) = \det(I) = 1. \nonumber

Neither det(A)\det(A) nor det(B)\det(B) can be zero. This fact is an extremely useful property of the determinant, and one which is used often in this book:

In fact, det(A1)det(A)=1\det(A^{-1}) \det(A) = 1 says that

det(A1)=1det(A).\det(A^{-1}) = \frac{1}{\det(A)}. \nonumber

So we know what the determinant of A1A^{-1} is without computing A1A^{-1}.

Let us return to the formula for the inverse of a 2×22 \times 2 matrix:

[abcd]1=1adbc[dbca].\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}. \nonumber

Notice the determinant of the matrix [abcd][\begin{smallmatrix}a&b\\c&d\end{smallmatrix}] in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise we are dividing by zero.

A common notation for the determinant is a pair of vertical lines:

|abcd|=det([abcd]).\begin{vmatrix} a & b \\ c & d \end{vmatrix} = \det \left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \right). \nonumber

Personally, I find this notation confusing as vertical lines usually mean a positive quantity, while determinants can be negative. Also think about how to write the absolute value of a determinant. This notation is not used in this book.

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.