Tutorials › Linear Algebra › Computing Three-by-Three Determinants

Determinants by Cofactor Expansion · Tutorial 216 of 1000

Computing Three-by-Three Determinants

Work through first-row cofactor expansion for three-by-three matrices, calculating and checking each minor and signed contribution.

Beginner 9 min read

What You'll Learn

  • Identify the three two-by-two minors used in a first-row expansion.
  • Apply the alternating positive, negative, positive cofactor signs.
  • Evaluate each minor using the two-by-two determinant formula.
  • Combine signed terms without losing a negative sign.
  • Check an expansion by recalculating its minors and contributions.

From a Three-by-Three Matrix to Three Smaller Determinants

A three-by-three determinant can be evaluated by reducing the calculation to three two-by-two determinants. The essential bookkeeping is to delete the first row and one column at a time, calculate each resulting minor, and attach the correct cofactor sign before combining the contributions. Keeping these stages separate makes it easier to see where each number comes from and to catch sign errors.

For a two-by-two matrix, the determinant is the product of the main-diagonal entries minus the product of the other diagonal entries. For a three-by-three matrix, the minor associated with an entry in the first row is found by deleting that row and the entry’s column, then taking the determinant of the remaining two-by-two matrix.

Definition: Let \(\mathbf{A}=\begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix}\). The first-row minors are \(M_{11}=\det\begin{bmatrix}e&f\\h&i\end{bmatrix}\), \(M_{12}=\det\begin{bmatrix}d&f\\g&i\end{bmatrix}\), and \(M_{13}=\det\begin{bmatrix}d&e\\g&h\end{bmatrix}\). The cofactor of the entry in row \(1\), column \(j\) is \(C_{1j}=(-1)^{1+j}M_{1j}\). The first-row cofactor expansion is the sum \(aC_{11}+bC_{12}+cC_{13}\).

In practical terms, the three minors come from deleting columns 1, 2, and 3, respectively, while always deleting row 1. Each minor is itself a two-by-two determinant. The cofactor signs in the first row are positive, negative, positive. These signs belong to the cofactors: the middle contribution is subtracted, even if its minor is negative.

Why the First-Row Signs Alternate

Lemma: In a first-row cofactor expansion of a three-by-three determinant, the cofactor signs are \(+,-,+\).

Proof. By the definition of a cofactor, the sign attached to the minor in column \(j\) of row 1 is \((-1)^{1+j}\). For \(j=1\), this is \((-1)^2=1\). For \(j=2\), it is \((-1)^3=-1\). For \(j=3\), it is \((-1)^4=1\). Therefore the three cofactor signs, from left to right, are \(+,-,+\). \(\square\)

This sign pattern determines the calculation, but it does not change how a minor is evaluated. First calculate each two-by-two determinant using \(ad-bc\) for entries \(\begin{bmatrix}a&b\\c&d\end{bmatrix}\). Then multiply each minor by its first-row entry, applying the cofactor sign to the whole product.

Theorem (First-row formula for a three-by-three determinant): For \(\mathbf{A}=\begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix}\), the determinant is \(\det\mathbf{A}=a(ei-fh)-b(di-fg)+c(dh-eg)\).

Proof. The recursive definition of the determinant expands along the first row: multiply each first-row entry by its cofactor and add the three results. 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\). Deleting row 1 and column 3 leaves \(\begin{bmatrix}d&e\\g&h\end{bmatrix}\), whose determinant is \(dh-eg\). The cofactor signs from the lemma are \(+,-,+\), so the first-row expansion is \(a(ei-fh)-b(di-fg)+c(dh-eg)\), as claimed. \(\square\)

The formula requires no special conditions on the entries: it applies to every three-by-three matrix with real entries. It is useful to keep the factored form visible while calculating, since it records the three separate minors and their signs. Expanding all parentheses too early can make it harder to distinguish a negative minor from a negative cofactor.

Worked First-Row Expansions

Worked Example: Three Nonzero Contributions

Evaluate \(\det\mathbf{A}\) for \(\mathbf{A}=\begin{bmatrix}2&1&3\\0&4&-1\\5&2&1\end{bmatrix}\).

Delete the first row and first column to obtain the first minor. Its determinant is \(4\cdot1-(-1)\cdot2=4+2=6\). For the second minor, delete the first row and second column: \(0\cdot1-(-1)\cdot5=0+5=5\). For the third minor, delete the first row and third column: \(0\cdot2-4\cdot5=0-20=-20\).

$$ \begin{aligned} \det\mathbf{A} &=2(6)-1(5)+3(-20)\\ &=12-5-60\\ &=-53. \end{aligned} $$

Check: The minor values are \(6\), \(5\), and \(-20\), obtained directly from the three remaining two-by-two matrices. Applying the signs gives contributions \(2(6)=12\), \(-1(5)=-5\), and \(3(-20)=-60\). Their sum is \(12+(-5)+(-60)=-53\), agreeing with the result.

Worked Example: A Negative Middle Entry

