Tutorials › Linear Algebra › A Cofactor Expansion Problem-Solving Workshop

Determinants by Cofactor Expansion · Tutorial 229 of 1000

A Cofactor Expansion Problem-Solving Workshop

Learn a reliable workflow for choosing a cofactor expansion and computing and checking every minor.

Beginner 9 min read

What You'll Learn

  • Apply cofactor expansion along a selected row or column.
  • Choose a first row, sparse row, or sparse column to limit the number of terms.
  • Compute each surviving minor using smaller determinants.
  • Track cofactor signs from the row and column indices.
  • Check an expansion by calculating the same determinant in another direction.
  • Identify and correct a common sign error in a sparse-column expansion.

A Reliable Plan for Cofactor Expansion

Cofactor expansion turns a determinant into a sum of smaller determinants. The arithmetic is usually manageable; the challenge is organising it so that signs, deleted rows and columns, and smaller determinants are all handled correctly. A useful plan is to choose an expansion direction before calculating, write down exactly which rows and columns each minor uses, and check the result by a second expansion when practical.

For an \(n\times n\) matrix \(\mathbf{A}=[a_{ij}]\), the minor \(M_{ij}\) is the determinant of the \((n-1)\times(n-1)\) matrix obtained by deleting row \(i\) and column \(j\). The cofactor is \(C_{ij}=(-1)^{i+j}M_{ij}\). Thus an entry contributes its value times its cofactor, not merely its minor. The alternating signs follow this checkerboard pattern:

$$ \begin{bmatrix} +&-&+&-\\ -&+&-&+\\ +&-&+&-\\ -&+&-&+ \end{bmatrix}. $$

By the cofactor expansion theorem, expanding along row \(i\) gives \(\det\mathbf{A}=\sum_{j=1}^{n}a_{ij}(-1)^{i+j}M_{ij}\); expanding along column \(j\) gives \(\det\mathbf{A}=\sum_{i=1}^{n}a_{ij}(-1)^{i+j}M_{ij}\). This theorem is established in the earlier material on cofactor expansion. A zero entry contributes zero, so an expansion direction with many zero entries requires fewer minor calculations.

Problem-solving rule: Choose a row or column, record the indices of each nonzero entry, delete that entry’s row and column to form its minor, apply the sign \((-1)^{i+j}\), and add the resulting terms. If a row or column has exactly one nonzero entry \(a_{ij}\), then \(\det\mathbf{A}=a_{ij}(-1)^{i+j}M_{ij}\).

Proof. The cofactor expansion theorem says that the determinant is the sum of the terms \(a_{ij}(-1)^{i+j}M_{ij}\) along the selected row or column. For every zero entry, its term is \(0\cdot(-1)^{i+j}M_{ij}=0\), so removing those terms does not change the sum. If exactly one entry is nonzero, every other term is zero and the sum consists of that one term. \(\square\)

The rule is simple, but a minor must be formed from the original matrix by deleting the correct row and column. It is not the determinant of the remaining entries in their original locations, and it does not include the sign factor. Keep the minor and its cofactor sign separate until the final multiplication.

First-Row Expansion of a Three-by-Three Matrix

Worked Example: Expand Across the First Row

Evaluate

$$ \det\begin{bmatrix} 2&-1&3\\ 1&0&4\\ -2&5&1 \end{bmatrix}. $$

The first row has no zero entries, but expanding across it gives three \(2\times2\) minors. The signs in the first row are \(+,-,+\). In particular, the middle term is the negative of the matrix entry times its minor; because that entry is \(-1\), its contribution is positive.

$$ \begin{aligned} \det\mathbf{A} &=2\begin{vmatrix}0&4\\5&1\end{vmatrix} -(-1)\begin{vmatrix}1&4\\-2&1\end{vmatrix} +3\begin{vmatrix}1&0\\-2&5\end{vmatrix}\\ &=2\bigl(0\cdot1-4\cdot5\bigr) +1\bigl(1\cdot1-4\cdot(-2)\bigr) +3\bigl(1\cdot5-0\cdot(-2)\bigr)\\ &=2(-20)+1(9)+3(5)\\ &=-40+9+15\\ &=-16. \end{aligned} $$

