Matrix Determinant Calculator (2×2 to 10×10, exact fractions, with steps)
Find the exact determinant of a square matrix from 2×2 up to 10×10. Enter integers, decimals or fractions; see cofactor (Laplace) expansion, the rule of Sarrus or Gaussian elimination step by step, plus rank, trace and invertibility.
How it works
2×2: det[a, b; c, d] = ad − bc · 3×3 (rule of Sarrus): det = aei + bfg + cdh − ceg − afh − bdi · n×n (Laplace): det A = Σⱼ (−1)^(1+j) · a₁ⱼ · det M₁ⱼ · Gaussian elimination: det A = (−1)^(row swaps) × product of the pivots
The determinant is a single number computed from a square matrix. Its absolute value is the factor by which the matrix scales area (2×2) or volume (3×3 and up), and its sign tells whether the transformation flips orientation. A determinant of zero means the rows are linearly dependent: the matrix collapses space into a lower dimension, has no inverse, and a linear system with it has no unique solution. For a 2×2 matrix the determinant is ad − bc. For larger matrices the Laplace (cofactor) expansion multiplies each entry of the first row by the determinant of the minor left when its row and column are removed, with alternating signs, and adds the results; for a 3×3 the rule of Sarrus gives the same value. Cofactor expansion takes about n! operations, so for 4×4 and larger the calculator uses Gaussian elimination: it adds multiples of rows to other rows (which leaves the determinant unchanged), swaps rows when needed (each swap flips the sign), and multiplies the pivots on the diagonal of the resulting triangular matrix. All arithmetic is exact. Decimals such as 0.25 are read as fractions (1/4), so the determinant is shown as an integer or a reduced fraction with no rounding error, plus its decimal value. The rank, trace and the determinant of the inverse (1 ÷ det) are shown too.
Worked example
For the default matrix [1, 2, 3; 4, 5, 6; 7, 8, 10], expand along the first row: det = 1 × det[5, 6; 8, 10] − 2 × det[4, 6; 7, 10] + 3 × det[4, 5; 7, 8] = 1 × 2 − 2 × (−2) + 3 × (−3) = 2 + 4 − 9 = −3. The rule of Sarrus agrees: (50 + 84 + 96) − (105 + 48 + 80) = 230 − 233 = −3. Since −3 ≠ 0 the matrix is invertible, its rank is 3, its trace is 1 + 5 + 10 = 16 and the determinant of its inverse is −1/3.
Sources: Wikipedia: Determinant (Laplace expansion, Gaussian elimination, rule of Sarrus) · Math is Fun: Determinant of a Matrix (worked 2×2 and 3×3 examples) · Matrixcalc.org: determinant calculator (methods compared) · Calculator.net: Matrix calculator
Frequently asked questions
How do you find the determinant of a 2×2 matrix?
Multiply the main diagonal and subtract the product of the other diagonal: det = ad − bc. For [3, 8; 4, 6] that is 3 × 6 − 8 × 4 = 18 − 32 = −14.
How is a 3×3 determinant computed?
Expand along a row: multiply each entry of the top row by the 2×2 determinant left when its row and column are deleted, alternate the signs + − +, and add. For [6, 1, 1; 4, −2, 5; 2, 8, 7] this gives 6 × (−54) − 1 × 18 + 1 × 36 = −306. The rule of Sarrus is a shortcut that gives the same answer for 3×3 only.
What does a determinant of zero mean?
The matrix is singular: at least one row (or column) is a combination of the others, so the matrix flattens space and has no inverse. A system of linear equations with that coefficient matrix has either no solution or infinitely many.
What happens to the determinant when you swap rows or multiply a row?
Swapping two rows changes the sign. Multiplying a row by k multiplies the determinant by k. Adding a multiple of one row to another leaves it unchanged, which is why Gaussian elimination is a fast way to compute it.
Does the matrix have to be square?
Yes. The determinant is only defined for square matrices, with as many rows as columns. A 2×3 matrix has no determinant.
Can I enter fractions or decimals?
Yes. Enter entries such as 1/2, -3/4 or 0.25. The calculator converts them to exact fractions, so a matrix of fractions gives an exact fractional determinant such as 7/12, along with its decimal value.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.