Determinant Calculator

Our Determinant Calculator computes the determinant of 2×2, 3×3, 4×4, and 5×5 square matrices using cofactor expansion along the first row. Every calculation shows complete step-by-step working including minor matrices and cofactor signs so you can follow the recursive process, verify homework, or learn the Laplace expansion method from scratch. The tool also tells you whether the matrix is singular (determinant equals zero) or non-singular (invertible).

star 4.8
auto_awesome AI
New

Determinant Calculator calculator

grid_on Matrix Input

analytics Results

Determinant
help_outline Enter values to check
Enter matrix values and click Calculate.

How to Use the Determinant Calculator

1

Choose Matrix Size

Select 2×2, 3×3, 4×4, or 5×5 from the size dropdown.

2

Enter Matrix Values

Fill in each cell of the matrix grid with numeric values (integers or decimals).

3

View Results

The determinant, step-by-step cofactor expansion, and singularity check are displayed instantly.

4

Interpret Results

If the determinant is 0, the matrix is singular (non-invertible). Otherwise it is non-singular and has an inverse.

The Formula

For 2×2: det = ad − bc. For larger matrices, expand along a row or column: multiply each element by its cofactor (signed minor) and sum. This process is recursive — each minor is itself a smaller determinant.

det(A) = Σ (-1)^(i+j) × a_ij × M_ij

lightbulb Variables Explained

  • A Input square matrix (n×n)
  • a_ij Element at row i, column j
  • M_ij Minor — determinant of the (n-1)×(n-1) submatrix obtained by removing row i and column j
  • (-1)^(i+j) Cofactor sign — alternating +/− in a checkerboard pattern

tips_and_updates Pro Tips

1

A matrix is singular (non-invertible) if and only if its determinant is zero

2

Swapping two rows changes the sign of the determinant

3

Multiplying a row by a scalar k multiplies the determinant by k

4

If two rows are identical, the determinant is zero

5

The determinant of a triangular matrix is the product of its diagonal entries

6

det(AB) = det(A) × det(B) for square matrices of the same size

The determinant is a scalar value computed from the elements of a square matrix that provides fundamental information about the matrix's properties and the linear transformation it represents. A non-zero determinant indicates the matrix is invertible (the system of linear equations has a unique solution), while a determinant of zero means the matrix is singular (the system has no unique solution — either no solution or infinitely many). The absolute value of the determinant represents the scale factor by which the matrix transformation changes areas (2D) or volumes (3D) — a determinant of 3 triples areas, while a determinant of -2 doubles areas and reverses orientation. Our determinant calculator computes determinants for 2×2, 3×3, 4×4, and larger matrices using cofactor expansion, showing the step-by-step calculation process. It supports integer, decimal, and fractional entries and identifies whether the matrix is singular, helping students learn the algorithm and engineers verify computations.

Determinant formulas by matrix size

For 2×2 matrices: det([[a,b],[c,d]]) = ad - bc. For 3×3 matrices, the Sarrus rule or cofactor expansion gives: det = a(ei-fh) - b(di-fg) + c(dh-eg) for matrix [[a,b,c],[d,e,f],[g,h,i]].

For larger matrices, cofactor expansion along any row or column works: det(A) = Σ(-1)^(i+j) × a_ij × M_ij, where M_ij is the minor (determinant of the submatrix obtained by deleting row i and column j).

The computational cost grows factorially with matrix size using cofactor expansion — O(n!) — making it impractical for large matrices. LU decomposition computes determinants in O(n³) by expressing A = LU and using det(A) = det(L) × det(U) = product of diagonal elements.

Properties that simplify determinant calculation

Several properties allow shortcuts:

  • the determinant of a triangular matrix (upper or lower) equals the product of diagonal elements.
  • Swapping two rows negates the determinant.
  • Multiplying a row by scalar k multiplies the determinant by k.
  • Adding a multiple of one row to another doesn't change the determinant — this is the basis of Gaussian elimination for efficient computation.
  • The determinant of a product equals the product of determinants: det(AB) = det(A) × det(B).
  • For the transpose: det(A^T) = det(A).
  • The inverse has det(A^(-1)) = 1/det(A).

These properties enable manual computation shortcuts: reduce the matrix to upper triangular form using row operations, track sign changes from row swaps, then multiply diagonal elements.

Applications in linear algebra and geometry