Check by expanding down the first column: the three contributions are \(2(-20)\), \(-1(-16)\), and \((-2)(-4)\). Their sum is \(-40+16+8=-16\), confirming the first expansion.

For a \(3\times3\) matrix, each minor in a cofactor expansion is \(2\times2\). Calculate these smaller determinants using \(ad-bc\), and show both products before subtracting. That makes sign errors easier to locate: a negative result for a minor is not itself the cofactor sign.

Using a Sparse Row in a Four-by-Four Matrix

Worked Example: A Row with One Nonzero Entry

Evaluate the determinant by expanding along row 2:

$$ \mathbf{A}= \begin{bmatrix} 1&2&0&1\\ 0&0&3&0\\ 2&-1&1&4\\ 1&0&2&-1 \end{bmatrix}. $$

Row 2 has a single nonzero entry, \(a_{23}=3\). Its cofactor sign is \((-1)^{2+3}=-1\). Deleting row 2 and column 3 leaves the minor below, so the determinant reduces to one \(3\times3\) calculation:

$$ \begin{aligned} \det\mathbf{A} &=3(-1)^{2+3} \begin{vmatrix} 1&2&1\\ 2&-1&4\\ 1&0&-1 \end{vmatrix}\\ &=-3\left[ 1\begin{vmatrix}-1&4\\0&-1\end{vmatrix} -2\begin{vmatrix}2&4\\1&-1\end{vmatrix} +1\begin{vmatrix}2&-1\\1&0\end{vmatrix} \right]\\ &=-3\left[ 1\bigl((-1)(-1)-4\cdot0\bigr) -2\bigl(2(-1)-4\cdot1\bigr) +1\bigl(2\cdot0-(-1)\cdot1\bigr) \right]\\ &=-3\left[1-2(-6)+1\right]\\ &=-3(14)\\ &=-42. \end{aligned} $$

For a check, expand the \(3\times3\) minor down its second column. Its contributions are \(-2\begin{vmatrix}2&4\\1&-1\end{vmatrix}=12\) and \((-1)\begin{vmatrix}1&1\\1&-1\end{vmatrix}=2\); the third entry in that column is zero. Their sum is \(12+2=14\), as above. The original determinant is therefore \(-3(14)=-42\).

This example separates two sign decisions. The outer factor \(-1\) is the cofactor sign for position \((2,3)\). Inside the minor, the first-row expansion has signs \(+,-,+\). Applying the outer sign only after the minor is calculated is a useful way to avoid mixing the two steps.

Using a Sparse Column in a Four-by-Four Matrix

Worked Example: Expand Down the First Column

Evaluate the determinant by expanding down column 1:

$$ \mathbf{B}= \begin{bmatrix} 2&1&0&3\\ 0&1&2&0\\ 0&4&1&1\\ 3&0&0&2 \end{bmatrix}. $$

The first column has two nonzero entries, \(b_{11}=2\) and \(b_{41}=3\). The signs at these positions are \(+\) and \((-1)^{4+1}=-\). For the first term, delete row 1 and column 1. For the second, delete row 4 and column 1:

$$ \begin{aligned} \det\mathbf{B} &=2\begin{vmatrix} 1&2&0\\ 4&1&1\\ 0&0&2 \end{vmatrix} -3\begin{vmatrix} 1&0&3\\ 1&2&0\\ 4&1&1 \end{vmatrix}. \end{aligned} $$

Compute the first minor by expanding along its last row. The two zero entries contribute zero, leaving \(2\begin{vmatrix}1&2\\4&1\end{vmatrix}=2(1-8)=-14\). Compute the second minor across its first row:

$$ \begin{aligned} \begin{vmatrix} 1&0&3\\ 1&2&0\\ 4&1&1 \end{vmatrix} &=1\begin{vmatrix}2&0\\1&1\end{vmatrix} -0\begin{vmatrix}1&0\\4&1\end{vmatrix} +3\begin{vmatrix}1&2\\4&1\end{vmatrix}\\ &=1(2\cdot1-0\cdot1)+0+3(1\cdot1-2\cdot4)\\ &=2+3(-7)\\ &=-19. \end{aligned} $$

