Audited 29 Jul 2026·Last updated 31 Jul 2026·5 citations·Tier 1·0 uses

Determinant Calculator

Free determinant calculator for any square matrix up to 8x8. Get det(A) exactly, the cofactor expansion written out, and a row-reduction cross-check.

Determinant Calculator

One row per line. Separate entries with commas or spaces.
Determinant det(A)
-3
The determinant of A, computed by a division-free cofactor expansion so that an integer matrix returns an exact integer. Displayed rounded to 10 decimal places.
Matrix size (n)
3
Absolute value |det(A)|
3
Singular or non-singular
Non-singular — the determinant is not zero, so this matrix is invertible and its columns are linearly independent.
Cofactor expansion along row 1
det = 1 x 2 + 2 x 2 + 3 x (-3) = -3
Independent row-reduction check
Row reduction with partial pivoting (2 row swaps) gives -3 — agrees with the cofactor expansion.

Background.

The determinant is a single number squeezed out of a square matrix, and it carries a surprising amount of information about what that matrix does. This calculator takes any square matrix from 1x1 up to 8x8, returns det(A), and shows you the cofactor expansion that produced it — then quietly recomputes the same number by a completely different algorithm and tells you whether the two agree.

Type or paste your matrix with one row per line. Entries can be separated by commas or by spaces, rows can be separated by line breaks or semicolons, and the bracketed form you get from copying out of most software — [[1,2],[3,4]] — is accepted too. Negative numbers, decimals and scientific notation all work.

What the answer means depends on which reading you want. Algebraically, the determinant is the invertibility test: a square matrix over a field has an inverse if and only if its determinant is not zero. That single fact is why the determinant turns up as a precondition in so many other procedures — Cramer's rule refuses to run when it is zero, the adjugate formula for the inverse divides by it, and a system of n equations in n unknowns has exactly one solution precisely when it is non-zero. Geometrically, the absolute value of the determinant is a volume: the parallelepiped spanned by the rows of A has volume |det(A)|, so a determinant of zero means those rows have collapsed into a lower-dimensional space and the matrix squashes volume down to nothing. The sign tells you whether the transformation preserves orientation or flips it, the way a mirror does.

The headline number here is computed without a single division. A naive recursive cofactor expansion costs O(n!) operations, which is why textbooks stop at 3x3; this calculator evaluates the same Laplace expansion by dynamic programming over subsets of columns, which costs O(2^n x n) instead — about two thousand operations at 8x8. Because that route uses only addition and multiplication, an integer matrix produces an exact integer answer no matter how badly conditioned it is. Every intermediate value is carried in 80 significant digits and rounded exactly once, at the end, to 10 decimal places.

That exactness matters more than it sounds. The usual fast way to get a determinant is Gaussian elimination — reduce the matrix to triangular form and multiply the pivots, adjusting the sign for each row swap. It is the right algorithm for large matrices, but it divides, and division is where floating-point error creeps in and where a determinant that should be exactly zero comes out as something like 1e-16 instead. Rather than pick one method and hope, this page runs both and prints the elimination result beside the exact one, along with the number of row interchanges it needed. If they ever disagree you will see it, which is the point.

One scope note that belongs next to the number rather than buried in an FAQ: the singular / non-singular verdict is decided on the determinant as displayed, after rounding to 10 decimal places. A determinant of 4e-11 is reported as singular; 6e-11 is reported as non-singular. Classifying the unrounded value instead would let the page print a hero result of 0 next to the words 'non-singular', which is worse than a boundary you can read. If your matrix genuinely lives at that scale, rescale it before trusting the label.

The calculator handles square matrices only — a determinant simply is not defined for a rectangular one, and the page will tell you so rather than inventing an answer. If your matrix is not square and you want to know how many independent rows it has, that question is answered by rank, not by a determinant. Complex entries and symbolic entries are out of scope.

What is determinant calculator?

The determinant of an n x n matrix A, written det(A) or |A|, is the signed sum over all n! permutations of products of entries, one from each row and column, with the sign of each term given by the parity of the permutation. In practice nobody evaluates it that way. The working definition is the Laplace (cofactor) expansion: pick any row i, and det(A) = sum over j of a_ij times C_ij, where the cofactor C_ij equals (-1)^(i+j) times M_ij, and the minor M_ij is the determinant of the smaller matrix you get by deleting row i and column j. Expanding along any row or any column gives the same answer, which is itself a non-obvious theorem. The determinant is the invertibility test for square matrices: A has an inverse if and only if det(A) is not zero, and det(A) = 0 exactly when the rows (equivalently the columns) are linearly dependent. Its absolute value is the volume scaling factor of the linear map A represents, and its sign records whether that map preserves or reverses orientation. Useful properties: det(A^T) = det(A); swapping two rows negates it; multiplying one row by a scalar k multiplies it by k; adding a multiple of one row to another leaves it unchanged; det(AB) = det(A)det(B); and for a triangular matrix it is simply the product of the diagonal entries.

