Source: Friedberg, Insel, Spence – Linear Algebra, 4th Ed.
Tags: determinant, n×n matrix, cofactor expansion, cofactor, minor, recursive definition, row operations, upper triangular, elementary row operations, linear algebra
Difficulty: Intermediate | Prerequisites: Section 4.1 (2×2 determinants), matrix operations, elementary row operations (Chapter 3).
Section 4.1 handled 2×2 matrices. Now the determinant gets extended to n×n matrices via a recursive definition called cofactor expansion. The idea is elegant: express the determinant of an n×n matrix in terms of n determinants of (n−1)×(n−1) matrices, and keep reducing until you reach 2×2 matrices you already know how to handle. This section also reveals that cofactor expansion along any row gives the same answer, and that elementary row operations provide a far more efficient computation method.
The determinant of an n×n matrix is defined recursively by cofactor expansion along the first row. You can expand along any row and get the same result. The most efficient way to compute a determinant in practice is to row-reduce to upper triangular form and multiply the diagonal entries, keeping track of row swaps (each one flips the sign).
Cofactor of entry Aᵢⱼ
The scalar (−1)^(i+j) · det(Ãᵢⱼ), where Ãᵢⱼ is the (n−1)×(n−1) matrix obtained by deleting row i and column j from A. Think of it as: the "signed contribution" of entry Aᵢⱼ to the determinant. The sign alternates in a checkerboard pattern starting with + in the top-left corner.
Cofactor expansion along the first row
det(A) = Σⱼ (−1)^(1+j) · A₁ⱼ · det(Ã₁ⱼ). In simple terms, walk across the first row, multiply each entry by its cofactor, and add them up.
Cofactor expansion along row i (Theorem 4.4)
det(A) = Σⱼ (−1)^(i+j) · Aᵢⱼ · det(Ãᵢⱼ). You can pick any row, not just the first. The answer is the same.
Upper triangular matrix
A square matrix where every entry below the main diagonal is zero. Its determinant equals the product of its diagonal entries.
For a 1×1 matrix A = (A₁₁), det(A) = A₁₁.
For n ≥ 2, det(A) = Σⱼ₌₁ⁿ (−1)^(1+j) · A₁ⱼ · det(Ã₁ⱼ).
Each Ã₁ⱼ is the (n−1)×(n−1) submatrix formed by deleting row 1 and column j.
For 2×2 matrices, this agrees with ad − bc from Section 4.1.
A = [[1, 3, −3], [−3, −5, 2], [−4, 4, −6]].
Expand along row 1:
det(A) = 1·det([[−5, 2], [4, −6]]) − 3·det([[−3, 2], [−4, −6]]) + (−3)·det([[−3, −5], [−4, 4]])
= 1·(30 − 8) − 3·(18 + 8) + (−3)·(−12 − 20)
= 22 − 78 + 96 = 40.
C = [[2,0,0,1], [0,1,3,−3], [−2,−3,−5,2], [4,−4,4,−6]].
Expand along row 1. The two zero entries (C₁₂ = 0, C₁₃ = 0) eliminate two terms entirely.
det(C) = 2·det([[1,3,−3],[−3,−5,2],[4,−6]]) − 1·det([[0,1,3],[−2,−3,−5],[4,−4,4]])
= 2(40) − 1(48) = 32.
Tip: always expand along the row or column with the most zeros.
The determinant of an n×n matrix is a linear function of each row when the remaining rows are held fixed.
This generalises Theorem 4.1 from Section 4.1.
Corollary: if any row of A is entirely zero, then det(A) = 0.
det(A) = Σⱼ (−1)^(i+j) · Aᵢⱼ · det(Ãᵢⱼ) for any row i.
Corollary: if A has two identical rows, then det(A) = 0.
Type 1 (swap two rows): det changes sign. det(B) = −det(A). (Theorem 4.5)
Type 2 (multiply a row by scalar k): det scales by k. det(B) = k · det(A). (Follows from n-linearity, Theorem 4.3)
Type 3 (add a multiple of one row to another): det is unchanged. det(B) = det(A). (Theorem 4.6)
If rank(A) < n, then det(A) = 0.
This is half of the invertibility criterion. The full version (det(A) ≠ 0 ⟺ A invertible) is completed in Section 4.3.
Use type 1 and type 3 row operations to reduce A to an upper triangular matrix U.
det(U) = product of diagonal entries of U.
Track sign flips from row swaps: each swap multiplies the running determinant by −1.
The determinant of an upper triangular matrix is the product of its diagonal entries.
Cofactor expansion requires over n! multiplications. For a 20×20 matrix, that is over 2.4 × 10¹⁸ operations.
Row reduction requires roughly (n³ + 2n − 3)/3 multiplications. For a 20×20 matrix, that is about 2679 operations.
This is why every practical algorithm uses row reduction, not cofactor expansion.
General determinant (cofactor expansion along row i):
det(A) = Σⱼ₌₁ⁿ (−1)^(i+j) · Aᵢⱼ · det(Ãᵢⱼ)
Cofactor sign pattern (for a 4×4 matrix):
+ − + −
− + − +
+ − + −
− + − +
Determinant of an upper triangular matrix:
det(A) = A₁₁ · A₂₂ · A₃₃ · … · Aₙₙ
Effect of row operations on det:
Operation | Effect on det |
|---|---|
Swap two rows | Multiplies det by −1 |
Multiply row by k | Multiplies det by k |
Add k × (row i) to row j | No change |
Determinant computation via row reduction is essentially the same process as Gaussian elimination, which is the workhorse algorithm behind solving systems of linear equations in engineering, physics simulations, and data science. Understanding how row operations affect the determinant also matters in numerical linear algebra, where software packages like LAPACK compute determinants as a byproduct of LU factorisation.
Students sometimes believe cofactor expansion must be done along the first row. You can use any row (or, after Section 4.3, any column). Choosing the row or column with the most zeros saves the most work.
Forgetting to track the sign of cofactors is a frequent source of errors. The sign is (−1)^(i+j), not always positive. Use the checkerboard pattern as a reference.
When row-reducing to find a determinant, students sometimes apply a type 2 operation (scaling a row) without adjusting the determinant accordingly. Only type 3 operations leave the determinant unchanged.
"Upper triangular determinant = product of diagonal" applies only to triangular matrices, not to any matrix that happens to have some zeros below the diagonal.
⚠️ You will almost certainly be asked to compute determinants of 3×3 and 4×4 matrices, both by cofactor expansion (to test understanding) and by row reduction (to test efficiency).
⚠️ Know the three rules for how row operations affect determinants cold. These appear in true/false questions and as steps in proofs.
⚠️ The corollary "two identical rows implies det = 0" and "a zero row implies det = 0" are commonly tested.
⚠️ Proving that det(I) = 1 by induction (Example 4 in the textbook) is a classic exercise in mathematical induction. The argument is: expand along row 1, only the (1,1) entry is nonzero, and the submatrix is the (n−1)×(n−1) identity.
True or false: The determinant of a square matrix can be evaluated by cofactor expansion along any row.
Fill in the blank: If B is obtained from A by swapping two rows, then det(B) = ___.
True or false: If B is obtained from A by adding 5 times row 2 to row 3, then det(B) = 5 · det(A).
The determinant of an upper triangular matrix equals ___.
True or false: If A has rank less than n, then det(A) ≠ 0.
(Answers: 1. True. 2. −det(A). 3. False; det(B) = det(A). 4. The product of its diagonal entries. 5. False; det(A) = 0.)
Q: Compute the determinant of A = [[0, 1, 3], [−2, −3, −5], [4, −4, 4]] using cofactor expansion along a well-chosen row.
A: Row 1 has no zeros, but expanding along it: det(A) = 0·(cofactor) − 1·det([[−2,−5],[4,4]]) + 3·det([[−2,−3],[4,−4]]) = 0 − 1(−8+20) + 3(8+12) = −12 + 60 = 48. Alternatively, swap rows 1 and 2, row-reduce, and compute.
Q: Evaluate det(A) for A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]].
A: Row-reduce: subtract 4×(row 1) from row 2 and 7×(row 1) from row 3 to get [[1,2,3],[0,−3,−6],[0,−6,−12]]. Then subtract 2×(row 2) from row 3: [[1,2,3],[0,−3,−6],[0,0,0]]. Product of diagonal = 1·(−3)·0 = 0. So det(A) = 0.
Q: Find k such that det([[3a₁, 3a₂, 3a₃], [3b₁, 3b₂, 3b₃], [3c₁, 3c₂, 3c₃]]) = k · det([[a₁, a₂, a₃], [b₁, b₂, b₃], [c₁, c₂, c₃]]).
A: Each of the three rows is scaled by 3. By n-linearity, each scaling multiplies det by 3, so k = 3³ = 27.
Q: True or false – if B is obtained from A by multiplying a row of A by a scalar, then det(B) = det(A).
A: False. det(B) = k · det(A), where k is the scalar used.
Q: Why is cofactor expansion impractical for large matrices?
A: Cofactor expansion requires over n! multiplications. For n = 20, this exceeds 2.4 × 10¹⁸ operations. Row reduction needs only about (n³ + 2n − 3)/3 multiplications, which is roughly 2679 for n = 20.
The recursive definition of the determinant connects to induction proofs throughout algebra. The row-operation rules from this section feed directly into Section 4.3, where they are used to prove det(AB) = det(A)·det(B) and det(Aᵗ) = det(A). The idea that row-reducing to upper triangular form reveals the determinant mirrors the approach used in Chapter 3 to find rank and solve systems. In Chapter 5, determinants are used to define the characteristic polynomial det(A − λI), whose roots are eigenvalues.
n×n determinant, cofactor expansion, cofactor, minor, Laplace expansion, recursive determinant, upper triangular determinant, row reduction determinant, elementary row operations, sign change row swap, det equals zero singular, rank less than n, linear algebra chapter 4, Friedberg Insel Spence