Math Solver Free

Determinant Calculator

Enter a 2×2 or 3×3 matrix and see the full cofactor expansion — not just the final number.

How This Determinant Calculator Works

The determinant calculator above takes a 2×2 or 3×3 matrix and computes its determinant the way you would by hand: for 2×2, the single subtraction ad − bc; for 3×3, the cofactor expansion along the first row — each entry multiplied by its 2×2 minor, with the checkerboard signs +, −, +. Every term is printed, and the expansion is cross-checked against the determinant computed by the underlying math library before the answer is shown, so what you read is the method and a verified result together.

Worked Example: A 3×3 Determinant

For the matrix [[1, 2, 3], [0, 1, 4], [5, 6, 0]] (the tool's starting example), expand along the first row: 1 × (1·0 − 4·6) − 2 × (0·0 − 4·5) + 3 × (0·6 − 1·5) = 1 × (−24) − 2 × (−20) + 3 × (−5) = −24 + 40 − 15 = 1. The three minors come from deleting the entry's row and column each time — the mechanical heart of the method, and the part worth practising until it is automatic.

What the Determinant Tells You

One number carries three facts. Scaling: the matrix multiplies areas (or volumes) by |det| — the diagonal matrix diag(2, 3, 5) has determinant 30 because it stretches the unit cube to volume 30. Orientation: a negative sign means the transformation flips space over, like a reflection. Singularity: determinant zero means the transformation crushes everything flat — no inverse exists, and the corresponding system of equations is degenerate. That third fact is why determinants gate so much of linear algebra: invertibility, unique solvability and independence of the rows are all the same statement as det ≠ 0. The standard treatment is OpenStax's Cramer's rule chapter, which puts determinants to work solving systems.

Worked Example: A 2×2 Determinant

For [[4, 7], [2, 6]] there is only one step: multiply the main diagonal (4 × 6 = 24), multiply the other diagonal (7 × 2 = 14), and subtract: 24 − 14 = 10. The order matters — it is always main diagonal minus anti-diagonal. Reversing it flips the sign, which is why [[4, 7], [2, 6]] gives +10 while the same matrix with its rows swapped gives −10: swapping two rows of a matrix always negates its determinant, a fact worth remembering when you rearrange a matrix before computing.

The Rule of Sarrus: A Second Way Through a 3×3

For 3×3 matrices there is a diagonal shortcut that many students find faster than cofactor expansion. Copy the first two columns to the right of the matrix, multiply along the three downward diagonals and add, then multiply along the three upward diagonals and subtract. Take [[2, 1, 3], [0, 4, 1], [5, 2, 1]]. Downward products: 2·4·1 = 8, 1·1·5 = 5, 3·0·2 = 0 — a total of 13. Upward products: 3·4·5 = 60, 2·1·2 = 4, 1·0·1 = 0 — a total of 64. The determinant is 13 − 64 = −51. Expanding the same matrix by cofactors gives 2·(4 − 2) − 1·(0 − 5) + 3·(0 − 20) = 4 + 5 − 60 = −51, so the two methods agree — running both is a reliable self-check on exam practice. One warning: Sarrus works only for 3×3. It does not generalize to 4×4, where cofactor expansion (or row reduction) is unavoidable.

Choosing Where to Expand: Let the Zeros Work

Cofactor expansion works along any row or column, and the smart choice is the line with the most zeros, because a zero entry deletes its entire term. For [[3, 0, 2], [1, 4, 0], [0, 5, 2]], expanding down the first column (entries 3, 1, 0) needs only two 2×2 minors: 3·(4·2 − 0·5) − 1·(0·2 − 2·5) + 0 = 3·8 − 1·(−10) = 24 + 10 = 34. Expanding along the first row instead would have forced three minors and more chances to slip. Before you compute any 3×3 determinant by hand, scan all six lines — three rows, three columns — and expand along the emptiest one. The calculator above always shows the first-row expansion, which makes it a good reference for the standard textbook method.

Determinant Properties Worth Knowing

  • A row or column of zeros makes the determinant zero immediately — no expansion needed.
  • Two equal or proportional rows also force zero: the matrix squeezes space flat in that direction.
  • Triangular matrices are free: if everything below (or above) the main diagonal is zero, the determinant is just the product of the diagonal entries. diag-style, [[2, 9, 4], [0, 3, 7], [0, 0, 5]] has determinant 2·3·5 = 30 regardless of the entries above the diagonal.
  • det(A·B) = det(A)·det(B), and det(A⁻¹) = 1/det(A) — which is another way to see why a zero determinant means no inverse.
  • Transposing changes nothing: det(Aᵀ) = det(A), so a fact about rows is always also a fact about columns.

Putting It to Work: Cramer's Rule in Miniature

The most direct classroom use of determinants is solving a small system. For 2x + y = 7 and x + 3y = 11, the coefficient determinant is D = 2·3 − 1·1 = 5. Replace the first column with the constants: Dx = 7·3 − 1·11 = 10, so x = Dx/D = 2. Replace the second column: Dy = 2·11 − 7·1 = 15, so y = Dy/D = 3. Check: 2·2 + 3 = 7 ✓ and 2 + 3·3 = 11 ✓. When D = 0 the method divides by zero — the algebraic shadow of the geometric fact that the two lines are parallel or identical. For systems bigger than 3×3, elimination beats Cramer's rule quickly, which is why the system of equations solver uses elimination with steps instead.

Three Determinant Traps

  1. The middle sign. The cofactor checkerboard starts + − + along the first row; forgetting the minus on the second term is the commonest 3×3 error — it flipped the example above from 1 to −39 in early drafts of student work everywhere.
  2. Expanding along a busy row. Any row or column works — choose the one with the most zeros; a zero entry deletes its whole term. The tool expands along the first row; by hand, shop around.
  3. Confusing determinant with the matrix itself. det(A + B) is not det(A) + det(B), and det(kA) for an n×n matrix is kⁿ·det(A), not k·det(A) — scalar multiplication scales every row.

Need the full matrix toolkit — multiplication, inverse, transpose? Use the matrix calculator. Solving a system whose determinant you just found? The system of equations solver takes it from there.

Frequently Asked Questions

How do you calculate the determinant of a 2x2 matrix?

For [[a, b], [c, d]] the determinant is ad − bc: multiply the main diagonal, multiply the other diagonal, and subtract. For [[2, 5], [1, 3]] that is 2·3 − 5·1 = 1.

How do you calculate the determinant of a 3x3 matrix?

Expand along the first row: each entry times the determinant of the 2x2 minor left after deleting its row and column, with signs +, −, +. For [[1, 2, 3], [0, 1, 4], [5, 6, 0]] the expansion is 1·(0 − 24) − 2·(0 − 20) + 3·(0 − 5) = −24 + 40 − 15 = 1.

What does a determinant of zero mean?

The matrix is singular: it flattens space into a lower dimension, has no inverse, and the system Ax = b either has no solution or infinitely many. Rows (or columns) that are multiples of each other always force the determinant to zero — check for that pattern before computing.

What does the determinant mean geometrically?

It is the factor by which the matrix scales areas (2D) or volumes (3D). A determinant of 3 triples every area; a negative determinant also flips orientation; zero collapses everything flat. That is why the determinant appears inside change-of-variables formulas for integrals.

What is the rule of Sarrus?

A diagonal shortcut for 3x3 determinants only: copy the first two columns beside the matrix, add the three downward diagonal products, and subtract the three upward ones. For [[2, 1, 3], [0, 4, 1], [5, 2, 1]] that gives (8 + 5 + 0) − (60 + 4 + 0) = −51. It does not work for 4x4 or larger matrices.

Can a determinant be negative?

Yes. The sign records orientation: a negative determinant means the transformation flips space over, like a mirror reflection, while the absolute value still gives the area or volume scaling factor. Swapping any two rows of a matrix flips the sign of its determinant.

How do I find the determinant of a 4x4 matrix?

Expand along the row or column with the most zeros: each entry multiplies the 3x3 determinant of its minor, with checkerboard signs. A 4x4 expansion has up to four 3x3 minors, so most students use row reduction instead — reduce to triangular form and multiply the diagonal, correcting the sign for every row swap. This calculator handles 2x2 and 3x3 matrices with full steps.

Is this determinant calculator free?

Yes — completely free, no sign-up, no limits. The expansion runs locally in your browser (powered by math.js) and the result is cross-checked against the library's determinant before it is shown.

Related Tools & Guides

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team