Matrix Determinant Calculator: 2x2 and 3x3 Methods (2026)
Step-by-step cofactor expansion and Sarrus rule with worked examples, geometric meaning, and singular matrix explanation.
The 2x2 determinant formula is the simplest case and the foundation for all larger matrix determinants. For a matrix with elements a, b, c, d arranged in two rows:
Worked example: Matrix A = [[5, 3], [-2, 4]]
The 2x2 formula appears inside every larger cofactor expansion. For polynomial function work that also uses step-by-step calculation, the Antiderivative Calculator shows integration with each term's rule labeled, similar to how each cofactor is labeled here.
A 3x3 determinant is calculated by cofactor expansion. The most common method expands along the first row, with a sign pattern of +, -, +:
Each term (a, b, c) is multiplied by the determinant of the 2x2 submatrix left after crossing out that element's row and column. The three submatrices and their cofactors are:
| Element | Sign | 2x2 Submatrix (remove row 1 and that column) | Cofactor |
|---|---|---|---|
| a | + | [[e, f], [h, i]] | ei - fh |
| b | - | [[d, f], [g, i]] | di - fg |
| c | + | [[d, e], [g, h]] | dh - eg |
You can expand along any row or column. The result is the same. Expanding along a row or column that contains zeros reduces the number of 2x2 sub-determinants you need to compute, since any term multiplied by zero contributes nothing. For data fitting and function interpolation across known points, see the Interpolation Calculator.
A 4x4 determinant uses the same cofactor expansion principle. Expanding along the first row, each element is multiplied by its signed cofactor (the determinant of the 3x3 submatrix formed by removing that element's row and column). The sign pattern follows (-1)^(row+column):
| Matrix size | Expansion produces | Number of multiplications | Common method |
|---|---|---|---|
| 2x2 | 1 formula (2 terms) | 2 | Direct formula |
| 3x3 | 3 sub-determinants (2x2 each) | 9 | Cofactor expansion |
| 4x4 | 4 sub-determinants (3x3 each) | ~40 | Cofactor expansion |
| 5x5+ | n sub-determinants recursively | Grows as n! | LU decomposition (software) |
This calculator handles 2x2 and 3x3 with full step-by-step work. For 4x4 and larger matrices, most linear algebra courses teach cofactor expansion for understanding the concept, then use software (NumPy, MATLAB, Wolfram) for actual computation. For descriptive statistics calculations that also show working steps, the Mean Median Mode Calculator covers sorted data with the formula shown.
Find the determinant of A = [[3, -1], [2, 4]] and determine if it is invertible.
Researches and verifies the formulas, methodology, and source data behind each calculator on CalculatorFlux. All tools are built and checked against the cited references before publication.
In-depth guides related to this calculator.