Determinant of a Matrix - Formula and Calculation
Book A Free Math Class
Determinant of a Matrix - Formula and Calculation
TL;DR
The determinant of a square matrix is a single number that captures the matrix's area-scaling factor (or volume-scaling in 3D), its invertibility (non-zero ⇔ invertible), and the orientation it produces (positive or negative). For 2×2: det = ad - bc. For 3×3: cofactor expansion.
What Is a Determinant?
The determinant of a square matrix A — written det(A) or |A| — is a single scalar computed from the matrix's entries.
It carries multiple meanings:
- Algebraically. A polynomial in the matrix entries that's zero exactly when the matrix is singular (non-invertible).
- Geometrically. The scaling factor for areas (in 2D) or volumes (in higher dimensions) under the linear transformation the matrix represents.
- Practically. A test for whether a system of linear equations has a unique solution (det ≠ 0) or not (det = 0).
Determinant of a 2×2 Matrix
For A=(a b\ c d):
det(A) = ad - bc
Memory pattern. Multiply the main diagonal, multiply the off-diagonal, subtract.
Worked example. Find det(5 3\ 2 4).
det = (5)(4) - (3)(2) = 20 - 6 = 14.
Determinant of a 3×3 Matrix
For A=(a11 a12 a13\ a21 a22 a23\ a31 a32 a33), two methods.
Method 1: Cofactor Expansion (Along the First Row)
det(A) = a11 det(a22 a23\ a32 a33) - a12 det(a21 a23\ a31 a33) + a13 det(a21 a22\ a31 a32)
Apply alternating signs +,−,+,… and use the 2×2 determinant formula on each submatrix.
Method 2: Sarrus' Rule (3×3 Only)
Write the matrix and copy the first two columns to the right:
(a11 a12 a13 | a11 a12
a21 a22 a23 | a21 a22
a31 a32 a33 | a31 a32)
Sum the products of three diagonals going down-right, subtract the sum of three diagonals going down-left.
Sarrus only works for 3×3. For 4×4 and larger, use cofactor expansion (or row reduction).
Three Worked Examples — Quick, Standard, Stretch
Quick — 2×2
det(7 2\ 3 4) = 7(4) - 2(3) = 28 - 6 = 22.
Standard — 3×3 by Cofactor Expansion
det(2 1 3\ 0 4 5\ 1 0 6)
Expand along the first row:
=2det(4 5\ 0 6) - 1det(0 5\ 1 6) + 3det(0 4\ 1 0)
=2(24−0)−1(0−5)+3(0−4) = 48 + 5 - 12 = 41.
Stretch — Use Properties
Find det(0 0 5\ 0 3 0\ 7 0 0).
Method: column expansion or recognise as a permutation matrix with scaling.
Expand along column 1: only a31 = 7 is nonzero.
det = 7 ⋅ (-1)3+1 det(0 5\ 3 0) = 7 ⋅ 1 ⋅ (0 - 15) = -105.
Properties of the Determinant
- det(I) = 1 — the identity matrix.
- det(AB) = det(A) ⋅ det(B) — multiplicative property.
- det(A^T) = det(A) — determinant of the transpose equals the original.
- det(A^{-1}) = 1/det(A) — inverse scales by the reciprocal.
- det(kA) = k^n det(A) — for an n×n matrix scaled by k.
- Swapping rows changes the sign of the determinant.
- Adding a multiple of one row to another doesn't change the determinant.
- If any row (or column) is all zeros, det(A) = 0.
- If two rows (or columns) are equal, det(A) = 0.
- For triangular matrices, det = product of diagonal entries.
Why Does the Determinant Matter?
A determinant is a single number that tells you everything the matrix does to space.
The determinant appears anywhere matrices appear:
- Solving linear systems. Ax = b has a unique solution exactly when det(A)≠0. Cramer's rule expresses each unknown as a ratio of determinants.
- Eigenvalue computation. The eigenvalues of a matrix are the roots of the characteristic polynomial det(A−λI)=0.
- Change of variables in integration. The Jacobian determinant tells how volumes transform under a coordinate change — essential in multivariable calculus.
- Computer graphics. The determinant of a transformation matrix tells you whether the transformation preserves orientation (positive) or flips it (negative).
- Physics — quantum mechanics. Slater determinants describe antisymmetric multi-electron wavefunctions.
- Cryptography. Some cipher algorithms require the encryption matrix to have determinant coprime to the alphabet size.
The determinant was introduced by Gabriel Cramer in 1750 (Cramer's rule) and Pierre-Simon Laplace in 1772 (cofactor expansion).
A Worked Example — Wrong Path First
Find det(1 2\ 2 4).
The intuitive (wrong) approach. A student computes 1⋅4 + 2⋅2 = 8.
Why it fails. The student added instead of subtracting. The determinant formula is ad - bc, not ad + bc.
The correct method. det = (1)(4) - (2)(2) = 4 - 4 = 0.
Interpretation. Determinant zero means the matrix is singular — the rows are proportional (row 2 = 2 × row 1). The matrix collapses 2D space to a 1D line.
What Are the Most Common Mistakes With Determinants?
Mistake 1: Sign errors in cofactor expansion
Where it slips in: Forgetting the alternating sign pattern.
The fix: +,−,+,−,… starting with + in position (1,1). Write the signs over the matrix before expanding.
Mistake 2: Applying Sarrus' rule to a 4×4 matrix
Where it slips in: Sarrus' diagonal trick only works for 3×3.
The fix: For 4×4 and larger, use cofactor expansion or row reduction.
Mistake 3: Confusing det(A+B) with det(A) + det(B)
Where it slips in: Treating the determinant as linear in A.
The fix: det(A + B)≠det(A) + det(B) in general. The determinant is multilinear in rows (or columns), not linear in the whole matrix.
Key Takeaways
- The determinant is a single number computed from a square matrix — it captures area-scaling, invertibility, and orientation.
- 2×2 formula: ad - bc. 3×3: cofactor expansion or Sarrus' rule.
- Zero determinant ⇔ singular matrix ⇔ no inverse ⇔ collapsed transformation.
- Multiplicative property: det(AB)=det(A)⋅det(B).
- Row operations matter: swapping rows flips the sign; scaling a row scales the determinant; adding multiples of one row to another doesn't change it.
A Practical Next Step
Try these three before moving on to eigenvalues.
- Compute det(4 3\ 2 5).
- Compute det(1 0 2\ 3 4 5\ 0 1 6).
- Show that det(2 4\ 3 6) = 0 and explain why.
Frequently Asked Questions
What is the determinant of a matrix? A single scalar number computed from the entries of a square matrix. It captures area-scaling, invertibility, and orientation of the linear transformation the matrix represents.
What's the formula for a 2x2 determinant? For (a b\ c d): det = ad - bc. Multiply the main diagonal, multiply the off-diagonal, subtract.
How do you find the determinant of a 3x3 matrix? Two ways: cofactor expansion (works for any size) and Sarrus' rule (only for 3×3). Cofactor expansion: pick a row (often the first), multiply each entry by its cofactor, sum with alternating signs.
What does a zero determinant mean? The matrix is singular — it has no inverse. Geometrically, it collapses space to a lower dimension (e.g., 2D plane to a line). The corresponding linear system either has no solution or infinitely many.
Can a determinant be negative? Yes. A negative determinant means the linear transformation reverses orientation — a reflection has determinant −1.
How is the determinant related to the inverse? A−1 exists if and only if det(A)≠0. When it exists, A−1=1/det(A) adj(A).