Determinant Calculator
Calculate the determinant of a 2×2, 3×3 or 4×4 matrix instantly, with the ad − bc or Sarrus expansion shown and a singular-matrix check. Free tool.
About the Determinant Calculator
The determinant is a single number that summarises a square matrix: whether it is invertible, how it scales area or volume, and whether a linear system has a unique solution. This determinant calculator handles 2×2, 3×3 and 4×4 matrices — type the entries into the grid and the determinant appears instantly, computed by Gaussian elimination with partial pivoting for numerical stability.
For small matrices it also shows the classic expansions: a 2×2 determinant is ad − bc, and a 3×3 follows the rule of Sarrus — sum the three down-right diagonal products, subtract the three up-right ones. For [[1,2],[3,4]] the determinant is 1×4 − 2×3 = −2. A determinant of exactly 0 means the matrix is singular: its rows are linearly dependent, it has no inverse, and the corresponding system of equations has either no solution or infinitely many.
Linear algebra students meet determinants in Cramer's rule, eigenvalue problems and change-of-variable integrals; engineers and graphics programmers use them to test transform invertibility. The elimination approach used here is exactly how numerical libraries compute determinants at scale.
How to Use the Determinant Calculator
- 1Choose the matrix size — 2×2, 3×3 or 4×4.
- 2Type the entries into the grid.
- 3Read the determinant and whether the matrix is invertible.
- 4For 2×2 and 3×3, follow the expansion line with your numbers substituted.
Frequently Asked Questions
How do I calculate a 2×2 determinant?
Cross-multiply and subtract: det [[a,b],[c,d]] = ad − bc. For [[1,2],[3,4]]: 1×4 − 2×3 = 4 − 6 = −2. A non-zero result means the matrix is invertible.
How does the rule of Sarrus work for a 3×3 matrix?
Copy the first two columns to the right, then add the three down-right diagonal products and subtract the three up-right ones: det = aei + bfg + cdh − ceg − bdi − afh. For [[2,0,1],[1,3,2],[1,1,1]] this gives 6 + 0 + 1 − 3 − 0 − 4 = 0 — a singular matrix. Sarrus works only for 3×3; larger matrices need cofactor expansion or elimination.
What does a determinant of zero mean?
The matrix is singular: its rows (or columns) are linearly dependent, it has no inverse, and as a transformation it flattens space — a 3×3 with det 0 squashes 3D volume onto a plane or line. For a system of equations, det 0 means no unique solution exists.
What does the sign of the determinant tell you?
Orientation. A positive determinant preserves orientation; a negative one flips it (like a reflection). The absolute value is the scaling factor: a 2×2 matrix with det −3 maps any region to one with 3 times the area, mirrored. That is why det appears in change-of-variable formulas in calculus.
How does the calculator compute 4×4 determinants?
By Gaussian elimination: row-reduce to upper-triangular form (tracking row swaps, each of which flips the sign), then multiply the diagonal. This takes ~n³ operations versus n! for cofactor expansion, and partial pivoting keeps floating-point errors tiny — the same method professional numerical libraries use.