Matrix Determinant Calculator

Calculate the determinant of any square matrix up to 5×5 with full cofactor expansion steps. Understand the geometric meaning of determinants and when a matrix is singular.

Determinant Formulas by Matrix Size

The determinant is a scalar value that encodes important properties of a square matrix. It tells you whether the matrix is invertible, how it scales areas and volumes, and whether it preserves or reverses orientation. Only square matrices have determinants — a 3×4 matrix does not have one.

2×2 Determinant

For a 2×2 matrix, the determinant has a simple closed-form formula:

det([[a, b], [c, d]]) = ad - bc

For example, det([[4, 6], [3, 8]]) = 4·8 - 6·3 = 32 - 18 = 14. This means the matrix scales areas by a factor of 14. If the result were negative, it would also reverse orientation (mirror reflection).

3×3 Cofactor Expansion

For a 3×3 matrix, we expand along the first row using cofactors. Given matrix A = [[a, b, c], [d, e, f], [g, h, i]]:

det(A) = a(ei - fh) - b(di - fg) + c(dh - eg)

Each term multiplies an element from the first row by the determinant of the 2×2 submatrix obtained by deleting that element's row and column. The signs alternate: +, -, +. This pattern generalizes to any size — for an n×n matrix, you expand along a row, computing n cofactors, each of which involves an (n-1)×(n-1) determinant.

Properties of Determinants

Determinants satisfy several key algebraic properties that make them powerful tools in linear algebra. The multiplicative property states that det(AB) = det(A) · det(B) for any two square matrices of the same size. This immediately implies that det(A-1) = 1/det(A), since A·A-1 = I and det(I) = 1.

Swapping two rows of a matrix negates the determinant. Multiplying a row by a scalar k multiplies the determinant by k. Adding a multiple of one row to another row does not change the determinant. These row operation rules are the basis for computing determinants via Gaussian elimination — reduce to upper triangular form and multiply the diagonal entries.

The determinant of a triangular matrix (upper or lower) is simply the product of its diagonal entries. This makes the Gaussian elimination approach efficient: reduce the matrix to row echelon form (tracking row swaps), then multiply the diagonal. For large matrices (n > 5), this O(n³) approach is far more efficient than cofactor expansion, which runs in O(n!) time.

Geometric Interpretation

In two dimensions, the absolute value of the determinant of a 2×2 matrix equals the area of the parallelogram formed by the two column vectors. If the original unit square has area 1, applying the linear transformation A scales it to a parallelogram with area |det(A)|. A negative determinant indicates that the transformation reverses orientation — turning a counterclockwise path into a clockwise one.

In three dimensions, |det(A)| gives the volume of the parallelepiped formed by the three column vectors. A zero determinant means the three vectors are coplanar — they lie in a plane rather than spanning 3D space. This geometric picture generalizes to any dimension: the determinant measures the signed n-dimensional volume scaling factor of the linear transformation. This interpretation is central to change-of-variables formulas in multivariable calculus, where the Jacobian determinant adjusts for how a coordinate transformation distorts volume elements.

Frequently Asked Questions

What does the determinant of a matrix tell you?

The determinant measures how a matrix scales area (in 2D) or volume (in 3D and higher). A determinant of 2 means the matrix doubles areas, while a determinant of -1 means areas are preserved but orientation is reversed. A determinant of zero means the matrix collapses space into a lower dimension, making the matrix singular (non-invertible).

How do you calculate a 2×2 determinant?

For a 2×2 matrix [[a, b], [c, d]], the determinant is ad - bc. Multiply the top-left by the bottom-right, subtract the product of the top-right and bottom-left. For example, det([[3, 7], [1, 5]]) = 3·5 - 7·1 = 15 - 7 = 8.

What is cofactor expansion?

Cofactor expansion (also called Laplace expansion) computes the determinant by expanding along a row or column. For each element in the chosen row, you multiply the element by its cofactor (the determinant of the submatrix obtained by deleting that element's row and column, with an alternating sign). The sum of these products gives the determinant.

When is a matrix singular?

A matrix is singular when its determinant equals zero. This means the matrix has no inverse, its rows (or columns) are linearly dependent, and the system of equations Ax = b either has no solution or infinitely many solutions. Singular matrices collapse at least one dimension, reducing the rank of the transformation.

Does det(AB) equal det(A) times det(B)?

Yes. One of the most important properties of determinants is that det(AB) = det(A) · det(B) for any two square matrices A and B of the same size. This multiplicative property also implies that det(A-1) = 1/det(A) when the inverse exists, since A · A-1 = I and det(I) = 1.

Related Tools

Built by Michael Lip. Try the ML3X Matrix Calculator for interactive step-by-step solutions.