Why the Order of the Work Matters
When a matrix contains symbols, its determinant is an expression in those symbols. That expression can be simplified in many ways, but the sign attached to each cofactor must be correct before simplification begins. Keeping the expansion as a list of signed terms makes it easier to see where every contribution comes from and to catch a sign error before it is hidden inside a longer expression.
Throughout, the matrices have real entries or entries that are real-valued symbols. For a square matrix, the minor \(M_{ij}\) is the determinant of the matrix formed by deleting row \(i\) and column \(j\). The cofactor at position \((i,j)\) is \(C_{ij}=(-1)^{i+j}M_{ij}\). Thus the cofactor signs alternate in a checkerboard pattern, beginning with a plus sign in the upper-left position. The cofactor expansion theorem says that the determinant is the sum of the entries in any chosen row or column multiplied by their cofactors. This is the earlier result on cofactor expansion; here the emphasis is on carrying it out when entries are symbolic.
For example, expanding along the first row of a \(3\times3\) matrix gives \(a_{11}M_{11}-a_{12}M_{12}+a_{13}M_{13}\). The middle term is subtracted because its cofactor sign is negative; the minor itself is not given an extra sign. A reliable procedure is to write the entry, the checkerboard sign and the minor as a separate signed term, and only then simplify.
The Symbolic Three-by-Three Formula
Proof. Expand along the first row. Deleting row 1 and column 1 leaves \(\begin{bmatrix}e&f\\h&i\end{bmatrix}\), whose determinant is \(ei-fh\). Deleting row 1 and column 2 leaves \(\begin{bmatrix}d&f\\g&i\end{bmatrix}\), whose determinant is \(di-fg\); its cofactor sign is negative. Deleting row 1 and column 3 leaves \(\begin{bmatrix}d&e\\g&h\end{bmatrix}\), whose determinant is \(dh-eg\), with a positive cofactor sign. Multiplying these minors by their first-row entries and signs gives the displayed formula. \(\square\)
The formula is compact, but its structure matters: each parenthesis is a minor, and the sign outside it belongs to that minor’s cofactor. Distribution is valid afterward, but it is often clearer to keep the factorized signed terms until the expansion has been checked.
Worked Example: Three Symbols and a Sign Check
Find the determinant of the following matrix and evaluate it at \(x=1\), \(y=2\), and \(z=3\).
Expand along the first row. The three minors, in order, are
Now attach the checkerboard signs \(+,-,+\) and the entries \(x,2,1\). The signed expansion is
Substitute \(x=1\), \(y=2\), \(z=3\) into the matrix. Its first-row expansion has minors \(6\), \(5\), and \(-2\), so its determinant is \(1(6)-2(5)+1(-2)=6-10-2=-6\).
Check: Substituting the same values into the simplified expression gives \(xyz-2(3z-4)-y=6-2(9-4)-2=6-10-2=-6\), as required. If the middle cofactor sign were mistakenly changed to plus, the resulting expression \(xyz+2(3z-4)-y\) would evaluate to \(6+10-2=14\), not \(-6\). The error is the sign of the second cofactor, not the arithmetic of the substitution.
Substitution Checks a Symbolic Expansion
A symbolic determinant should agree with the determinant of the matrix after any particular real values are assigned to its symbols. This gives a useful check: evaluate the matrix and the expression separately, using an exact substitution that keeps the arithmetic manageable.
Proof. For a \(1\times1\) matrix, the determinant is its sole entry, so substitution gives the determinant of the substituted matrix. For larger square matrices, the recursive definition expands the determinant into sums and products of entries and determinants of smaller matrices. Assume the proposition holds for matrices of size \(n-1\). In an \(n\times n\) cofactor expansion, substitution preserves each sum and product, so each signed term becomes the corresponding entry times the cofactor of the substituted minor. By the assumption for size \(n-1\), that minor’s evaluated expression is the determinant of the substituted minor matrix. Adding the terms therefore gives the cofactor expansion of the determinant of the substituted \(n\times n\) matrix. This proves the assertion by induction on the matrix size. Simplifying by distributivity does not alter the value because distributivity is valid for real numbers. \(\square\)
This check cannot establish that an expression is correct for every possible substitution: two different expressions might happen to agree at one chosen set of values. It is still effective at exposing many sign and arithmetic errors. For a stronger check, substitute a second set of values or recompute the determinant using a different row or column.
Worked Example: Simplify After the Signed Terms
Expand and simplify the determinant, then check it at \(r=1\), \(s=2\), \(t=3\), and \(u=4\).
The first-row minors are \(tu\), \(2u-3\), and \(0-t=-t\). Attaching the first-row entries and signs gives
Only now distribute and collect terms:
At the specified values, the matrix is \(\begin{bmatrix}1&2&1\\2&3&3\\1&0&4\end{bmatrix}\). Expanding along its first row gives \(1(12)-2(5)+1(-3)=12-10-3=-1\). Evaluating the formula gives \(1\cdot3\cdot4-2\cdot2\cdot4+3\cdot2-3=12-16+6-3=-1\).
Check: Expanding the substituted matrix along its second row instead gives \(-2(8)+3(3)-3(-2)=-16+9+6=-1\). The independent expansion agrees with both evaluations of the symbolic result.
Reducing a Four-by-Four Determinant
A four-by-four cofactor expansion produces four signed terms, each involving a three-by-three minor. If some entries in the chosen row are zero, their terms vanish, but their positions still determine the signs of the nonzero terms. Compute each minor as its own three-by-three determinant, retaining its cofactor sign outside the minor.
Worked Example: A Four-by-Four Matrix with Symbols
Expand along the first row and simplify the determinant of
The first-row checkerboard signs are \(+,-,+,-\). The third and fourth entries are zero, so the expansion is \(xM_{11}-M_{12}\). First calculate the two minors:
For \(M_{11}\), expand along its first row. The signed terms are \(y(zw-30)-3(4w-0)+0\), so \(M_{11}=yzw-30y-12w\). For \(M_{12}\), the signed terms are \(2(zw-30)-3(0-5)+0\), so \(M_{12}=2zw-60+15=2zw-45\). The original expansion then gives
Check: Set \(x=1\), \(y=2\), \(z=3\), and \(w=4\). The original first-row expansion gives \(1(-84)-(-21)=-63\): the two minors are \(2(12-30)-3(16)=-84\) and \(2(12-30)-3(-5)=-21\). As a separate check, expand the substituted matrix along its fourth column. The nonzero entries are \(5\) in position \((3,4)\) and \(4\) in position \((4,4)\). Their signed contributions are \(-5(3)+4(-12)=-15-48=-63\). The simplified expression also gives \(24-60-48-24+45=-63\).
Reading and Checking the Expansion
The cofactor expansion is a sum of signed products: an entry times the determinant of its minor. For symbolic work, that description is more than bookkeeping. It separates three tasks that can otherwise blur together: choosing a row or column, computing its minors, and simplifying the resulting expression. If the first two tasks are correct, algebraic simplification can be checked term by term against the unsimplified expansion.
The example with \(\mathbf{B}\) also illustrates how zeros help without changing the sign pattern. The third and fourth positions of its first row would carry positive and negative signs, respectively, but their entries are both zero. They contribute zero. The nonzero entry in position \((1,2)\) still contributes negatively, so its minor must be subtracted even though the other terms in that row vanish.
When the simplified expression is long, keep the factorized form as an intermediate checkpoint. For instance, \(x(yzw-30y-12w)-(2zw-45)\) makes the origin of each term visible. Expanding it gives \(xyzw-30xy-12xw-2zw+45\). Distributing the leading negative sign incorrectly would change both terms inside the second parenthesis, so comparing the two forms is a useful final arithmetic check.
Common Pitfall: Simplifying Before the Signs Are Set
A common mistake is to expand the minors and combine terms while still deciding which cofactor signs apply. In the first worked example, that can turn the correct term \(-2(3z-4)\) into \(+2(3z-4)\). The incorrect expression \(xyz+2(3z-4)-y\) evaluates to \(14\) at \(x=1\), \(y=2\), and \(z=3\), whereas the correct expression evaluates to \(6-10-2=-6\).
To avoid this mistake, write the signed terms first, including parentheses around each minor. For example, record \(x(yz)-2(3z-4)+1(-y)\) before distributing. Then check the checkerboard signs and minor calculations separately, simplify, and test the result with a substitution. These steps make it possible to locate an error precisely: a wrong checkerboard sign, an incorrect minor, or an algebraic simplification mistake.
Check Your Understanding
For each problem, form the signed cofactor terms before simplifying. Use a substitution to check each symbolic expression.
- Expand \(\det\begin{bmatrix}a&b&1\\2&c&0\\1&d&e\end{bmatrix}\) along the first row.
- For \(\begin{bmatrix}p&2&0\\1&q&3\\4&0&r\end{bmatrix}\), write all three first-row signed terms and simplify.
- Expand \(\begin{bmatrix}x&1&0&0\\1&y&2&0\\0&3&z&4\\2&0&5&w\end{bmatrix}\) along the first row, expressing the result using two three-by-three minors.
- Explain why the second term in a first-row cofactor expansion has a negative sign, even if its minor determinant is negative.
- Choose exact values for the symbols in question 1 and verify the symbolic formula by computing the determinant of the substituted matrix.