Math Core

Lesson 3.3 · Determinants

Cramer's rule, area and volume

Determinants give you exact formulas where row reduction gives only an algorithm: a formula for each variable in a system Ax=bA\mathbf{x} = \mathbf{b}, a formula for every entry of A−1A^{-1}, and a formula for the area or volume of a parallelogram or parallelepiped. The last one explains the claim from the start of the unit that det⁡A\det A is the factor by which AA scales area.

Cramer's rule

For an n×nn \times n matrix AA and a vector b\mathbf{b} in Rn\mathbb{R}^n, write Ai(b)A_i(\mathbf{b}) for the matrix you get by replacing column ii of AA with b\mathbf{b}.

Cramer's rule

If AA is an invertible n×nn \times n matrix, then for every b\mathbf{b} in Rn\mathbb{R}^n the unique solution of Ax=bA\mathbf{x} = \mathbf{b} has entries

xi=det⁡Ai(b)det⁡A,i=1,2,…,n.x_i = \frac{\det A_i(\mathbf{b})}{\det A}, \qquad i = 1, 2, \ldots, n.

The proof is short and worth seeing. Let Ii(x)I_i(\mathbf{x}) be the identity matrix with column ii replaced by x\mathbf{x}. Multiplying by AA acts column by column: Aej=ajA\mathbf{e}_j = \mathbf{a}_j for j≠ij \neq i, and Ax=bA\mathbf{x} = \mathbf{b} in column ii. So

A Ii(x)=Ai(b).A \, I_i(\mathbf{x}) = A_i(\mathbf{b}).

Expanding det⁡Ii(x)\det I_i(\mathbf{x}) across row ii shows it equals xix_i. Taking determinants and using the multiplicative property, (det⁡A) xi=det⁡Ai(b)(\det A)\,x_i = \det A_i(\mathbf{b}). Divide by det⁡A≠0\det A \neq 0 and you're done.

Worked example: Cramer's rule for a 2 × 2 system

Solve 3x1−2x2=114x1+5x2=7\begin{aligned} 3x_1 - 2x_2 &= 11 \\ 4x_1 + 5x_2 &= 7 \end{aligned}.

det⁡A=∣3−245∣=15+8=23.\det A = \begin{vmatrix} 3 & -2 \\ 4 & 5 \end{vmatrix} = 15 + 8 = 23.

Replace column 1, then column 2, by b=(11,7)\mathbf{b} = (11, 7):

det⁡A1(b)=∣11−275∣=55+14=69,det⁡A2(b)=∣31147∣=21−44=−23.\det A_1(\mathbf{b}) = \begin{vmatrix} 11 & -2 \\ 7 & 5 \end{vmatrix} = 55 + 14 = 69, \qquad \det A_2(\mathbf{b}) = \begin{vmatrix} 3 & 11 \\ 4 & 7 \end{vmatrix} = 21 - 44 = -23.

So x1=6923=3x_1 = \dfrac{69}{23} = 3 and x2=−2323=−1x_2 = \dfrac{-23}{23} = -1. Check: 3(3)−2(−1)=113(3) - 2(-1) = 11 and 4(3)+5(−1)=74(3) + 5(-1) = 7. The solution is (3,−1)(3, -1).

Worked example: Cramer's rule for a 3 × 3 system

Solve x1+2x2+x3=4x2+3x3=−12x1−x2+x3=−1\begin{aligned} x_1 + 2x_2 + x_3 &= 4 \\ x_2 + 3x_3 &= -1 \\ 2x_1 - x_2 + x_3 &= -1 \end{aligned}.

Expanding across row 1 each time:

