The determinant is a single number that summarizes a square matrix: whether it can be inverted, how it stretches space, and whether a linear system built on it has a unique answer. This calculator computes it exactly for matrices up to 6 × 6 and explains the arithmetic with either cofactor expansion or row reduction.
How to use the determinant calculator
- Type the square matrix in the box, one row per line, entries separated by spaces or commas. Fractions such as 2/3 and decimals stay exact.
- Choose how the steps should be shown: Cofactor expansion or Row reduction.
- Read det(A) on the tape, together with whether the matrix is invertible, its trace and the determinant of its inverse.
The result is checked internally with the other method, so the two approaches always agree.
Determinant formulas
For a 2 × 2 matrix the rule is short:
For larger matrices, cofactor (Laplace) expansion along any row i gives
where Mij is the minor obtained by deleting row i and column j. The signs follow a checkerboard that starts with + in the top-left corner. Expanding along a row or column with many zeros saves work, so the calculator picks the line with the most zeros automatically.
Row reduction turns the matrix into upper-triangular form using row swaps and “add a multiple of another row” operations. The determinant is then the product of the diagonal entries, with the sign flipped once for each swap.
Worked example: a 3 × 3 determinant
Take the matrix with rows (2, −3, 1), (2, 0, −1) and (1, 4, 5). Row 2 contains a zero, so expand along it.
Entry a₂₁ = 2, sign (−1)3 = −: minor det [[−3, 1], [4, 5]] = −15 − 4 = −19, contribution −2 × (−19) = 38.
Entry a₂₂ = 0: contributes nothing.
Entry a₂₃ = −1, sign (−1)5 = −: minor det [[2, −3], [1, 4]] = 8 + 3 = 11, contribution −(−1) × 11 = 11.
Total: det A = 38 + 0 + 11 = 49.
The rule of Sarrus confirms it: (aei + bfg + cdh) − (ceg + afh + bdi) = (0 + 3 + 8) − (0 − 8 − 30) = 11 − (−38) = 49. Because 49 ≠ 0, the matrix is invertible and scales volumes by a factor of 49.
Properties worth knowing
| Property | Statement |
|---|---|
| Transpose | det(Aᵀ) = det(A) |
| Product | det(AB) = det(A) · det(B) |
| Inverse | det(A⁻¹) = 1 / det(A) |
| Scalar multiple | det(kA) = kⁿ det(A) for an n × n matrix |
| Triangular matrix | product of the diagonal entries |
| Two equal rows | determinant is 0 |
These rules explain several shortcuts. A matrix with a row of zeros has determinant 0. Multiplying a 3 × 3 matrix by 2 multiplies its determinant by 2³ = 8, not by 2.
Where determinants show up
- Solving systems. Cramer’s rule writes each unknown as a ratio of determinants, and a non-zero determinant guarantees exactly one solution. Try it in the system of linear equations calculator.
- Area and volume. Half the absolute determinant of two edge vectors gives a triangle’s area; the absolute determinant of three edge vectors gives a parallelepiped’s volume.
- Cross products. The cross product calculator uses a symbolic 3 × 3 determinant.
- Eigenvalues. They are the roots of det(A − λI) = 0.
To go one step further and actually undo the matrix, use the matrix inverse calculator; for sums and products of matrices, see the matrix calculator.
Frequently asked questions
What does a determinant of zero mean?
The matrix is singular. Its rows are linearly dependent, it has no inverse, and a system of equations with it as the coefficient matrix has either no solution or infinitely many.
Which method should I use for the steps?
Cofactor expansion is natural for 2 × 2 and 3 × 3 matrices and for any matrix with a row or column full of zeros. Row reduction is far more efficient for 4 × 4 and larger, and it is how computers actually evaluate determinants. Both give the same answer.
How do row operations change the determinant?
Swapping two rows flips 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 that operation is the workhorse of the row-reduction method.
What does the determinant mean geometrically?
Its absolute value is the factor by which the matrix scales area (2 × 2) or volume (3 × 3). A negative sign means the transformation also flips orientation, like a mirror.
Can a non-square matrix have a determinant?
No. Determinants are defined only for square matrices. For rectangular matrices, related ideas such as rank or singular values are used instead.