🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
LINEAR ALGEBRA

Determinant Calculator — 2x2, 3x3 and 4x4 matrices

Enter a square matrix and get its determinant with the cofactor expansion written out term by term, not just the final number.

Only a square matrix has a determinant. Rows and columns beyond the chosen size are hidden and ignored.
Decimals and negative numbers are accepted. Empty cells are read as zero.
Determinant
0
 
0
Trace (sum of the diagonal)
0
Volume scale factor
Invertible?
Orientation
Tip: a determinant of exactly zero means the rows are linearly dependent — one row is a combination of the others — and the matrix has no inverse.
Advertisement

The determinant of a square matrix is a single number that captures how the matrix stretches, squashes or flips the space it acts on. This calculator computes it for 2x2, 3x3 and 4x4 matrices and prints the cofactor expansion alongside the answer, so you can see which minor produced which term rather than being handed a bare result to trust.

Arb Digital added linear algebra to the free tools library because the determinant sits underneath so much applied work: solving simultaneous equations, checking whether a transformation can be undone, computing eigenvalues, and changing variables in a multiple integral. It is also one of the few calculations where the intermediate steps are more instructive than the answer, which is why the working is shown by default here rather than hidden behind a toggle.

What This Determinant Calculator Does

It evaluates the determinant exactly for the size you select, using the direct formula for 2x2 and cofactor expansion along the first row for 3x3 and 4x4. Every term of that expansion is printed with its sign, its coefficient and the minor it came from. Alongside the number, the calculator reports the trace, the absolute value of the determinant as a volume scale factor, whether the matrix is invertible, and whether the transformation preserves or reverses orientation.

This page is deliberately narrow: it does one operation and explains it thoroughly. Adding, multiplying or transposing matrices belongs on our matrix calculator, and finding the inverse itself belongs on the matrix inverse calculator — this page tells you whether that inverse exists at all, which is the question to answer first.

How to Use It

  1. Choose the size. 2x2, 3x3 or 4x4. Only square matrices have determinants, so there is no separate row and column setting.
  2. Type the entries row by row. Each input line is one row of the matrix, read left to right exactly as it is written on paper.
  3. Read the determinant. The headline number is the exact value, rounded only for display.
  4. Check the expansion below it. Each term shows the entry, its sign and the minor, which is what you would write out by hand.
  5. Look at the invertibility flag. A determinant of zero means singular, and every downstream calculation that needs an inverse will fail.

The Formula and How It's Calculated

For a 2x2 matrix with entries a, b on the top row and c, d on the bottom, the determinant is ad − bc. That is the whole rule, and every larger case reduces to repeated applications of it.

For a 3x3 matrix the determinant is the cofactor expansion along the first row: det = a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃, where each M is the 2x2 determinant of the matrix left after deleting that entry's row and column. The alternating signs come from the checkerboard pattern of cofactor signs, which is (−1) raised to the power of the row plus column index.

Take the default matrix: rows (2, −3, 1), (2, 0, −1) and (1, 4, 5). The first minor deletes row 1 and column 1, leaving (0, −1; 4, 5) with determinant 0×5 − (−1)×4 = 4, contributing 2 × 4 = 8. The second minor leaves (2, −1; 1, 5) with determinant 11, and because the sign is negative and the entry is −3, it contributes +33. The third minor leaves (2, 0; 1, 4) with determinant 8, contributing 1 × 8 = 8. The total is 8 + 33 + 8 = 49, which is what the calculator shows. Wolfram MathWorld's determinant entry sets out the general Laplace expansion this follows.

Advertisement

What the Determinant Actually Means Geometrically

Treat the rows of the matrix as vectors. For a 2x2 matrix, the determinant is the signed area of the parallelogram those two vectors span. For 3x3 it is the signed volume of the parallelepiped spanned by three vectors. The scaling reading follows immediately: apply the matrix as a transformation to any region, and its area or volume is multiplied by the absolute value of the determinant.

A determinant of 2 doubles areas. A determinant of 0.5 halves them. A determinant of 0 collapses the space onto a line or a point, destroying a dimension — which is precisely why the transformation cannot be undone and the matrix has no inverse. The sign carries the second half of the meaning: a negative determinant means the transformation reverses orientation, turning a clockwise arrangement into an anticlockwise one, the way a mirror does. This is why the calculator reports orientation as its own grid item rather than throwing the sign away.

Why a Zero Determinant Is the Result That Matters Most

Most of the time you are not really asking for a determinant; you are asking whether one exists that is not zero. A zero determinant says the rows are linearly dependent — at least one row can be written as a combination of the others — and that has consequences everywhere downstream. The matrix has no inverse. A system of equations with that coefficient matrix has either no solution or infinitely many, never exactly one. At least one eigenvalue is zero.

In floating-point arithmetic the honest version of this test is not "is the determinant zero" but "is it small relative to the size of the entries". A matrix scaled up by 100 has its 3x3 determinant scaled by a million, so raw magnitude means nothing on its own. A determinant of 0.0001 on a matrix of entries near 1 is far more suspicious than a determinant of 1,000 on a matrix of entries near 100. When you need to know whether a system is genuinely solvable, our system of equations calculator will tell you directly rather than asking you to infer it from a threshold.