det⁡A=∣1210132−11∣=1(1+3)−2(0−6)+1(0−2)=14,det⁡A1(b)=∣421−113−1−11∣=4(4)−2(2)+1(2)=14,det⁡A2(b)=∣1410−132−11∣=1(2)−4(−6)+1(2)=28,det⁡A3(b)=∣12401−12−1−1∣=1(−2)−2(2)+4(−2)=−14.\begin{aligned} \det A &= \begin{vmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 2 & -1 & 1 \end{vmatrix} = 1(1 + 3) - 2(0 - 6) + 1(0 - 2) = 14, \\ \det A_1(\mathbf{b}) &= \begin{vmatrix} 4 & 2 & 1 \\ -1 & 1 & 3 \\ -1 & -1 & 1 \end{vmatrix} = 4(4) - 2(2) + 1(2) = 14, \\ \det A_2(\mathbf{b}) &= \begin{vmatrix} 1 & 4 & 1 \\ 0 & -1 & 3 \\ 2 & -1 & 1 \end{vmatrix} = 1(2) - 4(-6) + 1(2) = 28, \\ \det A_3(\mathbf{b}) &= \begin{vmatrix} 1 & 2 & 4 \\ 0 & 1 & -1 \\ 2 & -1 & -1 \end{vmatrix} = 1(-2) - 2(2) + 4(-2) = -14. \end{aligned}

So x1=1414=1x_1 = \dfrac{14}{14} = 1, x2=2814=2x_2 = \dfrac{28}{14} = 2, x3=−1414=−1x_3 = \dfrac{-14}{14} = -1, and the solution is (1,2,−1)(1, 2, -1).

Common mistake

Cramer's rule applies only when det⁡A≠0\det A \neq 0. If det⁡A=0\det A = 0, the system has either no solution or infinitely many, and Cramer's rule says nothing about which; use row reduction. Also, for anything bigger than 3×33 \times 3, Cramer's rule is far slower than row reduction. Its value is theoretical: it shows exactly how the solution depends on the entries of AA and b\mathbf{b}.

A formula for the inverse

Column jj of A−1A^{-1} is the solution of Ax=ejA\mathbf{x} = \mathbf{e}_j. Apply Cramer's rule to that system and expand det⁡Ai(ej)\det A_i(\mathbf{e}_j) down column ii: the only nonzero entry is the 11 in row jj, which leaves the cofactor CjiC_{ji}. So the (i,j)(i, j) entry of A−1A^{-1} is Cji/det⁡AC_{ji}/\det A.

Definition

Adjugate

The adjugate of AA, written adj⁡A\operatorname{adj} A, is the transpose of the matrix of cofactors: its (i,j)(i, j) entry is CjiC_{ji}. If AA is invertible,

A−1=1det⁡Aadj⁡A.A^{-1} = \frac{1}{\det A}\operatorname{adj} A.

Notice the index swap: the (i,j)(i, j) entry of the inverse uses the cofactor from position (j,i)(j, i). For a 2×22 \times 2 matrix this formula is the familiar 1ad−bc[d−b−ca]\dfrac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}. For larger matrices it's mainly useful when you need just one entry of A−1A^{-1}.

Area of a parallelogram

Area and volume

If AA is 2×22 \times 2, the area of the parallelogram spanned by the columns of AA is ∣det⁡A∣|\det A|.

If AA is 3×33 \times 3, the volume of the parallelepiped spanned by the columns of AA is ∣det⁡A∣|\det A|.

Here is why. For a diagonal matrix [a00d]\begin{bmatrix} a & 0 \\ 0 & d \end{bmatrix} the parallelogram is a rectangle with area ∣a∣∣d∣=∣det⁡A∣|a||d| = |\det A|. Any other matrix can be reduced to diagonal form by column interchanges and column replacements. An interchange just relabels the two edges (same parallelogram, sign of the determinant flips, absolute value unchanged). A replacement a1→a1+c a2\mathbf{a}_1 \to \mathbf{a}_1 + c\,\mathbf{a}_2 slides one edge along a line parallel to the other: that's a shear, which keeps the same base and height, so the area stays the same, and so does the determinant. The same argument works in three dimensions with base area times height.

Because the determinant doesn't care whether you use rows or columns, you can put the vectors in as rows or as columns.

Worked example: A parallelogram not at the origin

Find the area of the parallelogram with vertices (−1,1)(-1, 1), (3,2)(3, 2), (0,4)(0, 4) and (4,5)(4, 5).

First translate so a vertex sits at the origin; translation doesn't change area. The two edges leaving (−1,1)(-1, 1) are

(3,2)−(−1,1)=(4,1),(0,4)−(−1,1)=(1,3).(3, 2) - (-1, 1) = (4, 1), \qquad (0, 4) - (-1, 1) = (1, 3).

(Check: (−1,1)+(4,1)+(1,3)=(4,5)(-1, 1) + (4, 1) + (1, 3) = (4, 5), the fourth vertex.)

The parallelogram with edges (4, 1) and (1, 3) leaving the vertex (-1, 1).Open in grapher →
Area=∣∣4113∣∣=∣12−1∣=11.\text{Area} = \left|\begin{vmatrix} 4 & 1 \\ 1 & 3 \end{vmatrix}\right| = |12 - 1| = 11.

A triangle with the same three vertices (−1,1)(-1, 1), (3,2)(3, 2), (0,4)(0, 4) is half of this parallelogram, so its area is 112\dfrac{11}{2}.

In three dimensions it works the same way: the parallelepiped spanned by (2,0,1)(2, 0, 1), (1,3,0)(1, 3, 0) and (0,1,4)(0, 1, 4) has volume