How to use this calculator.

  1. Type your square matrix into the box, one row per line, with entries separated by commas or spaces.
  2. You can also paste the bracketed form [[1,2,3],[4,5,6],[7,8,10]] or use semicolons as row separators — both are parsed.
  3. The matrix must be square. If it is not, the calculator says so instead of returning a number, because a determinant is undefined for a rectangular matrix.
  4. Read the headline number: that is det(A), computed without any division and therefore exact for integer input.
  5. Check the singular / non-singular verdict. Non-singular means the matrix is invertible and its rows are linearly independent; singular means it is not invertible and the rows are dependent.
  6. Read the cofactor expansion line to see the working: each first-row entry multiplied by its own cofactor, summed.
  7. Read the row-reduction line for an independent confirmation by Gaussian elimination, including how many row interchanges it needed and whether the two methods agree.
  8. Matrices larger than 8 x 8 are out of scope — for those, use a numerical library where an LU factorisation is the right tool.

The formula.

det A = Σⱼ aᵢⱼ · Cᵢⱼ , Cᵢⱼ = (−1)^(i+j) · Mᵢⱼ

The Laplace expansion says that for any fixed row i, det(A) = Σⱼ aᵢⱼ·Cᵢⱼ, where Cᵢⱼ = (−1)^(i+j)·Mᵢⱼ and Mᵢⱼ is the minor: the determinant of the (n−1)x(n−1) matrix left after deleting row i and column j. The (−1)^(i+j) factor is the familiar checkerboard of plus and minus signs starting with + in the top-left corner. Expanding along row 1 of the worked example A = [[1,2,3],[4,5,6],[7,8,10]] gives minors M11 = 5·10 − 6·8 = 2, M12 = 4·10 − 6·7 = −2 and M13 = 4·8 − 5·7 = −3; attaching the signs turns those into cofactors C11 = +2, C12 = +2 and C13 = −3, so det(A) = 1·2 + 2·2 + 3·(−3) = 2 + 4 − 9 = −3. Evaluating that recursion naively costs O(n!) operations, so this calculator computes the same expansion by dynamic programming over subsets of columns instead: f[S] is the determinant of the submatrix built from the first |S| rows and the columns in S, expanded along its own last row, which brings the cost down to O(2ⁿ·n) — roughly two thousand operations at 8x8. Crucially that route uses only addition and multiplication, never division, so for an integer matrix the result is exact. Rounding happens once and only once, at the very end, to 10 decimal places; every intermediate value is carried at 80 significant digits. The second, independent route is Gaussian elimination with partial pivoting: reduce A to upper-triangular form, multiply the pivots, and multiply by (−1)^s where s is the number of row interchanges. On the worked example pivoting picks 7 first, so the rows are swapped twice, the pivots come out as 7, 6/7 and −1/2, and their product 7 · 6/7 · (−1/2) = −3 with an even number of swaps confirms det(A) = −3. Both results are shown on the page.

A worked example.

Example

Take A = [[1, 2, 3], [4, 5, 6], [7, 8, 10]]. Expanding along the first row needs the three first-row minors: M11 is the determinant of [[5,6],[8,10]] = 50 − 48 = 2; M12 is the determinant of [[4,6],[7,10]] = 40 − 42 = −2; and M13 is the determinant of [[4,5],[7,8]] = 32 − 35 = −3. The checkerboard signs turn these into cofactors C11 = +2, C12 = −(−2) = +2 and C13 = +(−3) = −3, so the calculator prints the expansion as det = 1 x 2 + 2 x 2 + 3 x (-3), which sums to 2 + 4 − 9 = −3. The determinant output is therefore −3, its absolute value is 3, and the matrix size is 3. Because −3 is not zero the verdict is non-singular: A is invertible and its three rows are linearly independent. Geometrically, |det(A)| = 3 says the parallelepiped spanned by the rows (1,2,3), (4,5,6) and (7,8,10) has volume 3 — a thin sliver, because those three vectors are close to lying in a common plane, which is exactly what a small determinant relative to the size of the entries indicates. The independent check confirms it: Gaussian elimination with partial pivoting moves the 7 to the top, performs two row interchanges in total, produces pivots 7, 6/7 and −1/2 whose product is −3, and since two swaps is an even number the sign is unchanged. Both methods return −3, so the page reports that row reduction agrees with the cofactor expansion.

