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 Mistakes to Avoid

Swapping the diagonals in the 2x2 formula
The 2x2 determinant is ad - bc, where a and d are the main diagonal and b and c are the anti-diagonal. Swapping gives the wrong sign or an entirely wrong result.
Missing the minus sign in 3x3 cofactor expansion
The sign pattern along the first row is +, -, +. The middle element b gets a negative sign on its cofactor. This is the most common 3x3 error and often goes unnoticed until the final answer is checked.
Assuming zero determinant means all entries are zero
A matrix can have all nonzero entries and still have a zero determinant if one row is a linear combination of another. For example, [[1, 2], [2, 4]] has det = 4 - 4 = 0.
Confusing trace with determinant
The trace is the sum of diagonal elements (a + d for 2x2). The determinant is ad - bc. They both involve diagonal elements but through completely different operations.
Treating the determinant as a matrix
The determinant is a single scalar value, not a matrix. You cannot add it to another matrix or multiply it element-wise. It scales and signs a transformation but is not itself a transformation.

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

Sources & References

1
Khan Academy - Determinants and Cofactor Expansion
Reference for 2x2 and 3x3 determinant formulas, cofactor expansion, and the geometric interpretation as area and volume scaling.
2
MIT OpenCourseWare: 18.06 Linear Algebra
Open lecture notes on determinants, matrix properties, Cramer's rule, and the relationship between determinants and eigenvalues.
3
3Blue1Brown - Essence of Linear Algebra: The Determinant
Visual reference for determinant properties including row operations, sign patterns, and the geometric meaning of zero and nonzero determinants.
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: May 2026
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 →