Type your matrix above, open the Advanced tab and press det(A). The answer appears immediately; opening the step-by-step panel shows how it was reached, and lets you switch between four different methods for the same matrix — useful when your class was taught one of them in particular. Everything below explains what the number means and how each of those methods works, so you can reproduce the result by hand.
What the determinant tells you
It is a single number, defined only for square matrices, and its most important job is answering one question: is this matrix invertible? If the determinant is zero the matrix is singular — its rows are linearly dependent, it has no inverse, and a system built on it has either no solution or infinitely many. Any non-zero value means the matrix is invertible.
Geometrically it is the factor by which the transformation scales area in 2D or volume in 3D. A determinant of −2 doubles areas and flips orientation; a determinant of 0 flattens space onto a line or a point, which is precisely why the operation cannot be undone. The sign is not an error to be discarded: it records whether the transformation preserves handedness or mirrors it.
The 2×2 formula
For a 2×2 matrix the determinant is the product of the main diagonal minus the product of the anti-diagonal:
| a | b |
| c | d |
So for [[1, 2], [3, 4]] the determinant is 1·4 − 2·3 = −2. The vertical bars are standard notation for the determinant — they are not absolute value, and the result is very often negative.
The rule of Sarrus (3×3 only)
For 3×3 matrices, copy the first two columns to the right of the matrix, then add the three products running down-right and subtract the three running down-left. On the matrix loaded above:
| 2 | 1 | 3 |
| 0 | 4 | 1 |
| 5 | 2 | 0 |
Sarrus is fast and easy to remember, but it only works for 3×3. There is no 4×4 version of it, and inventing one is among the most common mistakes in a first linear algebra exam. Past 3×3 you need cofactor expansion or elimination.
Laplace (cofactor) expansion
Pick any row or column, and write the determinant as a sum of entries times their cofactors. The cofactor C(i,j) is (−1)^(i+j) times the minor — the determinant of the matrix with row i and column j deleted.
Cofactor expansion works for any size, and it is the method to choose by hand when a row or column is mostly zeros: every zero entry kills an entire minor before you compute it. Its cost grows like n!, though, so it is hopeless for large matrices. A 20×20 determinant by cofactors would need more operations than there are atoms in a person.
Gaussian elimination
This is what a computer does, and what this calculator does from 4×4 upward. Reduce the matrix to upper triangular form with elementary row operations, then multiply the diagonal. Three rules keep the bookkeeping honest:
- 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 — this is the workhorse, and the reason elimination is cheap.
The cost is about n³/3 operations instead of n!. The same factorisation that produces the answer is LU decomposition, so if you need the determinant and the factors together, one elimination gives you both.
Montante’s method
Also called the Bareiss algorithm, or fraction-free elimination. It runs the same elimination as above, but after each stage every entry is divided by the previous pivot. That division always comes out exact, so a matrix of integers stays a matrix of integers from start to finish — no fractions appear at any point, and the last pivot is the determinant itself.
By hand this is the method that keeps the arithmetic clean on an integer matrix, since you never carry a denominator. It is also the one to use when the entries are exact and you want the answer to be exact too. Pick it in the step-by-step panel to see the same matrix worked through without a single fraction.
Properties worth memorising
det(Aᵀ) = det(A)— anything true of the rows is true of the columnsdet(A·B) = det(A)·det(B)det(A⁻¹) = 1 / det(A)det(k·A) = kⁿ·det(A)for an n×n matrix — the scalar hits every one of the n rows- A triangular matrix has determinant equal to the product of its diagonal
- The determinant is the product of the eigenvalues, just as the trace is their sum
Common mistakes
- Using Sarrus on a 4×4. There is no 4×4 version of the rule. Use elimination or cofactor expansion.
- Reading the bars as absolute value.
|A|is standard notation for the determinant, and it is very often negative. - Forgetting the sign on a row swap. Every swap during elimination multiplies the determinant by −1.
- Expecting
det(A + B) = det(A) + det(B). That is false. Determinants multiply, they do not add. - Taking the determinant of a rectangular matrix. It is undefined. For a non-square matrix you almost certainly want the rank instead.