πŸ”’ Linear Algebra Tool

Determinant Calculator β€” 2Γ—2, 3Γ—3, 4Γ—4 & 5Γ—5

Enter your square matrix cell by cell, compute its determinant instantly, and see whether it is singular or non-singular β€” with the calculation method and an intermediate explanation.

Matrix Workspace

Choose a size, then type values into the grid.

Matrix A  Β·  3 Γ— 3

Example presets

Result

Ξ£

Enter matrix values and press Calculate Determinant.

What is a determinant?

A determinant is a single number computed from a square matrix. It encodes essential information about the matrix: whether the linear transformation it represents is invertible, how it scales volume, and whether its rows (or columns) are linearly independent. The determinant of a matrix A is written det(A) or |A|.

Determinants appear throughout linear algebra, calculus, physics, engineering, and statistics. They are used to solve systems of linear equations, compute inverses, evaluate eigenvalues, change variables in multiple integrals (the Jacobian), and test whether a set of vectors forms a basis.

How the determinant works

The determinant is defined recursively. For a 1Γ—1 matrix it is just the single entry. For larger matrices, it is a signed sum of products of entries, where the signs alternate in a checkerboard pattern. Equivalent but faster methods β€” like cofactor expansion, row reduction (Gaussian elimination), or LU decomposition β€” produce the same value.

This calculator uses cofactor expansion for 2Γ—2 and 3Γ—3 matrices (fast and exact for small sizes), and Gaussian elimination with partial pivoting for 4Γ—4 and 5Γ—5 matrices (numerically stable and efficient). Both methods yield the exact determinant for integer and rational inputs.

2Γ—2 determinant formula

For a 2Γ—2 matrix, the determinant is the product of the main diagonal minus the product of the anti-diagonal:

det(A) = ad βˆ’ bc

where A = [[a, b], [c, d]]

Example: for A = [[3, 8], [4, 6]], det(A) = (3)(6) βˆ’ (8)(4) = 18 βˆ’ 32 = βˆ’14.

3Γ—3 determinant concept

For a 3Γ—3 matrix, the determinant can be computed by cofactor expansion along any row or column. Expanding along the first row:

det(A) = a₁₁(aβ‚‚β‚‚a₃₃ βˆ’ a₂₃a₃₂) βˆ’ a₁₂(a₂₁a₃₃ βˆ’ a₂₃a₃₁) + a₁₃(a₂₁a₃₂ βˆ’ aβ‚‚β‚‚a₃₁)

The pattern of signs is + βˆ’ + across the first row. Each term is a 2Γ—2 determinant (a minor) multiplied by a sign factor. This generalises to any size via cofactor expansion.

Determinant and invertibility

A square matrix is invertible (non-singular) if and only if its determinant is non-zero. If det(A) β‰  0, the matrix has an inverse A⁻¹ and the system Ax = b has a unique solution. If det(A) = 0, the matrix is singular: it has no inverse, and the system either has no solution or infinitely many.

Geometric meaning

Geometrically, the absolute value of the determinant is the volume scaling factor of the linear transformation represented by the matrix. In 2D, |det(A)| is the area of the parallelogram formed by the transformed unit square. In 3D, it is the volume of the parallelepiped. A determinant of zero means the transformation collapses space onto a lower dimension (e.g., a plane or a line), which is why the matrix cannot be inverted.

Singular matrices

A singular matrix has determinant zero. Its rows (and columns) are linearly dependent: at least one row can be written as a combination of the others. Singular matrices are not invertible, and they map distinct vectors to the same output β€” information is lost.

Practical applications

Worked example β€” 3Γ—3 determinant

Let A = [[2, βˆ’1, 3], [0, 4, βˆ’2], [1, 5, 0]]. Expanding along the first row:

det(A) = 2Β·(4Β·0 βˆ’ (βˆ’2)Β·5) βˆ’ (βˆ’1)Β·(0Β·0 βˆ’ (βˆ’2)Β·1) + 3Β·(0Β·5 βˆ’ 4Β·1)
       = 2Β·(0 + 10) + 1Β·(0 + 2) + 3Β·(0 βˆ’ 4)
       = 20 + 2 βˆ’ 12 = 10

Since det(A) = 10 β‰  0, the matrix is non-singular and invertible. Use the calculator above to verify this result instantly.

Worked example β€” singular matrix

Let B = [[1, 2, 3], [2, 4, 6], [1, 1, 1]]. Notice row 2 = 2 Γ— row 1, so the rows are linearly dependent. Expanding:

det(B) = 1Β·(4Β·1 βˆ’ 6Β·1) βˆ’ 2Β·(2Β·1 βˆ’ 6Β·1) + 3Β·(2Β·1 βˆ’ 4Β·1)
       = 1Β·(βˆ’2) βˆ’ 2Β·(βˆ’4) + 3Β·(βˆ’2)
       = βˆ’2 + 8 βˆ’ 6 = 0

det(B) = 0 confirms the matrix is singular and not invertible.

Related matrix tools

Explore our other free linear algebra and mathematics calculators:

Frequently asked questions

What is the determinant of a matrix? +
The determinant is a single number computed from a square matrix. It tells you whether the matrix is invertible, how it scales area or volume, and whether its rows or columns are linearly independent.
How do I calculate a 2Γ—2 determinant? +
For a 2Γ—2 matrix [[a, b], [c, d]], the determinant is ad βˆ’ bc. For example, det([[3, 8], [4, 6]]) = 3Γ—6 βˆ’ 8Γ—4 = 18 βˆ’ 32 = βˆ’14.
How is a 3Γ—3 determinant calculated? +
A 3Γ—3 determinant can be computed by cofactor expansion along any row or column, or by the rule of Sarrus. This calculator uses cofactor expansion along the first row, which produces three 2Γ—2 determinant terms with alternating signs (+, βˆ’, +).
What does a determinant of 0 mean? +
A determinant of 0 means the matrix is singular. It has no inverse, its rows (or columns) are linearly dependent, and it collapses space onto a lower dimension. Any system of equations with this matrix either has no solution or infinitely many.
Can I calculate the determinant of a 4Γ—4 or 5Γ—5 matrix here? +
Yes. This determinant calculator supports 2Γ—2, 3Γ—3, 4Γ—4, and 5Γ—5 matrices. For 4Γ—4 and 5Γ—5 matrices it uses Gaussian elimination with partial pivoting, which is numerically stable and accurate.
What is the difference between singular and non-singular matrices? +
A non-singular matrix has a non-zero determinant and is invertible. A singular matrix has a determinant of zero and no inverse. Singular matrices have linearly dependent rows or columns.
What is the geometric meaning of a determinant? +
The absolute value of the determinant is the factor by which the linear transformation scales volume. In 2D, it is the area of the transformed unit square. In 3D, it is the volume of the transformed unit cube. A zero determinant means volume collapses to zero.
Does the determinant change if I swap rows or columns? +
Swapping two rows or two columns multiplies the determinant by βˆ’1. Adding a multiple of one row to another does not change the determinant. Multiplying a row by a scalar multiplies the determinant by that scalar.