Advertisement

Cofactor expansion calculator

Calculate a square matrix determinant by expanding along a chosen row or column. Inspect each minor, signed cofactor and contribution in a table.

Calculator

Determinant
-2.0000000000
Cofactor expansion terms
RowColumnEntryMinor determinantCofactorContribution
111.0000004.0000004.0000004.000000
122.0000003.000000-3.000000-6.000000

Advertisement

How this calculator works

Choose a row or column and remove its row and column for each selected entry to form a minor matrix. Multiply each minor determinant by the checkerboard sign to obtain its cofactor, then multiply by the original entry. Summing the contributions gives the determinant. The table displays these steps for square matrices from 2 by 2 through 5 by 5. Decimal entries use floating-point arithmetic.

Formula

C_ij = (-1)^(i+j) det(M_ij). Along row i: det(A) = sum_j a_ij C_ij. A column expansion uses the corresponding column sum.

Worked example

For [[1,2],[3,4]], expanding the first row gives 1 times 4 + 2 times (-3) = -2. The diagonal matrix diag(2,3,4) has determinant 24.

Advertisement

Frequently asked questions

Which row should I choose?

A row or column with many zeros reduces the number of non-zero contributions. Every choice gives the same determinant apart from rounding.

Where do cofactor signs start?

The top-left sign is positive, with signs alternating across each row and down each column.

Can a singular matrix be entered?

Yes. Its determinant is zero in exact arithmetic; nearly singular decimal matrices can show small rounding residuals.

Sources

Advertisement