Enter a square matrix up to 8 × 8 and get its determinant as an exact fraction. Choose row reduction, cofactor (Laplace) expansion along any row or column, or the rule of Sarrus for 3 × 3, and follow every step.
Last updated:
Matrix A
Entries can be integers, decimals or fractions like 2/3. Empty cells count as 0.
det(A) ≠ 0 means A is invertible; det(A) = 0 means its rows are linearly dependent.
Determinant
Step by step
Advertisement
Advertisement
How to use the Determinant Calculator
Choose the size of the square matrix.
Type the entries or paste rows; Random and Identity fill the grid for practice.
Pick a method: row reduction, cofactor expansion (choose the row or column, or Auto) or the rule of Sarrus.
Press Calculate determinant. The result updates automatically as you edit.
Read the steps and copy the value or the LaTeX.
Determinant formulas by size
Size
Formula or method
Work involved
2 × 2
det [[a, b], [c, d]] = ad − bc
2 products
3 × 3
Rule of Sarrus or expansion into three 2 × 2 minors
6 triple products
4 × 4
Expansion into four 3 × 3 minors, or row reduction
24 terms by expansion
n × n
Row reduce to triangular form; multiply the diagonal
About n³/3 operations (n! terms by expansion)
Worked example (the default matrix)
For A = [[3, 1, −2], [2, 0, 5], [−1, 4, 2]], column 2 and row 2 each contain a zero. Expanding along row 1:
det = 3·(0·2 − 5·4) − 1·(2·2 − 5·(−1)) + (−2)·(2·4 − 0·(−1)) = 3·(−20) − 1·9 − 2·8 = −60 − 9 − 16 = −85. Because −85 ≠ 0, A is invertible.
Useful properties
det(AB) = det(A)·det(B) and det(Aᵀ) = det(A).
det(kA) = kⁿ·det(A) for an n × n matrix.
det(A⁻¹) = 1/det(A).
A triangular or diagonal matrix has determinant equal to the product of its diagonal entries.
Two equal rows, a zero row, or one row a multiple of another all give det = 0.
Cramer's rule solves Ax = b as xᵢ = det(Aᵢ)/det(A), where Aᵢ has column i replaced by b.
Frequently asked questions
How do you calculate a 3×3 determinant?
Expand along a row: det = a₁₁(a₂₂a₃₃ − a₂₃a₃₂) − a₁₂(a₂₁a₃₃ − a₂₃a₃₁) + a₁₃(a₂₁a₃₂ − a₂₂a₃₁). Equivalently use the rule of Sarrus: add the three products along the down-right diagonals and subtract the three products along the up-right diagonals.
What is cofactor (Laplace) expansion?
Choose any row or column. For each entry aᵢⱼ multiply it by its cofactor (−1)^(i+j)·Mᵢⱼ, where the minor Mᵢⱼ is the determinant of the matrix with row i and column j removed, and add the results. Expanding along a row or column with many zeros saves work, which is what the Auto option does.
Why is row reduction faster for big matrices?
Cofactor expansion of an n × n matrix needs about n! multiplications (40,320 terms for 8 × 8), while Gaussian elimination needs roughly n³/3. Row reduction turns the matrix into triangular form, whose determinant is just the product of the diagonal entries, adjusted for row swaps.
How do row operations change the determinant?
Swapping two rows multiplies the determinant by −1. Multiplying a row by k multiplies the determinant by k. Adding a multiple of one row to another leaves the determinant unchanged. The calculator only uses swaps and the third operation, so it just counts swaps.
What does a determinant of zero mean?
The matrix is singular: it has no inverse, its rows and columns are linearly dependent, and the linear system Ax = b has either no solution or infinitely many. Geometrically, the transformation squashes space into a lower dimension, so areas or volumes become 0.
What does the determinant mean geometrically?
Its absolute value is the factor by which the matrix scales area (2 × 2) or volume (3 × 3 and higher). The sign tells whether orientation is preserved (positive) or reversed, as in a reflection (negative).
Can the Rule of Sarrus be used for 4×4 matrices?
No. The diagonal shortcut only works for 3 × 3 matrices. For 4 × 4 and larger use cofactor expansion or row reduction; applying the diagonal pattern to a 4 × 4 matrix gives a wrong answer.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.