Three Routes to the Same Determinant
A determinant can often be computed in more than one valid way, but the amount of work can differ greatly. A matrix with only a few nonzero entries may make the permutation formula short. A row or column with many zeros may make cofactor expansion efficient. A dense matrix with useful pivots is often best handled by row reduction. The aim is not to memorize one preferred method, but to inspect the structure and choose a method whose intermediate work stays manageable.
For an \(n\times n\) matrix \(\mathbf{A}=[a_{ij}]\), the permutation formula is \(\det\mathbf{A}=\sum_{\sigma\in S_n}\operatorname{sgn}(\sigma)\prod_{i=1}^n a_{i,\sigma(i)}\). Here \(S_n\) is the set of permutations of \(1,\dots,n\), and the sign of a permutation is \((-1)^k\), where \(k\) is its number of inversions. An inversion is a pair \(i<j\) for which \(\sigma(i)>\sigma(j)\). This formula is a useful definition and a direct method for small or sparse matrices, but it has \(n!\) terms before zero terms are removed.
For cofactor expansion, delete row \(i\) and column \(j\) from \(\mathbf{A}\), and call the determinant of the resulting \((n-1)\times(n-1)\) matrix the minor \(M_{ij}\). The cofactor is \(C_{ij}=(-1)^{i+j}M_{ij}\). Its sign follows the alternating pattern beginning with \(+\) in position \((1,1)\). Expansion along a row or column uses the cofactors in that row or column.
Proof. First fix row \(i\) in the permutation formula and group its terms according to the value \(j=\sigma(i)\). In every term in this group, the product contains \(a_{ij}\). After row \(i\) and column \(j\) are deleted, the remaining choices of columns for the remaining rows form a permutation of the remaining indices. Call this smaller permutation \(\tau\). Its signed products sum to \(M_{ij}\), apart from the sign needed to account for the deleted row and column. To determine that sign, move row \(i\) to the first position using \(i-1\) swaps, and move column \(j\) to the first position using \(j-1\) swaps. These swaps contribute \((-1)^{i-1+j-1}=(-1)^{i+j}\). Thus the terms with \(\sigma(i)=j\) sum to \(a_{ij}(-1)^{i+j}M_{ij}=a_{ij}C_{ij}\). Summing over \(j\) proves the row formula. For a fixed column \(j\), group the permutation terms by the row \(i\) assigned to that column. Moving row \(i\) and column \(j\) to the first positions gives the same factor \((-1)^{i+j}\), and the remaining signed products sum to \(M_{ij}\). Summing over \(i\) proves the column formula. \(\square\)
Let Zeros Guide Cofactor Expansion
The cofactor theorem gives several correct expansions for the same matrix. Their costs differ: every nonzero entry in the chosen row or column requires a minor, while a zero entry contributes nothing. Therefore, before expanding, count the nonzero entries in each row and column and choose one with as few as possible. A zero row or column gives determinant zero immediately. For larger matrices, expansion is recursive: each minor is another determinant, so a good first choice is helpful only if it also leaves manageable minors.
Worked Example: Expand Along a Sparse Row
Compute the determinant of
The first row has just one nonzero entry, so expand along that row. Its only contribution is \(a_{11}C_{11}\). The sign is positive and the minor is
The \(2\times2\) determinant is \(1\cdot1-3\cdot4=1-12=-11\), so \(\det\mathbf{A}=5(-11)=-55\). Check: row replacements \(R_2\to R_2-2R_1\) and \(R_4\to R_4-R_1\), followed by \(R_3\to R_3-4R_2\), give an upper triangular matrix with diagonal entries \(1,1,-11,5\). Each row replacement preserves the determinant, and their product is \(-55\), agreeing with the expansion.
Repeated patterns can simplify the decision even before any expansion. If two rows or two columns are identical, the determinant is zero: subtracting one of those rows from the other produces a zero row without changing the determinant. The same reasoning applies to columns. Proportional rows can also be made equal by a suitable scaling, with that scaling’s effect on the determinant tracked. These observations are useful shortcuts, but they should be applied only after checking that the rows or columns really have the stated relationship.
Worked Example: Detect Repeated Rows
Compute the determinant of
Rows 1 and 3 are identical. Apply \(R_3\to R_3-R_1\), which preserves the determinant:
The resulting matrix has a zero row, so every term in its permutation formula contains a zero factor. Its determinant is zero, and the row replacement shows that \(\det\mathbf{B}=0\) as well. Check: the original matrix has no reason to have a nonzero determinant hidden by the row replacement: that replacement leaves the determinant unchanged, and the resulting zero row makes every permutation term zero.
Why Elimination Produces the Right Answer
Row reduction is usually a good choice for a dense matrix or one with a sequence of convenient pivots. Recall the determinant effects of the elementary row operations: swapping two rows changes the sign; multiplying one row by a nonzero scalar \(c\) multiplies the determinant by \(c\); and adding a multiple of one row to another leaves the determinant unchanged. These rules make it possible to reduce a matrix while keeping an exact account of its determinant.
Proof. Suppose first that \(\mathbf{U}\) is upper triangular, so \(u_{ij}=0\) whenever \(i>j\). A nonzero term in the permutation formula must have \(\sigma(i)\ge i\) for every \(i\), because choosing a column \(j<i\) would use a zero entry. But \(\sum_i\sigma(i)=\sum_i i\), since \(\sigma\) is a permutation. Therefore the nonnegative integers \(\sigma(i)-i\) sum to zero, forcing \(\sigma(i)=i\) for every \(i\). Only the identity permutation can contribute, and its term is \(\prod_i u_{ii}\). If \(\mathbf{U}\) is lower triangular, a nonzero term requires \(\sigma(i)\le i\) for every \(i\). The nonnegative integers \(i-\sigma(i)\) also sum to zero, so again \(\sigma(i)=i\) for every \(i\). The only contributing term is the product of the diagonal entries. \(\square\)
This theorem justifies the elimination method. If row operations reduce a square matrix to upper triangular form, the triangular theorem gives the determinant at once. The row-operation rules then tell us how the determinant of the original matrix relates to the triangular one. Keep a record of every swap and scaling; row replacements require no adjustment. If elimination reaches echelon form with fewer than \(n\) pivots, that form has a zero row and hence determinant zero. Since row swaps and nonzero row scalings change a determinant only by a nonzero factor, and row replacements do not change it, the original determinant is zero too. A zero row at any stage of a reduction that uses only elementary row operations proves that the determinant at that stage is zero, and therefore that the original determinant is zero. Later operations may make that row nonzero again, but they cannot make the determinant nonzero: a swap changes only the sign, a nonzero scaling multiplies by a nonzero factor, and a row replacement changes nothing. For example, applying \(R_2\to R_2+R_1\) to \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\) gives \(\begin{bmatrix}1&0\\1&0\end{bmatrix}\), whose determinant is still zero.
Worked Example: Use Pivots in a Dense Matrix
Compute the determinant of
There is no especially sparse row, and the first pivot is \(1\). Use row replacements to create zeros below it: \(R_2\to R_2-2R_1\) and \(R_3\to R_3-R_1\). Then use \(R_3\to R_3+R_2\):
All three steps are row replacements, so they preserve the determinant. The final matrix is upper triangular, and its diagonal product is \(1\cdot1\cdot2=2\). Hence \(\det\mathbf{C}=2\). Check: expansion along the first row gives \(1(5\cdot2-3\cdot1)-2(2\cdot2-3\cdot1)+1(2\cdot1-5\cdot1)=7-2-3=2\). The two methods agree.
Choosing a Method Deliberately
The following comparisons are guides, not additional determinant rules. A method is efficient when its structure reduces the number or complexity of the calculations; every method still has to respect the determinant’s signs and operation rules.
| Matrix feature | Useful first choice | Reason |
|---|---|---|
| Very small matrix with few nonzero permutation products | Permutation formula | Most terms vanish, leaving a short exact sum. |
| Row or column with few nonzero entries | Cofactor expansion | Zeros contribute nothing; only a few minors remain. |
| Repeated rows or columns | Row or column operation | A replacement can create a zero row or column and reveal determinant zero. |
| Dense matrix with convenient pivots | Row reduction | Elimination leads to a triangular determinant and avoids many permutation terms. |
| Triangular matrix | Diagonal product | The determinant is the product of the diagonal entries. |
The permutation formula is valuable for understanding what the determinant sums, but it is rarely an efficient hand calculation for a larger dense matrix. Cofactor expansion is effective when zeros eliminate most terms, but a dense row can produce many large minors. Row reduction is systematic, though it can create fractions or require swaps. In practice, inspect the entire matrix before starting: a row that looks sparse may lead to awkward minors, while a simple pivot sequence may be shorter.
Common Pitfalls
Forgetting the alternating cofactor signs. In the matrix \(\mathbf{C}\) above, expansion along row 1 uses signs \(+,-,+\). A wrong calculation would write \(7+2-3=6\), using a positive sign on the middle contribution. The correct middle term is \(-2(2\cdot2-3\cdot1)=-2\), so the determinant is \(7-2-3=2\). Write the sign pattern before calculating the minors when a sign is easy to lose.
Failing to account for a row swap or scaling. Row replacements preserve the determinant, but swaps and nonzero scalings do not. For example, swapping two rows to find a pivot multiplies the determinant by \(-1\); the determinant of the final triangular matrix is then the negative of the original determinant unless another swap or scaling changes the factor. Keep a short running record of these changes, rather than trying to reconstruct them at the end.
Using the permutation formula as if every term were positive. In the first example, the nonzero permutation terms are the identity term, \(1\cdot1\cdot1\cdot5=5\), and the term for the permutation \((1,3,2,4)\), which is \(1\cdot3\cdot4\cdot5=60\). That permutation has one inversion, so its sign is negative and the determinant is \(5-60=-55\), not \(5+60=65\). In sparse examples, finding the surviving products is only half the work; their permutation signs still matter.
A reliable final check is to compute the same determinant by a structurally different route when the matrix is small enough. For elimination, verify each row operation and determinant factor. For cofactor expansion, verify the minor determinants and alternating signs. For the permutation formula, confirm both which terms survive and the inversion count of each surviving permutation.
Check Your Understanding
For each question, choose a method before beginning the calculation, then check the determinant using a second route when practical.
- Which method is likely to be efficient for a \(4\times4\) matrix with a row containing exactly one nonzero entry? Explain your choice.
- Expand \(\begin{bmatrix}2&0&0\\1&3&4\\0&5&1\end{bmatrix}\) along a row with zeros and compute its determinant.
- What determinant changes must be recorded if row reduction uses two row swaps and one scaling \(R_2\to 3R_2\), with any number of row replacements?
- Use the permutation formula to compute the determinant of \(\begin{bmatrix}0&2\\3&0\end{bmatrix}\). State the sign of its only nonzero term.
- Why does a zero row in the final echelon form imply determinant zero, and why is an intermediate zero row not always enough?