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
- 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.
- 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.
- 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.