∣∣210031104∣∣=∣2(12−0)−1(0−1)+0∣=25.\left|\begin{vmatrix} 2 & 1 & 0 \\ 0 & 3 & 1 \\ 1 & 0 & 4 \end{vmatrix}\right| = |2(12 - 0) - 1(0 - 1) + 0| = 25.

Linear transformations scale area by ∣det⁡A∣|\det A|

Now the big picture. Let T(x)=AxT(\mathbf{x}) = A\mathbf{x} with AA a 2×22 \times 2 matrix. A parallelogram spanned by p\mathbf{p} and q\mathbf{q} is carried to the parallelogram spanned by ApA\mathbf{p} and AqA\mathbf{q}, whose area is

∣det⁡[ Ap    Aq ]∣=∣det⁡(A[ p    q ])∣=∣det⁡A∣⋅∣det⁡[ p    q ]∣.\bigl|\det[\,A\mathbf{p} \;\; A\mathbf{q}\,]\bigr| = \bigl|\det(A[\,\mathbf{p} \;\; \mathbf{q}\,])\bigr| = |\det A| \cdot \bigl|\det[\,\mathbf{p} \;\; \mathbf{q}\,]\bigr|.

So every parallelogram's area is multiplied by the same factor ∣det⁡A∣|\det A|. Any reasonable region can be approximated by tiny squares, so the same holds for all of them.

Scaling by a linear transformation

If T(x)=AxT(\mathbf{x}) = A\mathbf{x} with AA a 2×22 \times 2 matrix and SS is a region of finite area in R2\mathbb{R}^2, then

area of T(S)=∣det⁡A∣⋅area of S.\text{area of } T(S) = |\det A| \cdot \text{area of } S.

The same holds for volume in R3\mathbb{R}^3 with AA a 3×33 \times 3 matrix.

Worked example: The area of an ellipse

Find the area enclosed by the ellipse x29+y24=1\dfrac{x^2}{9} + \dfrac{y^2}{4} = 1.

The matrix A=[3002]A = \begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix} sends the unit disk u2+v2≤1u^2 + v^2 \le 1 to this ellipse region: if (x,y)=(3u,2v)(x, y) = (3u, 2v), then x29+y24=u2+v2\dfrac{x^2}{9} + \dfrac{y^2}{4} = u^2 + v^2. The unit disk has area π\pi, and det⁡A=6\det A = 6, so the ellipse encloses area 6π6\pi. In general, the ellipse with semi-axes aa and bb has area πab\pi ab.

Tip

A negative determinant is not a mistake. Its sign tells you the transformation reverses orientation (like a reflection). Area is always the absolute value.

Practice

Practice 1

Use Cramer's rule to solve 3x1+2x2=75x1+4x2=13\begin{aligned} 3x_1 + 2x_2 &= 7 \\ 5x_1 + 4x_2 &= 13 \end{aligned}.

Enter a point like (2, -3)

Practice 2

Use Cramer's rule to solve 2x1−x2=43x1+4x2=1\begin{aligned} 2x_1 - x_2 &= 4 \\ 3x_1 + 4x_2 &= 1 \end{aligned}.

Enter a point like (2, -3)

Practice 3

Use Cramer's rule to find only x2x_2 for the system

2x1+x2−x3=3x1+3x2+2x3=1x1+x3=4\begin{aligned} 2x_1 + x_2 - x_3 &= 3 \\ x_1 + 3x_2 + 2x_3 &= 1 \\ x_1 + x_3 &= 4 \end{aligned}

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Let A=[120314201]A = \begin{bmatrix} 1 & 2 & 0 \\ 3 & 1 & 4 \\ 2 & 0 & 1 \end{bmatrix}. Use the adjugate formula to find the (1,3)(1, 3) entry of A−1A^{-1} without computing the rest of the inverse.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find the area of the parallelogram with vertices (2,−1)(2, -1), (7,0)(7, 0), (4,2)(4, 2) and (9,3)(9, 3).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find the area of the triangle with vertices (1,−1)(1, -1), (7,0)(7, 0) and (3,4)(3, 4).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Find the volume of the parallelepiped with one vertex at the origin and adjacent vertices at (1,0,2)(1, 0, 2), (3,1,−1)(3, 1, -1) and (0,4,1)(0, 4, 1).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Let T(x)=AxT(\mathbf{x}) = A\mathbf{x} with A=[21−13]A = \begin{bmatrix} 2 & 1 \\ -1 & 3 \end{bmatrix}, and let SS be the disk of radius 22 centered at the origin. Find the area of T(S)T(S).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.