Linear Algebra · Topic 03 of 05

Determinants — The Scalar Heart of a Matrix

Every square matrix encodes a single number (its determinant) that reveals whether the matrix is invertible, how it scales area or volume, and whether a system of equations has a unique solution. Understanding determinants unlocks eigenvalues, Cramer's Rule, and the geometry of linear transformations.

Share this page

§ 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.

The Key Fact to Remember A square matrix A is invertible if and only if det(A) ≠ 0. When det(A) = 0, the matrix is called singular — it has no inverse, and the system Ax = b either has no solutions or infinitely many.

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.

2×2 Determinant Formula
det(A) = |a   b| = ad − bc          |c   d|
Main diagonal (a·d) minus anti-diagonal (b·c)
Teal arrow = positive product (main diagonal) · Rust arrow = negative product (anti-diagonal)
Example 1det([[3, 2], [1, 4]])

Apply the formula: det = (3)(4) − (2)(1) = 12 − 2 = 10.

det = 10  (non-zero → matrix is invertible)
Example 2det([[6, 2], [3, 1]])

det = (6)(1) − (2)(3) = 6 − 6 = 0.

det = 0  (singular — no inverse; row 2 = ½ × row 1)
Example 3det([[−4, 7], [2, −3]])

det = (−4)(−3) − (7)(2) = 12 − 14 = −2.

det = −2  (negative determinant — orientation-reversing transformation)

§ 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.

Sarrus Rule — three positive diagonals (solid teal) minus three negative diagonals (dashed rust)
Sarrus Only Works for 3×3 The Rule of Sarrus is a convenient memory aid but it does not extend to 4×4 or larger matrices. Always use cofactor expansion for larger matrices.
Example 43×3 via Sarrus: A = [[1,2,3],[4,5,6],[7,8,9]]
  1. Positive: (1·5·9) + (2·6·7) + (3·4·8) = 45 + 84 + 96 = 225
  2. Negative: (3·5·7) + (1·6·8) + (2·4·9) = 105 + 48 + 72 = 225
  3. det = 225 − 225 = 0
det = 0  (singular — the rows are in arithmetic progression, hence linearly dependent)

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

  1. Choose a row or column to expand along (pick the one with the most zeros).
  2. 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.
  3. Multiply by the cofactor sign (−1)i+j. The sign pattern for a 3×3 is shown below.
  4. Sum: det(A) = Σ aij · (−1)i+j · Mij

Cofactor Sign Pattern (3×3)

+
+
+
+
+

Sign = (−1)row+col

Example 53×3 via Cofactor Expansion: B = [[2,−1,3],[0,4,−2],[1,0,5]]

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.

  1. Entry 0 at (2,1): skip (zero × anything = 0).
  2. 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.
  3. 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.
  4. det(B) = 0 + 28 + 2 = 30.
det(B) = 30
Example 6Exploit zeros: C = [[5,0,0],[−2,3,0],[4,1,−1]]

C is lower triangular. Expand along row 1 (two zeros).

  1. Entry 5 at (1,1): sign +1. Minor M11 = det([[3,0],[1,−1]]) = −3−0 = −3. Contribution: 5·1·(−3) = −15.
  2. Entries 0 and 0: contribute nothing.
det(C) = −15  (= product of diagonal: 5·3·(−1) = −15 — a shortcut for triangular matrices)

§ 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.

Operation 1
Swap two rows
Interchanging any two rows reverses the sign of the determinant.
Ri ↔ Rj  →  det changes sign
Operation 2
Multiply a row by scalar k
Scaling one row by k multiplies the determinant by k.
kRi  →  det(new) = k · det(old)
Operation 3
Add a multiple of one row to another
This is the key operation: it does not change the determinant at all.
Ri + k·Rj → Ri  →  det unchanged
Triangular Matrix Shortcut
det(triangular matrix) = product of diagonal entries

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.

Example 7Row-reduce to find det: D = [[2,1,−1],[−3,−1,2],[−2,1,2]]
  1. R2 ← R2 + (3/2)R1: row becomes [0, 1/2, 1/2].
  2. R3 ← R3 + R1: row becomes [0, 2, 1].
  3. R3 ← R3 − 4·R2: row becomes [0, 2−4·(1/2), 1−4·(1/2)] = [0, 0, −1].
  4. No row swaps, sign unchanged. Upper triangular diagonal: 2, 1/2, −1.
  5. det(D) = 2 · (1/2) · (−1) = −1.
det(D) = −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.

2D
Area of a Parallelogram
If the columns of a 2×2 matrix A are two vectors u and v, then |det(A)| = area of the parallelogram spanned by u and v.
Area = |ad − bc|
3D
Volume of a Parallelepiped
If the columns of a 3×3 matrix A are three vectors, then |det(A)| = volume of the parallelepiped (3D parallelogram) they span.
Volume = |det(A)|
The absolute value of the 2×2 determinant equals the area of the parallelogram formed by the two column vectors

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).