Substitute both minor values, including the outer cofactor sign:

$$ \det\mathbf{B}=2(-14)-3(-19)=-28+57=29. $$

Check using row 2: its nonzero entries are \(b_{22}=1\) and \(b_{23}=2\), with signs \(+\) and \(-\). Their minors are

$$ \begin{aligned} \begin{vmatrix}2&0&3\\0&1&1\\3&0&2\end{vmatrix} &=\begin{vmatrix}2&3\\3&2\end{vmatrix} =4-9=-5,\\ \begin{vmatrix}2&1&3\\0&4&1\\3&0&2\end{vmatrix} &=2(8)-1(-3)+3(-12)\\ &=16+3-36=-17. \end{aligned} $$

Thus expansion along row 2 gives \(1(-5)-2(-17)=-5+34=29\), in agreement with the column expansion.

How to Check the Work and Catch Sign Errors

A check is most useful when it tests steps that could have gone wrong. Expanding the same determinant along a different row or column changes which minors are used and which cofactor signs apply, so agreement provides a strong arithmetic check. It does not replace a careful calculation: both expansions could share an error if the same minor is copied incorrectly. For each minor, verify its entries by identifying the deleted row and column, and show the \(2\times2\) products explicitly.

Takeaway: A cofactor term has three parts: the matrix entry \(a_{ij}\), the sign \((-1)^{i+j}\), and the minor \(M_{ij}\). Keep track of all three, even when the sign or entry is negative.

Common mistake: forgetting the checkerboard sign. In the sparse-column example, the entry in position \((4,1)\) is \(3\), and its minor is \(-19\). A tempting but wrong calculation is to use \(+3(-19)\), as though every term in the expansion down a column had a positive sign. That gives \(-28-57=-85\), not the determinant. The correct position sign is \((-1)^{4+1}=-1\), so the term is \(-3(-19)=57\), and the determinant is \(-28+57=29\). The indices are the row and column numbers in the original matrix; do not renumber them after deleting a row or column.

A second common problem is deleting only one of the required indices. For \(M_{ij}\), delete row \(i\) and column \(j\), then keep the remaining entries in their original relative order. In the row-2 expansion of \(\mathbf{A}\), deleting row 2 and column 3 leaves rows 1, 3, and 4 and columns 1, 2, and 4. The resulting minor is therefore \(\begin{bmatrix}1&2&1\\2&-1&4\\1&0&-1\end{bmatrix}\), not a matrix formed by dropping the third row or by retaining column 3.

When choosing a direction, count the nonzero entries in each row and column and prefer one with fewer entries if it makes the arithmetic manageable. A first-row expansion is still useful when the problem asks for it or when its minors are simple. The goal is not to apply a special rule to every matrix, but to choose a valid expansion and keep its bookkeeping exact. The same cofactor formula works for any selected row or column.

Check Your Understanding

For each problem, state the expansion direction, write the cofactor signs, and show how each minor is evaluated.

  1. Expand across the first row to evaluate \(\begin{bmatrix}1&2&0\\3&-1&4\\2&1&5\end{bmatrix}\).
  2. For \(\begin{bmatrix}2&0&1&3\\0&0&4&0\\1&2&0&1\\0&1&2&-1\end{bmatrix}\), identify the row with the fewest nonzero entries and use it to set up the expansion.
  3. Evaluate \(\det\begin{bmatrix}1&2&0&1\\3&1&4&0\\0&0&0&2\\2&-1&1&3\end{bmatrix}\) by expanding along row 3. What is the cofactor sign of its nonzero entry?
  4. In a column expansion, an entry \(a_{31}=-2\) has minor \(5\). What is its full cofactor-expansion term?
  5. Describe how deleting row \(i\) and column \(j\) determines the minor \(M_{ij}\), and how \((-1)^{i+j}\) determines its cofactor sign.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon