Determinant Calculator
This determinant calculator finds the determinant of a 2×2, 3×3 or 4×4 matrix exactly. It shows the cofactor expansion step by step and checks the answer a second way, by row reduction.
Result
Enter values and press Calculate to see the result.
Formula
A 2×2 determinant: multiply down the main diagonal, subtract the other diagonal.
A 3×3 determinant by cofactor expansion along the first row, with the signs + − +. A 4×4 works the same way using four 3×3 minors.
How to use this calculator
- Choose the matrix size: 2 × 2, 3 × 3 or 4 × 4.
- Fill in the grid row by row. Whole numbers, decimals and fractions such as 3/4 all work.
- Press Calculate. You get the determinant, whether the matrix is invertible, and every step of the cofactor expansion.
Worked examples
Easy: a 2 × 2 matrix
For [[3, 8], [4, 6]], use ad − bc.
3 · 6 − 8 · 4 = 18 − 32 = −14.
The determinant is not 0, so the matrix is invertible.
Medium: a 3 × 3 matrix
Expand along the first row (6, 1, 1) with signs + − +.
Minors: (−2)(7) − 5 · 8 = −54, 4 · 7 − 5 · 2 = 18, and 4 · 8 − (−2)(2) = 36.
det = 6(−54) − 1(18) + 1(36) = −324 − 18 + 36 = −306.
Hard: a 4 × 4 matrix
Column 2 has only one non-zero entry (the 1 in row 3), so expanding down that column is quickest by hand.
Its sign is (−1)³⁺² = −1, and the 3 × 3 minor left after removing row 3 and column 2 is [[1, 2, −1], [3, 0, 5], [1, 5, 0]], whose determinant is −25 + 10 − 15 = −30.
det = −1 × 1 × (−30) = 30. The calculator expands along the first row instead and gets the same 30, then confirms it by row reduction.
Common mistakes
- Getting the signs wrong in a cofactor expansion: along the first row they go + − + −.
- Subtracting the diagonals the wrong way round: for a 2×2 it is ad − bc, not bc − ad.
- Using the wrong minor: delete the whole row and column of the entry you are expanding on.
- Slips with negative entries: (−2)(7) is −14, and subtracting a negative minor adds.
Frequently asked questions
What is the formula for a 3×3 determinant?
a(ei − fh) − b(di − fg) + c(dh − eg), where the first row is a, b, c, the second d, e, f and the third g, h, i. Each bracket is a 2×2 determinant (a minor).
What does a determinant of 0 mean?
The matrix is singular: it has no inverse, its rows (and columns) are linearly dependent, and a system of equations with this coefficient matrix has either no solution or infinitely many.
Can the determinant calculator do 4×4 matrices?
Yes — 2×2, 3×3 and 4×4. A 4×4 determinant is expanded into four 3×3 minors, and each minor’s value is shown.
Can I enter fractions or decimals?
Yes. Entries such as 3/4, −2/5 or 0.5 are kept exact, so the determinant is exact too (with a decimal shown when it is a fraction).
How is the answer checked?
Two different methods: cofactor expansion (shown in the steps) and row reduction to triangular form. The result is marked verified only when both agree.