Math Core

Lesson 9.4 · Systems and Matrices

Determinants

Every square matrix has a single number attached to it, its determinant, that answers a surprising number of questions at once. Is the matrix invertible? Does the system AX=BAX = B have exactly one solution? What is the area of the triangle with these three vertices? In the last lesson you met the 2×22 \times 2 determinant ad−bcad - bc inside the inverse formula. This lesson extends it to 3×33 \times 3 matrices, lists its most useful properties and puts it to work.

The 2 × 2 determinant

Definition

Determinant of a 2 × 2 matrix

The determinant of A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} is

det⁡A=∣abcd∣=ad−bc.\det A = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc.

Vertical bars around the entries mean "determinant of", not absolute value; a determinant can be negative.

A handy picture: multiply down the main diagonal, then subtract the product up the other diagonal. For example,

∣5−234∣=5(4)−(−2)(3)=20+6=26.\begin{vmatrix} 5 & -2 \\ 3 & 4 \end{vmatrix} = 5(4) - (-2)(3) = 20 + 6 = 26.

The 3 × 3 determinant by cofactor expansion

For a 3×33 \times 3 matrix, the determinant is built out of 2×22 \times 2 determinants. The minor MijM_{ij} of an entry is the determinant left over when you cross out that entry's row and column. The cofactor is the minor with a sign attached: Cij=(−1)i+jMijC_{ij} = (-1)^{i+j}M_{ij}. The signs follow a checkerboard pattern:

[+−+−+−+−+]\begin{bmatrix} + & - & + \\ - & + & - \\ + & - & + \end{bmatrix}

Cofactor expansion

To find the determinant of a 3×33 \times 3 matrix, choose any row or column. Multiply each entry in it by its cofactor, and add. Expanding along the first row,

∣a11a12a13a21a22a23a31a32a33∣=a11∣a22a23a32a33∣−a12∣a21a23a31a33∣+a13∣a21a22a31a32∣.\begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} = a_{11}\begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} - a_{12}\begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{13}\begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix}.

Every row and every column gives the same answer, so choose the one with the most zeros.

Worked example: A 3 × 3 determinant

Evaluate det⁡A\det A for A=[2−1304152−2]A = \begin{bmatrix} 2 & -1 & 3 \\ 0 & 4 & 1 \\ 5 & 2 & -2 \end{bmatrix}.

Expand along the first row, remembering the signs +, −, ++,\,-,\,+:

det⁡A=2∣412−2∣−(−1)∣015−2∣+3∣0452∣=2(−8−2)+1(0−5)+3(0−20)=−20−5−60=−85.\begin{aligned} \det A &= 2\begin{vmatrix} 4 & 1 \\ 2 & -2 \end{vmatrix} - (-1)\begin{vmatrix} 0 & 1 \\ 5 & -2 \end{vmatrix} + 3\begin{vmatrix} 0 & 4 \\ 5 & 2 \end{vmatrix} \\ &= 2(-8 - 2) + 1(0 - 5) + 3(0 - 20) \\ &= -20 - 5 - 60 \\ &= -85. \end{aligned}

As a check, expand down the first column, which has a zero: 2(−10)−0+5∣−1341∣=−20+5(−1−12)=−20−65=−852(-10) - 0 + 5\begin{vmatrix} -1 & 3 \\ 4 & 1 \end{vmatrix} = -20 + 5(-1 - 12) = -20 - 65 = -85. ✓

Common mistake

The most common error in cofactor expansion is dropping a sign. The middle term of a first-row expansion is subtracted, and when that entry is itself negative, as with the −1-1 above, the two negatives make a plus. Write the checkerboard signs down before you start.

Properties that save work

You rarely need to expand a large determinant from scratch. These facts, stated for an n×nn \times n matrix AA, cover most situations:

PropertyEffect
Triangular matrix (all zeros above or below the diagonal)det⁡A\det A is the product of the diagonal entries
Swap two rowsthe determinant changes sign
Multiply one row by kkthe determinant is multiplied by kk
Add a multiple of one row to anotherthe determinant does not change
A row of zeros, or two equal rowsdet⁡A=0\det A = 0
Scale the whole matrixdet⁡(kA)=kndet⁡A\det(kA) = k^n \det A
Productsdet⁡(AB)=det⁡A⋅det⁡B\det(AB) = \det A \cdot \det B

The scaling rule surprises many students: 2A2A doubles every row, so for a 3×33 \times 3 matrix the determinant is multiplied by 2⋅2⋅2=82 \cdot 2 \cdot 2 = 8, not by 22.

Most important of all:

Determinants and invertibility

A square matrix AA is invertible if and only if det⁡A≠0\det A \ne 0. Equivalently, the system AX=BAX = B has exactly one solution for every BB exactly when det⁡A≠0\det A \ne 0. When AA is invertible, det⁡(A−1)=1det⁡A\det(A^{-1}) = \dfrac{1}{\det A}.