Evaluate \(\det\mathbf{B}\) for \(\mathbf{B}=\begin{bmatrix}1&-2&0\\3&1&4\\-1&2&5\end{bmatrix}\).

The first minor is \(1\cdot5-4\cdot2=5-8=-3\). The second minor is \(3\cdot5-4\cdot(-1)=15+4=19\). The third minor is \(3\cdot2-1\cdot(-1)=6+1=7\). The middle cofactor sign is negative, so its contribution is \(-(-2)(19)\), not simply \((-2)(19)\).

$$ \begin{aligned} \det\mathbf{B} &=1(-3)-(-2)(19)+0(7)\\ &=-3+38+0\\ &=35. \end{aligned} $$

Check: The three signed contributions are \(-3\), \(38\), and \(0\). Adding them gives \(-3+38+0=35\). In particular, the negative entry \(-2\) and the negative cofactor sign together make a positive middle contribution.

Worked Example: A Negative First-Row Entry

Evaluate \(\det\mathbf{C}\) for \(\mathbf{C}=\begin{bmatrix}-2&3&1\\1&0&2\\4&-1&3\end{bmatrix}\).

For the first minor, delete row 1 and column 1: \(0\cdot3-2\cdot(-1)=0+2=2\). For the second, delete row 1 and column 2: \(1\cdot3-2\cdot4=3-8=-5\). For the third, delete row 1 and column 3: \(1\cdot(-1)-0\cdot4=-1-0=-1\).

$$ \begin{aligned} \det\mathbf{C} &=(-2)(2)-3(-5)+1(-1)\\ &=-4+15-1\\ &=10. \end{aligned} $$

Check: The first contribution is \(-4\), the second is \(15\) because the cofactor sign and the minor are both negative, and the third is \(-1\). Combining them gives \(-4+15-1=10\).

A Reliable Calculation Routine

The same short routine applies to any three-by-three matrix. It is not necessary to search for a special pattern: the focus here is simply to expand along the first row and keep the three contributions organized.

1
Copy the first-row entries.
Write the expansion in the form \(a(\text{first minor})-b(\text{second minor})+c(\text{third minor})\). The entries are \(a,b,c\), in their original order.
2
Delete one column at a time.
For each minor, remove row 1 and the column containing the corresponding first-row entry. Keep the remaining two rows and columns in their original order.
3
Calculate each two-by-two determinant.
For \(\begin{bmatrix}x&y\\z&w\end{bmatrix}\), calculate \(xw-yz\). Preserve any negative signs in the entries during both multiplications.
4
Apply the cofactor signs and add.
Use \(+\), then \(-\), then \(+\) on the three products. Add the resulting signed numbers, not the unsigned magnitudes.
5
Check the bookkeeping.
Recalculate each minor from its displayed two-by-two matrix and list the three signed contributions separately before adding them.

Writing each minor explicitly is especially valuable when entries are negative. For example, an expression such as \(3\cdot5-4\cdot(-1)\) becomes \(15+4\), not \(15-4\). Separately, even if a minor is negative, its contribution may become positive if it is multiplied by a negative first-row entry or by the negative middle cofactor sign.

Common Sign and Minor Errors

Mistake: treating the middle cofactor as positive. For the matrix \(\mathbf{B}\) above, a wrong calculation might write \(1(-3)+(-2)(19)+0(7)=-41\). This uses the raw middle entry times its minor without the required negative cofactor sign.

Correction: Keep the middle subtraction in the formula. Since the middle entry is \(-2\), the contribution is \(-(-2)(19)=38\), and the full calculation is \(-3+38+0=35\). The cofactor sign is part of the formula regardless of whether the entry or the minor is positive or negative.

Mistake: deleting the wrong column when forming a minor. The second first-row entry is in column 2, so its minor must be formed by deleting column 2. For \(\mathbf{B}\), that minor is \(\begin{bmatrix}3&4\\-1&5\end{bmatrix}\), with determinant \(3\cdot5-4\cdot(-1)=19\). Using the minor from column 1 or column 3 would pair the wrong two-by-two determinant with the middle entry.

A useful final check is to compare the written work against the structure of the formula: there must be exactly three minors, each taken from the rows and columns left after one deletion; each minor must use the two-by-two rule; and the three signed contributions must appear in the order \(+\), \(-\), \(+\). This checks the method without changing the expansion being used.

Check Your Understanding

For each problem, show the three minors separately, apply the first-row signs, and combine the contributions.

  1. Evaluate \(\det\begin{bmatrix}1&2&-1\\3&0&4\\2&5&1\end{bmatrix}\).
  2. For \(\begin{bmatrix}2&-1&3\\1&4&0\\-2&5&1\end{bmatrix}\), find the second minor and its signed contribution to the expansion.
  3. Evaluate \(\det\begin{bmatrix}0&3&2\\1&-1&4\\2&5&0\end{bmatrix}\) by first-row cofactor expansion.
  4. Explain why the second contribution in a first-row expansion is subtracted even when the second minor is negative.
  5. For \(\begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix}\), write all three first-row minors and the signed expansion.

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