Properties Worth Knowing Before You Compute Anything

Several rules let you get the answer without doing the full expansion. The determinant of a triangular matrix — one where every entry above or below the diagonal is zero — is just the product of the diagonal entries. Swapping two rows flips the sign. Multiplying one row by a constant multiplies the determinant by that same constant, which means scaling a whole 3x3 matrix by k multiplies its determinant by k³. Adding a multiple of one row to another leaves the determinant completely unchanged, which is what makes row reduction a valid way to compute it.

Two more are used constantly. The determinant of a product equals the product of the determinants, so det(AB) = det(A)det(B) always. And the determinant of a transpose equals the determinant of the original, which is why you can expand along a column just as legitimately as along a row. That last property is worth exploiting: if a matrix has a row or column containing mostly zeros, expand along it and most terms vanish before you compute their minors. MIT OpenCourseWare's 18.06 Linear Algebra course derives these properties from a short list of axioms rather than presenting them as tricks.

Cofactor Expansion Versus Row Reduction

Cofactor expansion is the method taught first and shown by this page, because every term is visible and the structure is clear. It is also the wrong method for anything large. Expanding an n×n determinant this way costs roughly n factorial operations: a 4x4 needs 24 basic products, a 10x10 needs over three million, and a 20x20 is beyond any computer running term by term.

Row reduction to triangular form and then multiplying the diagonal costs about n³ operations instead — for a 20x20 matrix that is thousands of operations rather than quintillions. Every numerical library uses this route, usually through an LU decomposition. For the sizes on this page the difference is irrelevant and the expansion is more useful pedagogically, which is why it is what gets printed. It is worth knowing that the method you learn by hand is not the method any real software uses, and that the two agree exactly on the answer.

Where Determinants Show Up in Practice

Cramer's rule solves a linear system using one determinant per unknown, which is elegant for 2x2 and 3x3 and hopeless beyond it. The Jacobian determinant is the correction factor when you change variables in a multiple integral — it is exactly the local volume scaling this page measures, computed at each point. In computer graphics the determinant of a transformation matrix tells you whether a triangle has been flipped away from the camera, which is how backface culling decides what not to draw.

The application that matters most for the rest of this tool set is eigenvalues. Finding them means solving det(A − λI) = 0, a polynomial equation in λ built entirely from determinants of modified copies of the matrix. Our eigenvalue calculator does exactly that and prints the characteristic polynomial it solved, and everything it does rests on the operation this page performs. If you need to work with the individual vectors themselves rather than the whole matrix, the vector calculator handles dot and cross products.

Building something that needs the maths done properly?

Arb Digital builds analytics and data tooling where the underlying calculations are shown, checked and reproducible.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Forgetting the alternating signs — the middle term of a 3x3 first-row expansion is subtracted, and dropping that minus sign is the single most common arithmetic error in the whole operation.
  • Applying the diagonal shortcut to 4x4 — the Rule of Sarrus works only for 3x3 matrices and gives a wrong answer for any larger size.
  • Assuming det(A + B) equals det(A) + det(B) — determinants multiply across products but do not add across sums.
  • Scaling a whole matrix and expecting the determinant to scale by the same factor — doubling every entry of a 3x3 multiplies its determinant by eight, not by two.
  • Treating a very small determinant as safely non-zero — magnitude only means something relative to the size of the entries, so rescale before you judge.

Related Free Tools From Arb Digital

Add, multiply or transpose matrices with the matrix calculator, invert one with the matrix inverse calculator, find eigenvalues with the eigenvalue calculator, solve simultaneous equations with the system of equations calculator, or handle roots of a polynomial with the quadratic equation solver. The free online tools hub lists every maths calculator we publish.

Frequently Asked Questions

What is the determinant of a matrix?

It is a single number computed from a square matrix that measures how the matrix scales area or volume, and whose sign records whether the transformation reverses orientation.

What does a determinant of zero mean?

The rows are linearly dependent, the matrix is singular, and no inverse exists. A system of equations built on that matrix has either no solution or infinitely many.

How do you find the determinant of a 3x3 matrix by hand?

Expand along the first row: multiply each entry by the determinant of the 2x2 matrix left after deleting its row and column, then add the first term, subtract the second and add the third.

Can a non-square matrix have a determinant?

No. The determinant is defined only for square matrices, because it describes a transformation from a space back into a space of the same dimension.

Does the determinant change if I swap two rows?

Yes, the sign flips while the magnitude stays the same. Swapping two rows twice returns the determinant to its original value.

Why is cofactor expansion not used for large matrices?

Its cost grows like the factorial of the matrix size. Software uses row reduction or an LU decomposition instead, which costs roughly the cube of the size and gives an identical answer.

Is the determinant of a transpose the same?

Yes, always. That is why expanding along a column is just as valid as expanding along a row, and why you should pick whichever line contains the most zeros.

This page explains a mathematical calculation for educational purposes only, and results should be checked independently before being relied on in engineering or academic work.

Advertisement
Advertisement

Take it further