Skip to content

Matrix Determinant Calculator (2×2, 3×3, 4×4 and up, with Steps)

Determinant of any square matrix up to 8×8, with the working.

Inputs

Determinant
1

Use this calculator on your own site

Free embed

  • Two lines of HTML, unlimited views
  • Shows a small CalculateEveryday bar, with a credit link under the calculator

Matrix Determinant formula

2×2: det = ad − bc · n×n: det A = a₁₁·M₁₁ − a₁₂·M₁₂ + a₁₃·M₁₃ − … (expansion about row 1, where M₁ⱼ is the determinant of A with row 1 and column j removed)

det⁡A=∑j=1n(−1)1+j a1j det⁡(A1j)\det A = \sum_{j=1}^{n} (-1)^{1+j}\, a_{1j}\, \det(A_{1j})

For a 2×2 matrix the determinant is the product of the main diagonal minus the product of the other diagonal: ad − bc. For anything bigger, take each entry of the first row in turn, cross out its row and column, find the determinant of what is left (the minor), multiply the two, and add the terms with alternating signs: plus, minus, plus, minus. A 3×3 becomes three 2×2 determinants; a 4×4 becomes four 3×3s, each of which becomes three 2×2s. The same answer comes from expanding about any row or column (Theorem DER), which is why a row full of zeros makes the work short — and makes the determinant zero. Geometrically the determinant is the factor by which the matrix scales area (2×2) or volume (3×3), with a negative sign when it flips orientation; a determinant of zero means the matrix squashes space flat, so it has no inverse and a system of equations built from it has no unique solution.

Matrix Determinant worked example

For [[1, 2, 3], [0, 1, 4], [5, 6, 0]], expand about the first row. The first term is 1 × (1×0 − 4×6) = 1 × (−24) = −24. The second is −2 × (0×0 − 4×5) = −2 × (−20) = +40. The third is +3 × (0×6 − 1×5) = 3 × (−5) = −15. Adding them: −24 + 40 − 15 = 1. The determinant is 1, so the matrix is invertible.

Where the Matrix Determinant calculator can give the wrong answer

  • The boxes handle 2×2 and 3×3; a bigger matrix goes in the paste box (rows separated by semicolons or line breaks, entries by spaces or commas), and anything in that box overrides the boxes above it. The limit is 8×8 — expansion about a row does n! multiplications, which is fine at 8 (40,320) and pointless beyond it, where row reduction is the method to use.
  • The paste box needs a square matrix. Three rows of four entries is refused rather than silently trimmed, because a determinant only exists for square matrices.
  • Decimal entries are computed in floating point, so 0.1 × 3 can come out as 0.30000000000000004 before rounding. Results are shown to six decimal places; a determinant that should be exactly zero can appear as something like 0.000001 with awkward decimals, and a determinant of −0 is shown as 0.
  • Only the first-row expansion is shown as working. Expanding about a different row or a column gives the same number by a different route (Theorem DER), so a textbook that expands about the column with the most zeros will show different intermediate terms and the same answer.
  • Symbolic entries (x, 2y, a + b) are not accepted — every entry has to be a number. For a determinant with variables, substitute a value, or expand by hand using the term list here as the pattern.

Spotted a mistake? Tell us

Matrix Determinant FAQ

Multiply each entry of the first row by the determinant of the 2×2 matrix that remains when you cover that entry's row and column, then combine the three products with the signs +, −, +. For [[1, 2, 3], [0, 1, 4], [5, 6, 0]] that is 1(1×0 − 4×6) − 2(0×0 − 4×5) + 3(0×6 − 1×5) = −24 + 40 − 15 = 1. The working shown under the result follows exactly this pattern.