§ 01What is a Determinant?
The determinant is a function that takes a square matrix and returns a single real number. That number summarises one of the most important structural facts about the matrix: whether or not it is invertible.
We write the determinant of a matrix A as either det(A) or |A|. The vertical bars here do not mean absolute value, they are a standard notation for the determinant.
The determinant has a precise algebraic definition (a signed sum of products), but it is best understood through three lenses: algebraic (a formula), geometric (a scaling factor for area/volume), and structural (a test for invertibility). We will develop all three.
Determinants are only defined for square matrices: 1×1, 2×2, 3×3, and so on. A 3×4 matrix has no determinant.
§ 02The 2×2 Determinant
For the smallest non-trivial case, the formula is clean and easy to remember: multiply the main diagonal, subtract the anti-diagonal.
Apply the formula: det = (3)(4) − (2)(1) = 12 − 2 = 10.
det = (6)(1) − (2)(3) = 6 − 6 = 0.
det = (−4)(−3) − (7)(2) = 12 − 14 = −2.
§ 03The 3×3 Determinant
There are two standard methods for 3×3 determinants: the Rule of Sarrus (a diagonal shortcut, only valid for 3×3) and cofactor expansion (which generalises to any size).
Method 1 — Rule of Sarrus
Copy the first two columns to the right of the matrix. Multiply along each of the six diagonals: three going down-right (positive), three going down-left (negative). Sum the six products.
- Positive: (1·5·9) + (2·6·7) + (3·4·8) = 45 + 84 + 96 = 225
- Negative: (3·5·7) + (1·6·8) + (2·4·9) = 105 + 48 + 72 = 225
- det = 225 − 225 = 0
Method 2 — Cofactor Expansion (Laplace Expansion)
Pick any row or column. For each entry in that row/column, multiply it by its cofactor (its minor determinant with a sign) and sum the results. Expanding along the row or column with the most zeros minimises computation.
Cofactor Expansion — Step by Step
- Choose a row or column to expand along (pick the one with the most zeros).
- For each entry aij in that row/column, compute its minor Mij: the determinant of the (n−1)×(n−1) matrix formed by deleting row i and column j.
- Multiply by the cofactor sign (−1)i+j. The sign pattern for a 3×3 is shown below.
- Sum: det(A) = Σ aij · (−1)i+j · Mij
Cofactor Sign Pattern (3×3)
Sign = (−1)row+col
Expand along row 1 (no zeros, but row 2 has a zero: let's expand along row 2 to save work).
Expanding along row 2: entries are 0, 4, −2.
- Entry 0 at (2,1): skip (zero × anything = 0).
- Entry 4 at (2,2): sign = (−1)2+2 = +1. Minor M22 = det([[2,3],[1,5]]) = 10−3 = 7. Contribution: 4·(+1)·7 = 28.
- Entry −2 at (2,3): sign = (−1)2+3 = −1. Minor M23 = det([[2,−1],[1,0]]) = 0−(−1) = 1. Contribution: (−2)·(−1)·1 = 2.
- det(B) = 0 + 28 + 2 = 30.
C is lower triangular. Expand along row 1 (two zeros).
- Entry 5 at (1,1): sign +1. Minor M11 = det([[3,0],[1,−1]]) = −3−0 = −3. Contribution: 5·1·(−3) = −15.
- Entries 0 and 0: contribute nothing.
§ 04Row Operations and the Determinant
Row reduction (Gaussian elimination) transforms a matrix into a simpler form. Understanding how each row operation affects the determinant lets you compute det of large matrices efficiently.
Since Operation 3 does not change the determinant, reduce to row-echelon (triangular) form using only that operation, then multiply the diagonal. Track sign changes from any row swaps along the way.
- R2 ← R2 + (3/2)R1: row becomes [0, 1/2, 1/2].
- R3 ← R3 + R1: row becomes [0, 2, 1].
- R3 ← R3 − 4·R2: row becomes [0, 2−4·(1/2), 1−4·(1/2)] = [0, 0, −1].
- No row swaps, sign unchanged. Upper triangular diagonal: 2, 1/2, −1.
- det(D) = 2 · (1/2) · (−1) = −1.
§ 05Geometric Meaning — Area, Volume, and Orientation
The determinant is not merely an algebraic curiosity, it has a vivid geometric interpretation that explains why it appears throughout calculus, physics, and computer graphics.
The sign of the determinant encodes orientation. A positive determinant means the transformation preserves orientation (right-hand rule intact); a negative determinant means it reverses orientation (a reflection is involved).
Form the matrix with these vectors as columns: [[3,1],[1,4]].
det = 3·4 − 1·1 = 12 − 1 = 11.
det([[1,0,1],[0,2,1],[0,0,3]]), upper triangular!
det = 1 · 2 · 3 = 6.
§ 06Key Properties of Determinants
These properties allow rapid evaluation and underpin many theoretical results. Know them cold.
- det(2A²B) = det(2I · A · A · B), treat 2 as scalar on a 3×3 matrix.
- det(kA) = k³·det(A) for a 3×3, so det(2A) = 8·det(A). More directly:
- det(2A²B) = 2³ · det(A)² · det(B) = 8 · 9 · (−2) = −144.
§ 07Cramer's Rule
For a square system Ax = b where det(A) ≠ 0, Cramer's Rule gives each unknown as a ratio of determinants. It is elegant but computationally expensive for large systems, use row reduction for anything larger than 3×3 in practice.
where Ai is the matrix A with column i replaced by the right-hand side vector b.
- A = [[2,1],[1,−3]]. det(A) = (2)(−3) − (1)(1) = −6 − 1 = −7.
- A1 (replace col 1 with b = [5, −1]): det([[5,1],[−1,−3]]) = −15 − (−1) = −14. x = −14/−7 = 2.
- A2 (replace col 2 with b): det([[2,5],[1,−1]]) = −2 − 5 = −7. y = −7/−7 = 1.
§ 08The Inverse via the Adjugate
The determinant also appears in the explicit formula for the matrix inverse. For an invertible matrix A:
where adj(A) is the adjugate (also called the classical adjoint), the transpose of the matrix of cofactors.
For a 2×2 matrix this simplifies to a beautifully clean formula:
Swap the diagonal entries, negate the off-diagonal entries, divide by the determinant.
- det(A) = 12 − 2 = 10.
- Swap diagonals, negate off-diagonals: [[4, −2], [−1, 3]].
- Divide by det: A⁻¹ = (1/10) · [[4,−2],[−1,3]] = [[0.4, −0.2],[−0.1, 0.3]].
§ 09Common Mistakes
| Mistake | What Goes Wrong | Fix |
|---|---|---|
| Using the Sarrus rule for a 4×4 matrix | Sarrus only works for exactly 3×3. Applying its diagonal pattern to a 4×4 gives completely wrong results with no obvious error signal. | For 4×4 and above, always use cofactor expansion or row reduction. |
| Forgetting to track sign when row swapping | Each row swap reverses the sign. Two swaps restore it. Students often lose count during row reduction and get the wrong sign. | Keep a running tally of row swaps (odd = sign flip, even = no flip) alongside the row reduction work. |
| Confusing det(kA) = k·det(A) with det(kA) = kⁿ·det(A) | Scalar k multiplies every entry of the n×n matrix, so it is applied to each of the n rows, each contributing a factor of k. | For an n×n matrix: det(kA) = kⁿ·det(A). For 2×2 the factor is k², for 3×3 it is k³. |
| Applying the wrong sign in cofactor expansion | The checkerboard sign (−1)i+j is easy to mis-apply, especially for positions where i+j is odd. | Draw the sign grid (+−+/−+−/+−+) before expanding and tick off each position used. |
| Assuming det(A+B) = det(A) + det(B) | Determinants are NOT additive. This is a very common misconception by analogy with linear functions. | Only the product rule holds: det(AB) = det(A)·det(B). Sums have no such shortcut. |
§ 10Practice Quiz — Determinants
10 questions covering the 2×2 formula, 3×3 expansion, properties, and geometric interpretation. Immediate feedback on every answer.
Evaluate: det([[5, 3], [2, 4]])
det = (5)(4) − (3)(2) = 20 − 6 = 14.
Evaluate: det([[7, −2], [−7, 2]])
det = (7)(2) − (−2)(−7) = 14 − 14 = 0. Row 2 = −1 × Row 1, so the matrix is singular.
A matrix A has det(A) = 6. What is det(3A) for a 2×2 matrix A?
For a 2×2 matrix: det(3A) = 3² · det(A) = 9 · 6 = 54. Each of the 2 rows gains a factor of 3, giving 3² overall.
Evaluate: det([[2,0,0],[3,−1,0],[4,5,6]])
Lower triangular matrix, multiply the diagonal: 2 · (−1) · 6 = −12.
Which row operation leaves the determinant unchanged?
Adding a multiple of one row to another is the type-3 elementary row operation. It is the key tool in Gaussian elimination and crucially does not change the determinant. Swaps flip the sign; scalar multiplication scales the det.
det(A) = 4, det(B) = −3 (both 3×3). Find det(AB).
det(AB) = det(A) · det(B) = 4 · (−3) = −12.
The parallelogram spanned by vectors (2, 5) and (1, 4) has area equal to:
Area = |det([[2,1],[5,4]])| = |8 − 5| = 3. Answer d correctly expresses the formula (= 3 numerically). The absolute value of the determinant of the matrix formed by the two vectors gives the area.
Use Cramer's Rule to find x in: 3x − y = 7, x + 2y = 1
- A = [[3,−1],[1,2]]. det(A) = 3·2 − (−1)·1 = 6+1 = 7.
- A₁ = [[7,−1],[1,2]] (replace column 1 with the constants). det(A₁) = 7·2 − (−1)·1 = 14+1 = 15.
- x = det(A₁)/det(A) = 15/7 ≈ 2.14.
det(A) = 5. What is det(A⁻¹)?
Since AA⁻¹ = I and det(AB) = det(A)·det(B), we get det(A)·det(A⁻¹) = det(I) = 1. So det(A⁻¹) = 1/det(A) = 1/5.
Which statement about determinants is TRUE?
The multiplicative property det(AB) = det(A)·det(B) always holds for square matrices of the same size. Determinants are NOT additive. Determinants are only defined for square matrices. A non-zero determinant means the matrix is invertible.
Quiz complete!