HomeMath & ScienceMatrix Determinant Calculator
Math & Science

Matrix Determinant Calculator 2026

Free · No signup2x2 and 3x3 matricesStep-by-step cofactor expansion
Enter Matrix ValuesFree · No signup
Enter values row by row, left to right. Blank cells default to 0.

How to Calculate the Determinant of a 2x2 Matrix

The 2x2 determinant formula is the simplest case and the foundation for all larger matrix determinants. For a matrix with elements a, b, c, d arranged in two rows:

| a b |
| c d | = ad - bc
Main diagonal (a, d): multiply together
Anti-diagonal (b, c): multiply and subtract

Worked example: Matrix A = [[5, 3], [-2, 4]]

det = (5)(4) - (3)(-2)
det = 20 - (-6)
det = 26 (nonzero, matrix is invertible)

The 2x2 formula appears inside every larger cofactor expansion. For polynomial function work that also uses step-by-step calculation, the Antiderivative Calculator shows integration with each term's rule labeled, similar to how each cofactor is labeled here.

How to Calculate the Determinant of a 3x3 Matrix

A 3x3 determinant is calculated by cofactor expansion. The most common method expands along the first row, with a sign pattern of +, -, +:

| a b c |
| d e f | = a(ei - fh) - b(di - fg) + c(dh - eg)
| g h i |

Each term (a, b, c) is multiplied by the determinant of the 2x2 submatrix left after crossing out that element's row and column. The three submatrices and their cofactors are:

ElementSign2x2 Submatrix (remove row 1 and that column)Cofactor
a+[[e, f], [h, i]]ei - fh
b-[[d, f], [g, i]]di - fg
c+[[d, e], [g, h]]dh - eg

You can expand along any row or column. The result is the same. Expanding along a row or column that contains zeros reduces the number of 2x2 sub-determinants you need to compute, since any term multiplied by zero contributes nothing. For data fitting and function interpolation across known points, see the Interpolation Calculator.

4x4 Matrix Determinant: Cofactor Expansion Extended

A 4x4 determinant uses the same cofactor expansion principle. Expanding along the first row, each element is multiplied by its signed cofactor (the determinant of the 3x3 submatrix formed by removing that element's row and column). The sign pattern follows (-1)^(row+column):

| a b c d |
| e f g h | = a*C11 - b*C12 + c*C13 - d*C14
| i j k l |
| m n o p |
where each C is the det() of the 3x3 submatrix at that position
Matrix sizeExpansion producesNumber of multiplicationsCommon method
2x21 formula (2 terms)2Direct formula
3x33 sub-determinants (2x2 each)9Cofactor expansion
4x44 sub-determinants (3x3 each)~40Cofactor expansion
5x5+n sub-determinants recursivelyGrows as n!LU decomposition (software)

This calculator handles 2x2 and 3x3 with full step-by-step work. For 4x4 and larger matrices, most linear algebra courses teach cofactor expansion for understanding the concept, then use software (NumPy, MATLAB, Wolfram) for actual computation. For descriptive statistics calculations that also show working steps, the Mean Median Mode Calculator covers sorted data with the formula shown.

Example Calculation

Find the determinant of A = [[3, -1], [2, 4]] and determine if it is invertible.

Formula: det = ad - bc
det = (3)(4) - (-1)(2)
det = 12 - (-2)= 14
det = 14 (nonzero, matrix is invertible)
Since det = 14 is not zero, A is invertible. The matrix inverse A^-1 exists and can be found by dividing the adjugate matrix by the determinant. The trace of A is 3 + 4 = 7, which equals the sum of A's eigenvalues.

Common Determinant Calculation Mistakes

Applying the 2x2 formula to a 3x3 matrix
The det = ad - bc shortcut only works for exactly 2x2 matrices. For 3x3, you must use cofactor expansion. Trying to apply the 2x2 rule to a larger matrix produces a completely wrong answer without any obvious error.
Getting the cofactor sign pattern wrong
The checkerboard alternating pattern (+, -, +, -, +, ...) starts at position (1,1) with a plus sign. A sign error on any cofactor propagates through the entire expansion. Write out the sign matrix before expanding to avoid this.
Expanding along a row with no zeros
Cofactor expansion works along any row or column, but picking a row or column that contains zeros reduces computation significantly. Each zero in the expansion row means one cofactor calculation is skipped entirely.
Confusing det = 0 with det = 1
det = 0 means the matrix is singular: no inverse exists, the rows are linearly dependent, and the system Ax = b has no unique solution. det = 1 means the matrix is volume-preserving (used in special orthogonal groups). These are different properties.
Forgetting det(AB) = det(A) x det(B)
When working with products of matrices, calculate each determinant separately and multiply. Expanding AB into a single matrix first is correct but much slower, and introduces more arithmetic error risk on larger matrices.

Sources & References

1
Strang, G. (2006). Linear Algebra and Its Applications (4th ed.)
Brooks Cole: the most widely used undergraduate linear algebra textbook; Chapter 4 covers determinants and their properties
2
Lay, D. C. (2012). Linear Algebra and Its Applications (4th ed.)
Pearson: covers cofactor expansion, properties of determinants, and applications to eigenvalues
3
MIT 18.06 Linear Algebra: OpenCourseWare
MIT OpenCourseWare: Gilbert Strang's lecture notes and problem sets on determinants and matrix theory
HR
Hassaan Rasheed
Developer and Researcher, CalculatorFlux

Researches and verifies the formulas, methodology, and source data behind each calculator on CalculatorFlux. All tools are built and checked against the cited references before publication.

Last updated: June 2026

Frequently Asked Questions

For a 2x2 matrix [[a, b], [c, d]], det = ad - bc. Multiply the main diagonal elements (top-left and bottom-right), then subtract the product of the anti-diagonal (top-right and bottom-left). Example: [[3, -1], [2, 4]]: det = (3)(4) - (-1)(2) = 12 + 2 = 14. Since 14 is not zero, this matrix is invertible.

More Math & Science Calculators

Quick Reference
det = 0 means:
  • Matrix is singular (not invertible)
  • Rows or columns are linearly dependent
  • System Ax = b has no unique solution
  • Transformation collapses space
|det| gives area / volume:
  • 2x2: area of parallelogram
  • 3x3: volume of parallelepiped
  • Sign (+/-): orientation preserved or reversed
Pro Tip
When computing a 3x3 determinant by hand, expand along whichever row or column has the most zeros. Each zero element contributes nothing to the sum, reducing the number of 2x2 sub-determinants you need to compute.
Browse Categories
Payroll & Tax
50+
Construction & Materials
21+
Health & Fitness
24+
Finance & Investment
20+
Education & GPA
16+
Math & Science
10+
Food & Cooking
8+
Specialty & Other
15+

Articles & Guides

In-depth guides related to this calculator.

All articles →