Paritian

Mathematics

Matrix Determinant Calculator

The determinant of a square matrix of any size up to twelve, by Gaussian elimination.

Results

Determinant -306.00000000
After elimination, in triangular form 6 1 1 0 7.666667 6.666667 0 0 6.652174
Does it have an inverse? Yes
Rows swapped along the way 1
Sign those swaps cost -1
Trace, the diagonal added up 11.00000000
Size 3 x 3
The matrix as it was read 6 1 1 4 -2 5 2 8 7

What this tool does

The determinant tells you whether a matrix can be undone: zero means it flattens space and has no inverse, anything else means it does. Most people learn Sarrus's rule of diagonals, which works for three by three and for nothing else — and quietly gives wrong answers when applied to four by four, which is one of the most common mistakes in linear algebra. This page uses Gaussian elimination instead, which works at any size: reduce the matrix to triangular form, multiply the diagonal, and flip the sign once for every row swap. The triangular form is shown so you can follow it.

Formula

A → U (Gauss) · det(A) = (−1)^s × u₁₁ × u₂₂ × … × uₙₙ

Variables

SymbolMeaningUnit
aThe matrix, one row per line
DTDeterminant
TUAfter elimination, in triangular form
IVDoes it have an inverse?
SWRows swapped along the way
SGSign those swaps cost
TRTrace, the diagonal added up
SZSize
OGThe matrix as it was read

Worked example

  • The matrix, one row per line6, 1, 1 4, -2, 5 2, 8, 7
  • Determinant-306.00000000
  • After elimination, in triangular form6 1 1 0 7.666667 6.666667 0 0 6.652174
  • Does it have an inverse?Yes
  • Rows swapped along the way1
  • Sign those swaps cost-1
  • Trace, the diagonal added up11.00000000
  • Size3 x 3
  • The matrix as it was read6 1 1 4 -2 5 2 8 7

Limitations

  • The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.
  • Mixing units is the most common source of error. Convert every input to the units shown next to each field before calculating.