Determinant and Cofactor Formulas
2×2 determinant
|a b; c d| = ad − bcMultiply the main diagonal, subtract the product of the other diagonal.
Minor and cofactor
Cᵢⱼ = (−1)ⁱ⁺ʲ det(Mᵢⱼ)Mᵢⱼ is formed by deleting row i and column j. Here the displayed indices start at 1.
Expansion along row i
det(A) = Σⱼ aᵢⱼ CᵢⱼThe sign pattern alternates like a checkerboard, beginning with plus at position (1,1).
10⁵⁰ in magnitude. The chosen decimal places affect display only, and tiny cancellation residue may appear for decimal matrices.How to Use the Determinant Calculator
- Choose a matrix size and enter every value, or paste a complete square matrix.
- Choose the row used for the first expansion. A row with several zeros produces fewer nonzero terms.
- Select Calculate determinant to see the final value and top-level expansion.
- Open each nonzero contribution to trace its minor determinant down to 2×2 arithmetic, then copy or download the full working.
Worked 3×3 Determinant Example
For A = [[2,−3,1],[2,0,−1],[1,4,5]], expanding along row 1 gives:
det(A) = 2(0·5 − (−1)·4) − (−3)(2·5 − (−1)·1) + 1(2·4 − 0·1) = 49
Zero terms save work
If an expansion entry is zero, its entire contribution is zero, so that minor determinant does not need to be evaluated.
Changing the row
Expanding the same matrix along row 2 or row 3 rearranges the arithmetic but still gives 49.
What the Determinant Tells You
The absolute determinant is the factor by which a linear transformation scales area in two dimensions or volume in three dimensions. Its sign records orientation. A determinant of zero means the transformation collapses at least one dimension, so the matrix is singular and has no inverse.
Cofactor expansion is especially useful for learning, proofs, and matrices with many zeros. For large dense matrices, elimination-based methods such as LU decomposition are usually more efficient.
Determinant Calculator FAQs
What is a matrix determinant?
It is a single number defined for a square matrix. It describes signed scaling and helps determine whether the matrix is invertible.
What is cofactor expansion?
It expresses a determinant as a sum of entries from one row or column, each multiplied by its alternating sign and minor determinant.
Can I expand along any row?
Yes. Every row and every column produces the same determinant. Choosing a row or column with many zeros usually shortens the work.
What does a zero determinant mean?
The rows or columns are linearly dependent, the matrix has no inverse, and the corresponding transformation collapses space into a lower dimension.
Why is the calculator limited to 5×5?
Recursive cofactor expansion grows very quickly. The limit keeps the complete step-by-step tree usable; elimination-based methods are better suited to larger dense matrices.
Why is a decimal result sometimes extremely close to zero instead of zero?
Binary floating-point cannot represent every decimal exactly, and subtraction can expose a small rounding residue. Increase or decrease displayed precision according to the accuracy of the inputs.
Are my matrix entries private?
Yes. This page performs parsing, calculation, copying, and file creation locally. Its calculator code does not transmit or store your entries.
Calculation Notes
Last reviewed: August 4, 2026 by the Starlight Tools editorial team.
The calculator performs literal recursive cofactor expansion, skipping branches whose coefficient is exactly zero. It does not round intermediate values. Results for ill-conditioned decimal matrices should be interpreted at the precision justified by the input data.