Area with determinants

The absolute value of a 2×22 \times 2 determinant is an area. If a parallelogram has sides given by the vectors ⟨a,c⟩\langle a, c\rangle and ⟨b,d⟩\langle b, d\rangle, its area is ∣ad−bc∣\left| ad - bc \right|. A triangle with the same two sides is half of that parallelogram.

To find the area of a triangle with vertices P1(x1,y1)P_1(x_1, y_1), P2(x2,y2)P_2(x_2, y_2) and P3(x3,y3)P_3(x_3, y_3), form the two side vectors from P1P_1 and take half the absolute determinant:

Area=12∣ ∣x2−x1y2−y1x3−x1y3−y1∣ ∣.\text{Area} = \frac{1}{2}\left|\,\begin{vmatrix} x_2 - x_1 & y_2 - y_1 \\ x_3 - x_1 & y_3 - y_1 \end{vmatrix}\,\right|.

Worked example: Area of a triangle

Find the area of the triangle with vertices (1,1)(1, 1), (5,2)(5, 2) and (2,6)(2, 6).

From (1,1)(1, 1), the sides are ⟨4,1⟩\langle 4, 1\rangle and ⟨1,5⟩\langle 1, 5\rangle.

Area=12∣ ∣4115∣ ∣=12∣20−1∣=192.\text{Area} = \frac{1}{2}\left|\,\begin{vmatrix} 4 & 1 \\ 1 & 5 \end{vmatrix}\,\right| = \frac{1}{2}\left| 20 - 1 \right| = \frac{19}{2}.
The triangle has area 19/2 = 9.5 square units.Open in grapher →

Cramer's rule

Determinants also give a formula for the solution of a square system with det⁡A≠0\det A \ne 0. For the system ax+by=eax + by = e, cx+dy=fcx + dy = f, let

D=∣abcd∣,Dx=∣ebfd∣,Dy=∣aecf∣.D = \begin{vmatrix} a & b \\ c & d \end{vmatrix}, \qquad D_x = \begin{vmatrix} e & b \\ f & d \end{vmatrix}, \qquad D_y = \begin{vmatrix} a & e \\ c & f \end{vmatrix}.

DxD_x replaces the xx-column with the constants, and DyD_y replaces the yy-column. Then x=DxDx = \dfrac{D_x}{D} and y=DyDy = \dfrac{D_y}{D}. The same pattern works for three equations with 3×33 \times 3 determinants.

Worked example: Cramer's rule

Solve 3x−2y=43x - 2y = 4 and 5x+y=115x + y = 11.

D=∣3−251∣=3+10=13,Dx=∣4−2111∣=4+22=26,Dy=∣34511∣=33−20=13.D = \begin{vmatrix} 3 & -2 \\ 5 & 1 \end{vmatrix} = 3 + 10 = 13, \quad D_x = \begin{vmatrix} 4 & -2 \\ 11 & 1 \end{vmatrix} = 4 + 22 = 26, \quad D_y = \begin{vmatrix} 3 & 4 \\ 5 & 11 \end{vmatrix} = 33 - 20 = 13.

So x=2613=2x = \dfrac{26}{13} = 2 and y=1313=1y = \dfrac{13}{13} = 1. Check: 3(2)−2(1)=43(2) - 2(1) = 4 and 5(2)+1=115(2) + 1 = 11. ✓

Tip

Cramer's rule is fastest when you need only one of the variables: compute DD and a single numerator determinant, and you are done.

Practice

Practice 1

Evaluate ∣7321∣\begin{vmatrix} 7 & 3 \\ 2 & 1 \end{vmatrix}.

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

Practice 2

Evaluate ∣−345−2∣\begin{vmatrix} -3 & 4 \\ 5 & -2 \end{vmatrix}.

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

Practice 3

Evaluate det⁡A\det A for A=[1203−14021]A = \begin{bmatrix} 1 & 2 & 0 \\ 3 & -1 & 4 \\ 0 & 2 & 1 \end{bmatrix}.

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

Practice 4

Evaluate det⁡A\det A for A=[25−70−31004]A = \begin{bmatrix} 2 & 5 & -7 \\ 0 & -3 & 1 \\ 0 & 0 & 4 \end{bmatrix}.

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

Practice 5

AA is a 3×33 \times 3 matrix with det⁡A=5\det A = 5. What is det⁡(2A)\det(2A)?

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

Practice 6

Find all values of xx for which ∣x34x−1∣=8\begin{vmatrix} x & 3 \\ 4 & x - 1 \end{vmatrix} = 8.

Separate answers with commas, e.g. 2, -5

Practice 7

Find the area of the triangle with vertices (0,0)(0, 0), (6,1)(6, 1) and (2,5)(2, 5).

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

Practice 8

Use Cramer's rule to solve 2x+3y=122x + 3y = 12 and 4x−y=104x - y = 10.

Enter a point like (2, -3)