Calculator · Engineering Mathematics

Matrix Determinant Calculator

Compute the matrix determinant det(A) of a real square matrix from a pivoted LU factorisation — the method production numerical code actually uses — with the sign, the logarithmic magnitude, the row-swap parity and an honest singularity verdict.

Matrix A

One row per line; entries separated by spaces or commas. Scientific notation such as 1.5e-3 is accepted. At most 10 × 10; ragged rows and blank entries are refused, never repaired.

What Anemodia read

A
A
21-1
-3-12
-212

Results

det(A)-1
Size3 × 3
Sign of det(A)−
log₁₀|det(A)|-1.929e-16
|det(A)|1
Permutation sign det(P)+1
Row swaps2
Numerical rank3 of 3
Singularityno zero pivot at this scale
Pivot threshold (eps · n · ‖A‖∞)3.997e-15
  • ⚠ det(cA) = cⁿ det(A), so the magnitude of a determinant says nothing scale-invariant about conditioning. Use the condition number κ for that.

Where the magnitude comes from

Diagonal of U — det(A) = det(P) · ∏ uᵢᵢ
Diagonal of U — det(A) = det(P) · ∏ uᵢᵢ
-31.6670.2

2 row swaps were required, so det(P) = +1: each interchange reverses the sign of the determinant.

Continue

Open in Linear Algebra Lab

The matrix continues into the Lab's Determinant workspace, where the same result sits next to the factorisation, the conditioning and the spectrum of the same A. No right-hand side is carried over, because this calculator does not have one.

Assumptions & validity

  • · A must be square, real and at most 10 × 10. A 1 × 1 matrix is accepted: det([a]) = a.
  • · The determinant is computed as det(P) · ∏ uᵢᵢ from P A = L U with partial pivoting. Cofactor expansion is never used: it costs O(n!) and buys nothing numerically.
  • · Each row interchange reverses the sign. The parity of the interchanges is det(P) = ±1 and is reported explicitly.
  • · An exactly zero pivot gives det(A) = 0 exactly. A pivot merely below eps · n · ‖A‖∞ is reported as numerically singular at the working tolerance — a statement about this arithmetic, not a proof of exact singularity.
  • · A small but finite determinant is reported as it is. It is never rounded down to zero because it looks small.
  • · When the product of the diagonal would overflow or underflow, the sign and log₁₀|det(A)| are reported instead of a fabricated 0 or ∞.
  • · det(A) is not a conditioning measure: det(cA) = cⁿ det(A). Use the Matrix Condition Number Calculator for sensitivity.

Technical reference

det(A) = Σ_σ sgn(σ) ∏ᵢ a_{i,σ(i)}

P A = L U ⇒ det(A) = det(P) · ∏ᵢ uᵢᵢ

det(A B) = det(A) det(B), det(Aᵀ) = det(A)

det(cA) = cⁿ det(A)

log₁₀|det(A)| = Σᵢ log₁₀|uᵢᵢ|

det(A)
determinant of the square matrix A
U
upper triangular factor from pivoted elimination
det(P)
±1, the parity of the row interchanges
n
order of the matrix

Geometrically |det(A)| is the factor by which the linear map A scales n-dimensional volume, and the sign says whether it preserves or reverses orientation. A determinant of zero means the map collapses volume: the image lies in a lower-dimensional subspace and the matrix is not invertible.

The determinant of a triangular matrix is the product of its diagonal, which is exactly why elimination is the practical route: reduce to triangular form, keep track of the row swaps, multiply the diagonal.

A matrix is invertible if and only if its determinant is non-zero — mathematically. Numerically, the useful test is whether a pivot or a singular value is at roundoff relative to the scale of the matrix, because det(A) itself carries an n-th power of the scale and says nothing invariant.

det(0.1 · I) in ten dimensions is 1e-10, yet that matrix is perfectly conditioned: κ = 1. That single example is why Anemodia never infers conditioning from determinant magnitude.

Rounding error accumulates through elimination, so a determinant that should be exactly zero usually comes out at roundoff instead. That is why the singularity verdict here is phrased at the working tolerance rather than as an exact theorem.

Related tools