matrix1, 2, 3 4, 5, 6 7, 8, 10

Frequently asked questions.

How do you find the determinant of a 3x3 matrix by hand?
Expand along the first row. For A = [[a,b,c],[d,e,f],[g,h,i]] the determinant is a(ei − fh) − b(di − fg) + c(dh − eg). Each bracket is a 2x2 minor: the determinant of what is left after you cross out the row and the column of the entry in front of it. The alternating plus, minus, plus in front of a, b and c is the (−1)^(i+j) checkerboard sign. You can expand along any row or any column and get the same number, so it pays to pick the row or column with the most zeros in it — every zero entry kills a whole 2x2 evaluation.
What does it mean when the determinant is zero?
The matrix is singular: it has no inverse, its rows (and its columns) are linearly dependent, and the system Ax = b either has no solution or infinitely many rather than exactly one. Geometrically the linear map collapses space into a lower dimension — a 3x3 matrix with determinant zero flattens three-dimensional space onto a plane, a line, or a point, and volume goes to zero. It also means the matrix has at least one eigenvalue equal to zero, and that its rank is less than n.
Can a non-square matrix have a determinant?
No. The determinant is defined only for square matrices, and this calculator returns an error rather than a number if you enter a rectangular one. The reason is structural rather than a missing convention: the cofactor expansion deletes one row and one column at each step, so it only terminates sensibly when the two counts match, and the properties that make the determinant useful (det(AB) = det(A)det(B), invertibility, volume scaling) all presuppose a map from a space to itself. If your matrix is rectangular, the questions you probably want are its rank, or the singular values of A, not a determinant.
Why does this calculator show two different methods?
Because they fail in different ways, and showing both is cheap insurance. The headline number comes from a cofactor expansion evaluated with no division at all, which makes it exact for integer input regardless of how badly conditioned the matrix is. The cross-check comes from Gaussian elimination with partial pivoting, which is the algorithm every numerical library actually uses — but it divides, and division is where floating-point error enters and where a determinant that should be exactly zero comes out as 1e-16. If the two ever disagree by more than the display tolerance, the page says so instead of hiding it.
What is the largest matrix this handles?
8x8. The dynamic-programming Laplace expansion costs O(2^n x n) operations, so 8x8 is about two thousand exact Decimal operations — instant. Going much further would be both slow and pointless: beyond that size nobody computes a determinant directly. Numerical libraries factor the matrix (LU or QR) and either multiply the diagonal or, more often, avoid the determinant entirely, because for a large matrix the determinant overflows or underflows floating point long before it tells you anything useful about conditioning. Use the log-determinant or the condition number instead.
Does the order of the rows change the determinant?
Swapping any two rows multiplies the determinant by −1, so the answer changes sign with every interchange but keeps its absolute value. That is why the row-reduction method has to count its swaps: det(A) = (−1)^s times the product of the pivots, where s is the number of interchanges partial pivoting performed. Two other row operations behave differently — multiplying a row by k multiplies the determinant by k, and adding a multiple of one row to another leaves it completely unchanged, which is what makes elimination a valid way to compute it at all.
How is the determinant related to the inverse of a matrix?
Directly: A⁻¹ = (1/det A) · adj(A), where adj(A) is the adjugate — the transpose of the matrix of cofactors. That formula makes the role of the determinant obvious, because you cannot divide by zero, which is precisely why a singular matrix has no inverse. The same identity is behind Cramer's rule for solving Ax = b. For anything bigger than 3x3 the adjugate formula is far too slow to use in practice, but it is the reason the determinant appears in so many theoretical statements.
Is the determinant the same as the trace or the rank?
No, they are three different scalars that answer three different questions. The trace is the sum of the diagonal entries and equals the sum of the eigenvalues; the determinant equals the product of the eigenvalues; and the rank counts how many rows are linearly independent. They interact — a square matrix has full rank exactly when its determinant is non-zero — but only the rank is defined for a rectangular matrix, and only the determinant tells you about volume and orientation. If you want the sum of the diagonal use the trace calculator, and if your matrix is not square use the rank calculator.
Does rounding affect the singular / non-singular verdict?
Yes, deliberately, and the page is explicit about it. The verdict is decided on the determinant after it has been rounded to the 10 decimal places you see displayed, so 4e-11 is reported as singular and 6e-11 as non-singular. The alternative — classifying the unrounded value — would let the calculator show a hero result of 0 next to the word 'non-singular', which is a worse failure than a documented boundary. For integer matrices this never bites, because the exact division-free expansion returns an exact integer and zero is genuinely zero.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 977 calculators remain free
  • No billing is enabled
Coming soon