FLXCode Determinant Calculator

FLXCode apps

Appearance

Determinant Calculator

Type a square matrix and get its determinant as an exact number, with the working shown.

Example

det(A) = -85

The determinant of the 3 × 3 matrix is -85.

Cofactor expansion along row 1

  1. Expand along row 1: det = a·(ei − fh) − b·(di − fg) + c·(dh − eg), where a, b, c is row 1 and d, e, f and g, h, i are rows 2 and 3.
  2. a·(ei − fh) = 2·(4·(-2) − 1·2) = 2·(-10) = -20
  3. −b·(di − fg) = −(-1)·(0·(-2) − 1·5) = −(-1)·(-5) = -5
  4. c·(dh − eg) = 3·(0·2 − 4·5) = 3·(-20) = -60
  5. Add the three: -20 + (-5) + (-60) = -85
  6. The row reduction below gives the same number.

Steps

  1. Row-reduce to an upper triangular matrix. Adding a multiple of one row to another keeps the determinant. Swapping two rows flips its sign.
  2. R3 ← R3 − (5/2)·R1
  3. R3 ← R3 − (9/8)·R2
  4. The determinant is the product of the diagonal: 2 × 4 × -85/8 = -85.

Upper triangular form

[ 2  -1      3 ]
[ 0   4      1 ]
[ 0   0  -85/8 ]

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it. What this tool keeps and sends.

Problem or idea? Email us

Worked examples

SizeInputResultNote
1 × 1[7]det(A) = 7The determinant of one number is that number.
2 × 2[3 8; 4 6]det(A) = -14ad − bc = 3·6 − 8·4 = 18 − 32
2 × 2 with fractions[1/2 1/3; 1/4 1/5]det(A) = 1/601/10 − 1/12 = 6/60 − 5/60
3 × 3[2 −1 3; 0 4 1; 5 2 −2]det(A) = -85Cofactor expansion along row 1: −20 − 5 − 60
3 × 3, singular[1 2 3; 4 5 6; 7 8 9]det(A) = 0Row 3 = 2 × row 2 − row 1, so det = 0
3 × 3, negative entries[−2 0 1; 3 −1 4; 1 5 −3]det(A) = 50A mix of signs is where hand errors happen
4 × 4[1 2 0 1; 0 1 3 2; 2 0 1 1; 1 1 1 0]det(A) = -15Row reduction, no expansion written out
6 × 6, diagonaldiagonal 2, 3, −1, 5, 1/2, 4det(A) = -60For a diagonal matrix, multiply the diagonal

The rules, by size

  • 1 × 1: the single entry.
  • 2 × 2: ad − bc.
  • 3 × 3: the first-row expansion a(ei − fh) − b(di − fg) + c(dh − eg).
  • 4 × 4 and up: row reduction to a triangular matrix, then the product of the diagonal.

Two checks you can do by eye. Swapping two rows changes the sign of the determinant. A row of zeros, or two equal rows, makes it 0.

Two methods, one number

For a 3 × 3 matrix, the tool does the expansion and the row reduction, and they must give the same fraction. If they ever differ, the page stops with an error and does not show a wrong answer. For other matrix work, such as the inverse, rank or solving A x = b, use the matrix calculator.

Numbers this uses

  • Size: 1 × 1 up to 6 × 6.
  • Entries: whole numbers, decimals or fractions, up to 40 digits each, stored as exact fractions.
  • Steps: at most 60 row operations are listed, then a count of the rest.

FAQ

What is a determinant?

One number you get from a square matrix. If it is not 0, the matrix can be inverted and the system A x = b has exactly one solution. If it is 0, the matrix is singular. It is also the factor by which the matrix scales area (2 × 2) or volume (3 × 3).

How do I find a 2 × 2 determinant?

Multiply the main diagonal and subtract the other diagonal: for [a b; c d] it is ad − bc. For [3 8; 4 6] that is 3·6 − 8·4 = −14. The tool writes the line with your numbers.

How do I find a 3 × 3 determinant?

Expand along the first row: a(ei − fh) − b(di − fg) + c(dh − eg). Each bracket is a 2 × 2 determinant of what is left when you cross out that entry's row and column, and the signs go plus, minus, plus. The tool prints each of the three terms, and the sum.

Why are the answers fractions, not decimals?

Every entry is kept as an exact fraction, so there is no rounding. A matrix of 1/2, 1/3, 1/4 and 1/5 gives exactly 1/60. A determinant that should be 0 is 0, not 1e-17, so you can trust it for "is this matrix singular".

What does a determinant of 0 mean?

The rows are not independent: one row is a combination of the others. The matrix has no inverse, and a system with this coefficient matrix has no solution or infinitely many. The tool says "singular" next to the 0. For the full inverse or a solution, use the matrix calculator.

How are 4 × 4 and larger matrices done?

By row reduction. Add multiples of one row to another, which does not change the determinant, until the matrix is upper triangular. Then multiply the diagonal, and flip the sign once for every row swap. An expansion of a 6 × 6 would need 720 terms, so the tool shows the row operations instead.

More from FLXCode

  • Matrix CalculatorAdd, multiply, transpose, determinant, inverse, rank and RREF up to 6 × 6, exact fractions, row-operation steps.
  • Quadratic Formula CalculatorSolve ax² + bx + c = 0 with exact roots, complex roots, discriminant, vertex form, steps and a small graph.
  • Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers. Simplified answer with the steps in words.
  • Square Root CalculatorExact simplified radicals (√72 = 6√2), decimals to your digits, cube and n-th roots, perfect-square check, steps.

Share Determinant Calculator