Matrix Determinant Calculator
Calculate the determinant of a 2x2 or 3x3 matrix
About This Tool
You're solving a 3x3 system of equations by Cramer's rule, or sanity-checking a homework answer, and you'd rather not expand the determinant by minors on paper for the third time tonight. The 2x2 case is simple — ad minus bc — but the 3x3 expansion involves six terms with sign-alternating coefficients and that's where transcription errors creep in.
Fill in the matrix entries. The 2x2 uses the direct formula. The 3x3 uses Sarrus' rule (the diagonal trick) which is mathematically equivalent to cofactor expansion but easier to transcribe correctly. The output also tells you whether the matrix is singular (determinant zero), which has interesting consequences: a singular matrix can't be inverted, which means whatever linear system you're trying to solve either has no solution or infinitely many.
The formula for a 2x2 matrix [[a, b], [c, d]] is det = ad − bc. The 3x3 formula via Sarrus' rule is det = a(ei − fh) − b(di − fg) + c(dh − eg) for matrix [[a,b,c],[d,e,f],[g,h,i]]. Geometrically, the determinant of a 2x2 matrix is the signed area of the parallelogram its rows span; for 3x3 it's the signed volume of the parallelepiped. Negative determinants indicate orientation reversal (a reflection in the linear transformation). Determinant zero means the rows are linearly dependent — they collapse to a lower dimension, which is why the matrix is non-invertible.
A worked example: matrix [[2, 3, 1], [4, 1, 2], [1, 5, 3]]. Apply the formula: 2(1·3 − 2·5) − 3(4·3 − 2·1) + 1(4·5 − 1·1). Compute each term: 2(3 − 10) − 3(12 − 2) + 1(20 − 1) = 2(−7) − 3(10) + 1(19) = −14 − 30 + 19 = −25. So the determinant is −25. The matrix is non-singular (determinant ≠ 0), which means it has an inverse and the linear system Ax = b has a unique solution for any b. The negative sign means the linear transformation flips orientation. Useful sanity check: if you compute a determinant by hand and the calculator disagrees, the calculator is almost certainly right and you flipped a sign somewhere in cofactor expansion.
Where this calculator stops being useful: anything bigger than 3x3. Larger matrices need cofactor expansion (which gets tedious fast — a 4x4 has 24 terms), LU decomposition, or row reduction. SymPy, NumPy, or Wolfram Alpha handle large matrices cleanly. For practical engineering and machine-learning work, you almost never compute determinants by hand at scale; you call a library function. The hand-calculation use case is mainly for understanding the math (linear algebra coursework) or for sanity-checking a small system. Sarrus' rule famously does not generalize past 3x3 — students sometimes try to extend the diagonal trick to 4x4 and get wrong answers. For larger matrices, fall back to cofactor expansion or numerical methods.
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.