Enter any square matrix from 1×1 up to 8×8 and get its determinant instantly, with a reduction trace showing how the value was found.
The determinant is a single number, written det(A) or |A|, that summarizes a square matrix. It is nonzero exactly when the matrix is invertible, and its magnitude equals the volume-scaling factor of the linear map the matrix represents. For a 2×2 matrix the formula is simply ad − bc. For a 3×3 matrix the rule of Sarrus expands to a(ei − fh) − b(di − fg) + c(dh − eg), which is cofactor expansion along the first row.
Cofactor (Laplace) expansion generalizes this: det(A) = Σ (−1)i+j · aij · Mij, where Mij is the minor obtained by deleting row i and column j. That recursion is elegant but costs O(n!) operations, so it becomes impractical past 4×4. This calculator instead uses LU decomposition with partial pivoting: it applies Gaussian elimination to reduce the matrix to upper-triangular form, where the determinant is just the product of the diagonal pivots. Each row swap done for numerical stability flips the sign, so the final result is (−1)swaps times the product of pivots. This runs in O(n³) time and stays accurate for larger systems.
A determinant of zero means the rows are linearly dependent — the matrix is singular and has no inverse. The trace panel below shows the sign, pivot count, and the product that produced your answer, so you can follow the elimination step by step. All computation happens locally in your browser; nothing is uploaded.
Matrix Inverse Calculator Eigenvalue Calculator Matrix Multiplication