Beyond solving linear systems (Cramer's rule: x_i = det(A_i)/det(A)), determinants have geometric applications.

In 2D, the absolute determinant of a 2×2 matrix formed by two vectors gives the area of the parallelogram they span. In 3D, the determinant of a 3×3 matrix of three vectors gives the volume of the parallelepiped. Cross products can be computed using determinants: a×b = det([[i,j,k],[a1,a2,a3],[b1,b2,b3]]).

In calculus, the Jacobian determinant measures how a coordinate transformation scales infinitesimal areas/volumes — essential for changing variables in multiple integrals.

Eigenvalues satisfy det(A - λI) = 0, the characteristic polynomial, connecting determinants to spectral analysis and stability theory in differential equations.

What Is the Determinant of a Matrix?

The determinant is a single scalar number computed from the entries of a square matrix that encodes whether the matrix is invertible and how it scales space.

As Wolfram MathWorld explains, the determinant of an n×n matrix A, written det(A) or |A|, is nonzero exactly when the matrix has an inverse and its rows are linearly independent.

Geometrically, the absolute value of the determinant equals the factor by which the linear transformation stretches area in two dimensions or volume in three dimensions. A negative determinant additionally signals that the transformation flips orientation.

Determinants are defined only for square matrices — rectangular matrices have no determinant.

How to Find the Determinant of a 3x3 Matrix Step by Step

To find a 3×3 determinant, expand along the first row using cofactors: multiply each top entry by the 2×2 minor left after deleting its row and column, alternating signs +, −, +.

Take the matrix [[2,1,3],[0,-1,2],[1,4,-1]]. The three minors are [[-1,2],[4,-1]] = (-1)(-1)−(2)(4) = -7, [[0,2],[1,-1]] = (0)(-1)−(2)(1) = -2, and [[0,-1],[1,4]] = (0)(4)−(-1)(1) = 1.

Combining with signs gives 2(-7) − 1(-2) + 3(1) = -14 + 2 + 3 = -9. Khan Academy demonstrates this cofactor method interactively for any 3×3 matrix.

The 2x2 Determinant Formula Explained

For a 2×2 matrix [[a,b],[c,d]], the determinant is ad − bc: multiply the main diagonal, then subtract the product of the anti-diagonal.

For example, the determinant of [[3,8],[4,6]] is (3)(6) − (8)(4) = 18 − 32 = -14. The same 2×2 rule produces Cassini's identity, det([[F₍n+1₎,F₍n₎],[F₍n₎,F₍n-1₎]]) = (−1)ⁿ for consecutive Fibonacci numbers you can generate with a fibonacci calculator. This formula, catalogued by Wolfram MathWorld, is the base case of every larger determinant because cofactor expansion recursively reduces an n×n matrix down to sums of 2×2 minors.

The 2×2 determinant also equals the signed area of the parallelogram spanned by the two column vectors, which is why a zero value means the vectors are collinear and the matrix is singular.

What Does a Zero Determinant Mean? Singular vs Non-Singular Matrices

A determinant of exactly zero means the matrix is singular: it has no inverse, its rows and columns are linearly dependent, and it collapses space onto a lower dimension.

According to Encyclopaedia Britannica, a linear system Ax = b with a singular coefficient matrix has either no solution or infinitely many solutions, never a unique one. A non-zero determinant marks a non-singular (invertible) matrix, guaranteeing exactly one solution.

Because the determinant scales area or volume, a zero value corresponds to a transformation that flattens the space — for instance, mapping a 3D region onto a plane, giving it zero volume and destroying invertibility.

How to Compute 4x4 and 5x5 Determinants Efficiently

Large determinants are best found by row-reducing the matrix to upper-triangular form rather than pure cofactor expansion. As Wolfram MathWorld notes, the determinant of a triangular matrix equals the product of its diagonal entries, so Gaussian elimination lets you compute a 4×4 or 5×5 determinant in roughly n³ operations instead of the n! cofactors direct expansion requires.

Track two effects while reducing:

  • swapping two rows multiplies the determinant by −1
  • scaling a row by k multiplies the determinant by k

Adding a multiple of one row to another leaves the determinant unchanged. This calculator handles the bookkeeping automatically for matrices up to 5×5.

Real-World Uses of Determinants in Engineering and Geometry

Determinants appear far beyond textbooks.

In geometry, the absolute value of a 2×2 determinant gives the area of a parallelogram, and a 3×3 determinant gives the volume of a parallelepiped spanned by three vectors. Cramer's rule solves small linear systems using ratios of determinants, and the cross product of two 3D vectors is expressed as a symbolic 3×3 determinant.

In multivariable calculus, the Jacobian determinant — described in the NIST Digital Library of Mathematical Functions — measures how a change of variables rescales integrals.

Engineers use the characteristic equation det(A − λI) = 0 to find eigenvalues that govern vibration modes, structural stability, and control-system behavior.

Common Mistakes When Calculating Determinants

Watch out for these frequent errors:

  • The most frequent error is forgetting the alternating cofactor signs +, −, +, −; the sign of position (i, j) is (−1)^(i+j), not simply positive.
  • A second mistake is applying the diagonal Sarrus shortcut to 4×4 or larger matrices — Sarrus works only for 3×3.
  • Students also drop a minus sign after a row swap, since each swap flips the determinant's sign.
  • Another trap is treating a determinant like a matrix operation: det(A + B) does not equal det(A) + det(B), although det(AB) does equal det(A)·det(B).
  • Finally, remember determinants exist only for square matrices; a 2×3 matrix has none.

Verify each 2×2 minor arithmetically before combining.

Key Properties of Determinants Every Student Should Know

A handful of properties, all provable from the cofactor definition, make determinants predictable.

  • The determinant of the identity matrix is 1, and any matrix with a row or column of all zeros has determinant 0.
  • Two identical rows also force the determinant to zero because the rows are linearly dependent.
  • Transposing a matrix leaves its determinant unchanged, so det(Aᵀ) = det(A).
  • The determinant of a product factors as det(AB) = det(A)·det(B), which implies det(A⁻¹) = 1/det(A) whenever the inverse exists.
  • Multiplying an entire n×n matrix by a scalar k scales the determinant by kⁿ, not by k.

Khan Academy covers proofs of each property.

Frequently Asked Questions

sell

Tags