Matrix Determinant Calculator
Calculate the determinant of any square matrix — 2×2, 3×3, 4×4, or larger — instantly with this free online linear algebra tool.
Enter your square matrix using semicolons for rows and commas for columns, then click Calculate to get the determinant.
Matrix Determinant Calculator
Calculate the determinant of any square matrix — 2×2, 3×3, 4×4, or larger — instantly with this free online linear algebra tool.
Separate rows with semicolons (;) and columns with commas (,). The matrix must be square (same number of rows and columns).
About the matrix determinant calculator
The determinant is a single scalar value that can be computed from any square matrix and summarizes key algebraic properties of that matrix. It is one of the most important quantities in linear algebra, appearing in the theory of systems of equations, eigenvalues, matrix inverses, change-of-variable formulas in calculus, and many areas of physics and engineering.
For a 2×2 matrix [[a, b],[c, d]], the determinant is defined as ad − bc. This formula gives the signed area of the parallelogram formed by the two row vectors of the matrix. For a 3×3 matrix, the determinant is computed using cofactor expansion along any row or column, which expands the problem into three 2×2 determinants weighted by the entries in the chosen row or column and alternating signs.
For larger matrices, the most efficient exact method is Gaussian elimination (LU decomposition). You reduce the matrix to upper-triangular form through a sequence of row operations, keeping track of any row swaps (each swap changes the sign of the determinant). The determinant of an upper-triangular matrix is simply the product of its diagonal entries, so you multiply those diagonal values and apply the accumulated sign factor.
The sign and magnitude of the determinant carry rich information. A positive determinant means the transformation represented by the matrix preserves orientation. A negative determinant means it reverses orientation (like a reflection). The absolute value of the determinant equals the scale factor by which the matrix multiplies volumes — a determinant of 5 means the matrix expands volumes by a factor of 5, while a determinant of 0.5 compresses them by half.
A zero determinant is especially significant: it means the matrix is singular, the rows (or columns) are linearly dependent, the transformation collapses space onto a lower-dimensional subspace, and the matrix has no inverse. In a system of linear equations Ax = b, a zero determinant of A indicates either no solution or infinitely many solutions, depending on whether b lies in the image of A.
This calculator uses Gaussian elimination with partial pivoting for stability, which correctly handles matrices of any size. The result is rounded to ten significant digits to eliminate floating-point noise while preserving the precision needed for practical calculations.
Matrix determinant examples
Four examples from 2×2 to 4×4, illustrating different outcomes including zero and negative determinants.
| Matrix | Determinant | Notes |
|---|---|---|
| [[1,2],[3,4]] | −2 | det = 1×4 − 2×3 = 4 − 6 = −2. Non-zero, so the matrix is invertible. |
| [[1,2,3],[4,5,6],[7,8,9]] | 0 | The third row equals 2×(second row) − first row, making the rows linearly dependent. The determinant is zero and the matrix is singular. |
| [[2,−1,0],[−1,2,−1],[0,−1,2]] | 4 | This is a tridiagonal matrix. det = 4. The non-zero determinant confirms it is invertible — it appears in discretised 1D boundary-value problems. |
| [[1,0,0,0],[0,2,0,0],[0,0,3,0],[0,0,0,4]] | 24 | A 4×4 diagonal matrix. The determinant is the product of the diagonal entries: 1×2×3×4 = 24. |
How to use the matrix determinant calculator
- Enter your square matrix in the Matrix field. Use commas to separate elements within a row and semicolons to separate rows. For example, type 1,2;3,4 for the 2×2 matrix [[1,2],[3,4]].
- Confirm that your matrix has the same number of rows and columns — the determinant is only defined for square matrices.
- Click Calculate. The determinant appears below as a single number, along with a note indicating whether the matrix is invertible.
- Check the note: a zero determinant means the matrix is singular and has no inverse; a non-zero determinant means it is invertible.
- Click Reset to clear the input and start over with a new matrix.
Frequently asked questions
What is the determinant of a matrix?
The determinant is a scalar value computed from a square matrix that encodes important properties of the matrix. It equals the signed volume of the parallelepiped formed by the rows (or columns) of the matrix. A non-zero determinant means the matrix is invertible; a zero determinant means it is singular.
How is the determinant of a 3×3 matrix calculated?
For a 3×3 matrix, the determinant is found using cofactor expansion. Pick any row or column, then for each element multiply it by the determinant of the 2×2 submatrix obtained by removing that element's row and column, alternating the sign using the cofactor pattern (+, −, +). The sum of these three products is the determinant.
What does a zero determinant mean?
A zero determinant means the matrix is singular: it has no inverse, its rows (or columns) are linearly dependent, and any system of equations with this matrix as its coefficient matrix either has no solution or infinitely many solutions. Geometrically, the matrix collapses the space onto a lower-dimensional subspace.
Can the determinant be negative?
Yes. A negative determinant means the matrix transformation reverses orientation — for example, it includes a reflection. The absolute value of the determinant still gives the scale factor for volumes. For instance, a determinant of −3 means the matrix reverses orientation and scales volumes by a factor of 3.
Is the determinant affected by row operations?
Yes, but in predictable ways. Swapping two rows changes the sign of the determinant. Multiplying a row by a scalar k multiplies the determinant by k. Adding a multiple of one row to another row leaves the determinant unchanged. These rules are the foundation of Gaussian elimination for computing determinants efficiently.
What sizes of matrices does this calculator support?
This calculator supports square matrices of any size — 2×2, 3×3, 4×4, and larger. For small matrices (up to 4×4), the result is computed exactly using direct formulas. For larger matrices, Gaussian elimination with partial pivoting is used, which is stable and accurate for typical real-world inputs.