Example 8Area of parallelogram with sides (3, 1) and (1, 4)

Form the matrix with these vectors as columns: [[3,1],[1,4]].

det = 3·4 − 1·1 = 12 − 1 = 11.

Area = |11| = 11 square units
Example 9Volume of parallelepiped with edges (1,0,0), (0,2,0), (1,1,3)

det([[1,0,1],[0,2,1],[0,0,3]]), upper triangular!

det = 1 · 2 · 3 = 6.

Volume = |6| = 6 cubic units

§ 06Key Properties of Determinants

These properties allow rapid evaluation and underpin many theoretical results. Know them cold.

P1
Identity matrix
The determinant of the identity matrix is always 1.
det(I) = 1
P2
Transpose
Transposing a matrix leaves its determinant unchanged.
det(Aᵀ) = det(A)
P3
Product
The determinant of a product is the product of the determinants.
det(AB) = det(A)·det(B)
P4
Scalar multiple
Scaling an n×n matrix by k scales the determinant by kⁿ.
det(kA) = kⁿ·det(A)
P5
Inverse
If A is invertible, the determinant of its inverse is the reciprocal.
det(A⁻¹) = 1 / det(A)
P6
Repeated row / linear dependence
If any two rows (or columns) are identical or proportional, the determinant is 0.
Proportional rows → det = 0
P7
Triangular matrix
Upper or lower triangular: multiply the diagonal entries.
det = a₁₁ · a₂₂ · … · aₙₙ
P8
Zero row or column
If any row or column is all zeros, the determinant is 0.
Zero row → det = 0
Example 10Using properties: det(A) = 3, det(B) = −2. Find det(2A²B).
  1. det(2A²B) = det(2I · A · A · B), treat 2 as scalar on a 3×3 matrix.
  2. det(kA) = k³·det(A) for a 3×3, so det(2A) = 8·det(A). More directly:
  3. det(2A²B) = 2³ · det(A)² · det(B) = 8 · 9 · (−2) = −144.
det(2A²B) = −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.

Cramer's Rule — n×n System
xi = det(Ai) / det(A)

where Ai is the matrix A with column i replaced by the right-hand side vector b.

Example 11Solve: 2x + y = 5, x − 3y = −1 using Cramer's Rule
  1. A = [[2,1],[1,−3]]. det(A) = (2)(−3) − (1)(1) = −6 − 1 = −7.
  2. A1 (replace col 1 with b = [5, −1]): det([[5,1],[−1,−3]]) = −15 − (−1) = −14. x = −14/−7 = 2.
  3. A2 (replace col 2 with b): det([[2,5],[1,−1]]) = −2 − 5 = −7. y = −7/−7 = 1.
x = 2, y = 1

§ 08The Inverse via the Adjugate

The determinant also appears in the explicit formula for the matrix inverse. For an invertible matrix A:

Inverse Formula
A⁻¹ = (1 / det(A)) · adj(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:

2×2 Inverse Formula
[[a,b],[c,d]]⁻¹ = (1/(ad−bc)) · [[d,−b],[−c,a]]

Swap the diagonal entries, negate the off-diagonal entries, divide by the determinant.

Example 12Invert: A = [[3, 2], [1, 4]]
  1. det(A) = 12 − 2 = 10.
  2. Swap diagonals, negate off-diagonals: [[4, −2], [−1, 3]].
  3. Divide by det: A⁻¹ = (1/10) · [[4,−2],[−1,3]] = [[0.4, −0.2],[−0.1, 0.3]].
A⁻¹ = [[2/5, −1/5],[−1/10, 3/10]]

§ 09Common Mistakes

MistakeWhat Goes WrongFix
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.

Score: 0 / 0
Q1 of 10

Evaluate: det([[5, 3], [2, 4]])

det = (5)(4) − (3)(2) = 20 − 6 = 14.

Q2 of 10

Evaluate: det([[7, −2], [−7, 2]])

det = (7)(2) − (−2)(−7) = 14 − 14 = 0. Row 2 = −1 × Row 1, so the matrix is singular.

Q3 of 10

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.

Q4 of 10

Evaluate: det([[2,0,0],[3,−1,0],[4,5,6]])

Lower triangular matrix, multiply the diagonal: 2 · (−1) · 6 = −12.

Q5 of 10

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.

Q6 of 10

det(A) = 4, det(B) = −3 (both 3×3). Find det(AB).

det(AB) = det(A) · det(B) = 4 · (−3) = −12.

Q7 of 10

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.

Q8 of 10

Use Cramer's Rule to find x in: 3x − y = 7, x + 2y = 1

  1. A = [[3,−1],[1,2]]. det(A) = 3·2 − (−1)·1 = 6+1 = 7.
  2. A₁ = [[7,−1],[1,2]] (replace column 1 with the constants). det(A₁) = 7·2 − (−1)·1 = 14+1 = 15.
  3. x = det(A₁)/det(A) = 15/7 ≈ 2.14.
Q9 of 10

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.

Q10 of 10

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!

Cookie Settings