Advanced maths

Matrix determinant calculator

Find the exact determinant of a square matrix and follow the elimination steps.

Your numbers

One row per line or semicolon; separate entries with spaces or commas. Up to 6 rows and 6 columns. Use integers, decimals (up to 6 places) or fractions such as -2/3.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your numbers and select Calculate.

Behind the numbers

How this calculation works

Row replacement eliminates entries below the diagonal without changing the determinant. Each row swap reverses the sign. Once the matrix is upper triangular, the determinant is the diagonal product adjusted for swaps. A missing nonzero pivot gives determinant zero.

THE FORMULAdet(A) = (−1)ˢ × product of triangular diagonal entries

A worked example

For [1 2; 3 4], the determinant is 1 × 4 − 2 × 3 = −2. The matrix therefore has an inverse.

Good to know

For small matrices of exact rational numbers, up to 6 rows and 6 columns. Entries are limited to ±1,000,000; integer fraction denominators to 1,000,000. Decimal input allows up to 6 places. No expressions, scientific notation, complex numbers or uncertain measurements. Large intermediate fractions are bounded to keep the tool responsive.

A little curiosity

Zero describes lost independence

Consider [1 2; 2 4]. Its second row is exactly twice its first, so the two rows do not provide independent directions. The determinant is zero. Replacing the bottom-right entry with 5 breaks that relation and gives determinant 1.

The determinant is defined for square matrices. A rectangular collection can still have an important rank, but it does not have an ordinary determinant. Use the RREF and rank tool to study that different question.

A larger determinant is not automatically a better matrix

Changing units changes the entries and can strongly change the determinant. Even multiplying a 3 × 3 matrix by a scalar 10 multiplies its determinant by 1,000. Comparisons without matching units and scale can therefore mislead.

A nonzero determinant establishes invertibility for the exact input. It is not a condition-number estimate and does not establish that measured data are accurate or stable. This tool does not rank the quality of a statistical model or engineering system.

Keep the sign when swapping rows

For [0 1; 2 3], a row swap provides a convenient first pivot, but it reverses the determinant’s sign. The answer is −2, not 2. The working records swaps explicitly so you can track the sign alongside the diagonal product.

Adding a multiple of one row to another is different from swapping rows: that replacement leaves the determinant unchanged. Scaling a row is different again. The displayed elimination uses replacements and sign-tracked swaps, avoiding an unrecorded row-scaling factor.

A few questions, answered

Does a 1 × 1 matrix have a determinant?

Yes. Its determinant is its sole entry, including zero or a fraction.

Why are fractions shown instead of rounded decimals?

The calculation uses exact rational arithmetic. A decimal such as 0.1 is treated as exactly 1/10, not an uncertain measurement.

Can I use this for a large sparse matrix?

No. The tool is designed for small learning and checking tasks, with at most 6 rows and 6 columns. Use a numerical or symbolic linear-algebra package for larger problems.

Find your calculator

Start typing to explore the library.