Cofactor Expansion Calculator

Enter a 3×3 matrix and expand along any row or column using the Laplace cofactor formula to compute the determinant, with every signed term shown.

Quick Facts

Formula
det(A) = ai1Ci1 + ai2Ci2 + ai3Ci3 (expand along any row i or column j)
Cij = (-1)^(i+j) x Mij, where Mij is the 2x2 minor left after deleting row i and column j. Every row and column gives the same determinant.

Your Results

Calculated
Determinant det(A)
-
Sum of the three expansion terms
Term 1
-
First entry x its cofactor (a x C)
Term 2
-
Second entry x its cofactor (a x C)
Term 3
-
Third entry x its cofactor (a x C)

Ready

Enter a 3×3 matrix and choose a row or column to expand along, then press Calculate.

How Cofactor Expansion works

Cofactor expansion (also called Laplace expansion) is the standard method for computing the determinant of a square matrix by breaking it down into smaller determinants. For a 3×3 matrix A with entries aij, expanding along row i gives:

det(A) = ai1Ci1 + ai2Ci2 + ai3Ci3

The same identity works down any column j: det(A) = a1jC1j + a2jC2j + a3jC3j. Every choice of row or column produces the identical determinant — that invariance is the content of the Laplace expansion theorem.

Formula and method

Each Cij is a cofactor: Cij = (−1)i+j × Mij, where Mij is the minor — the determinant of the 2×2 matrix left after deleting row i and column j from A. The sign (−1)i+j follows a checkerboard pattern (+, −, +, −, +, −, +, −, +) starting with + in the top-left cell. For a 2×2 matrix, the minor is simply the single remaining entry (a determinant of one number is that number itself), so M11 for the top-left deletion equals the product-difference of the other four entries, e.g. det [[p,q],[r,s]] = ps − qr.

Common sources of error

  • Sign errors: forgetting the (−1)i+j alternating sign is the single most common mistake — write out the sign pattern before multiplying
  • Wrong minor: double-check you deleted the correct row and column before computing the 2×2 minor determinant
  • Row/column mix-up: aij means row i, column j — swapping the indices picks the wrong matrix entry

Checking your result

Because the determinant is the same no matter which row or column you expand along, the best sanity check is to expand a second time along a different row or column and confirm you get the same number. If the two expansions disagree, a sign or arithmetic slip happened in one of them. You can also check the extreme cases: if any row or column is all zeros, or two rows/columns are identical, the determinant must be exactly 0.

Applications

The determinant tells you whether a matrix is invertible (det ≠ 0) or singular (det = 0), which in turn determines whether a linear system Ax = b has a unique solution. Cofactor expansion also builds the adjugate matrix (the transpose of the cofactor matrix), which is used in the formula A-1 = (1/det(A)) × adj(A) for inverting a matrix by hand.

Frequently Asked Questions

What is cofactor expansion used for?
Cofactor (Laplace) expansion computes the determinant of a square matrix by reducing it to a sum of smaller determinants. It is the standard hand method for 3x3 and 4x4 matrices, and it underlies the adjugate-matrix formula for computing a matrix inverse.
What is the difference between a minor and a cofactor?
The minor M(i,j) is the determinant of the smaller matrix left after deleting row i and column j. The cofactor C(i,j) applies a sign to that minor: C(i,j) = (-1)^(i+j) x M(i,j). The sign alternates in a checkerboard pattern starting with + in the top-left position.
Does it matter which row or column I expand along?
No — the determinant is identical regardless of which row or column you choose. Picking a row or column with a zero entry is a useful shortcut by hand, since that term drops out of the sum, but this calculator computes the same correct determinant for any choice.
What does a determinant of zero mean?
A determinant of zero means the matrix is singular: it has no inverse, its rows (and columns) are linearly dependent, and the linear system Ax = b either has no solution or infinitely many, depending on b. A nonzero determinant means the matrix is invertible with a unique solution for every b.