Linear Algebra Tool

Determinant Calculator

Enter any square matrix (2×2, 3×3, 4×4, or larger) and instantly calculate its determinant with step-by-step cofactor expansion. See every step of the solution, check invertibility, and learn the method.

Dimension
2
2×2
|A|

Enter matrix values and calculate to see the determinant result

What Is the Determinant of a Matrix?

The determinant is a single number calculated from the entries of a square matrix. Written as det(A) or |A|, it tells you whether the matrix is invertible, how it scales area or volume, and whether its rows are linearly independent. Use our determinant calculator above to compute it instantly with full step-by-step working for any size matrix.

Definition & Notation

The determinant is defined recursively through cofactor expansion. For a 1x1 matrix [a], det = a. For larger matrices, you expand along a row or column, summing each element multiplied by its cofactor. The notation det(A), |A|, and det A are all equivalent.

Geometric Interpretation

Geometrically, the absolute value of the determinant represents the scale factor by which the matrix transforms area (2D) or volume (3D). A 2x2 matrix with det = 3 triples the area of any shape it transforms. The sign indicates whether orientation is preserved (positive) or reversed (negative).

When the Determinant Is Zero

A zero determinant means the matrix is singular and non-invertible. The rows (or columns) are linearly dependent, the system Ax = b has no unique solution, and the transformation collapses space into a lower dimension. This is a key test for matrix invertibility.

Key Properties

det(AB) = det(A) det(B). The transpose has the same determinant: det(Aᵀ) = det(A). Swapping two rows negates the sign. Multiplying a single row by k multiplies det by k. Adding a multiple of one row to another leaves the determinant unchanged.

How to Calculate the Determinant of a Matrix (Step by Step)

The method you use to find a determinant depends on the matrix size. Below are the formulas and techniques for 2x2, 3x3, and 4x4 matrices. Our determinant calculator above automates all of these methods and shows you every step.

2×2 Formula

det = ad − bc

For a 2x2 matrix [[a, b], [c, d]], multiply the main diagonal elements and subtract the product of the off-diagonal elements. This is the simplest and most fundamental determinant formula that forms the basis for all larger calculations.

3×3 Cofactor Expansion

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

Expand along the first row: each element is multiplied by its cofactor (the 2x2 minor determinant with alternating signs). You can also use the Sarrus rule for 3x3 matrices as a shortcut, though it does not generalize to larger sizes.

4×4 and Beyond

For 4x4 and larger matrices, use Laplace expansion recursively or apply row reduction to transform the matrix into upper triangular form. The determinant of a triangular matrix is simply the product of its diagonal entries. Row reduction is generally more efficient for large matrices, requiring O(n³) operations compared to O(n!) for naive cofactor expansion.

Row Reduction Method

Use elementary row operations to convert the matrix to row echelon form (upper triangular). Track sign changes from row swaps and scaling factors from row multiplications. Then multiply all diagonal entries and apply the accumulated sign and scale. This is the most efficient method for larger matrices.

Choosing a Row or Column

When using cofactor expansion, you may expand along any row or column and get the same result. For efficiency, choose the row or column with the most zeros, since zero elements contribute nothing to the sum. Our calculator automatically picks the optimal expansion path.

Special Cases

Triangular matrices (upper or lower): the determinant is the product of diagonal entries. Diagonal matrices: same rule applies. Identity matrix: det = 1. If two rows or columns are identical or proportional, the determinant is zero. These shortcuts can save significant computation time.

What Is the Determinant Used For?

Determinants are used throughout mathematics, physics, engineering, and computer science. Here are the most common real-world applications of matrix determinants and why you might need to calculate one.

Solving Linear Systems (Cramer's Rule)

  • Express each variable as a ratio of two determinants
  • The denominator is the coefficient matrix determinant
  • Each numerator replaces one column with the constants
  • Practical for small systems (2x2, 3x3) and symbolic solutions

Invertibility Testing

  • A matrix is invertible if and only if det(A) ≠ 0
  • The inverse formula involves 1/det(A) as a scalar factor
  • Singular matrices (det = 0) have no inverse
  • Critical check before solving systems or computing inverses

Area & Volume Calculations

  • |det([u, v])| gives the area of a parallelogram in 2D
  • |det([u, v, w])| gives the volume of a parallelepiped in 3D
  • Used in coordinate geometry and change-of-variable formulas
  • The Jacobian determinant scales integrals under transformations

Eigenvalue Computation

  • Eigenvalues satisfy det(A − λI) = 0
  • The characteristic polynomial is derived from this determinant
  • Roots of the polynomial are the eigenvalues of the matrix
  • Fundamental in stability analysis, PCA, and quantum mechanics

Frequently Asked Questions

What is a determinant of a matrix?

The determinant of a matrix is a single number (scalar) calculated from the entries of a square matrix. It is written as det(A) or |A|. The determinant tells you whether a matrix is invertible (det is not 0), how the matrix scales areas or volumes, and whether the rows or columns are linearly independent. Only square matrices (same number of rows and columns) have a determinant.

How do you find the determinant of a 2x2 matrix?

To find the determinant of a 2x2 matrix [[a, b], [c, d]], use the formula: det = ad - bc. Multiply the top-left by the bottom-right, then subtract the product of the top-right and bottom-left. Example: the determinant of [[3, 7], [1, 5]] is (3)(5) - (7)(1) = 15 - 7 = 8.

How do you find the determinant of a 3x3 matrix?

To find the determinant of a 3x3 matrix, use cofactor expansion along the first row: det = a(ei - fh) - b(di - fg) + c(dh - eg), where the matrix is [[a,b,c],[d,e,f],[g,h,i]]. Multiply each element in the first row by the determinant of the 2x2 submatrix remaining after removing that element's row and column, applying alternating signs (+, -, +). You can also use the Rule of Sarrus as a shortcut for 3x3 matrices.

How do you find the determinant of a 4x4 matrix?

To find the determinant of a 4x4 matrix, use cofactor expansion (Laplace expansion) along a row or column. Pick the row or column with the most zeros to simplify the calculation. Each element is multiplied by the determinant of its 3x3 minor with alternating signs. Alternatively, use row reduction to convert the matrix to upper triangular form, then multiply the diagonal entries. Row reduction is faster for 4x4 and larger matrices.

What does it mean when the determinant is zero?

When the determinant equals zero, the matrix is singular, meaning it has no inverse. This tells you the rows or columns are linearly dependent, the system Ax = b has either no solution or infinitely many solutions (never a unique solution), and the matrix collapses space into a lower dimension. A non-zero determinant means the matrix is invertible and Ax = b has exactly one solution.

Can a determinant be negative?

Yes, a determinant can be negative. A negative determinant means the linear transformation represented by the matrix reverses orientation. In 2D, a negative determinant means the transformation flips the plane (like a mirror reflection). In 3D, it converts a right-handed coordinate system to a left-handed one. The absolute value of the determinant still represents the scale factor for area or volume.

What is cofactor expansion (Laplace expansion)?

Cofactor expansion, also called Laplace expansion, is a method for computing the determinant by expanding along any row or column. For each element in the chosen row or column, multiply it by its cofactor: the determinant of the smaller submatrix formed by deleting that element's row and column, times (-1)^(i+j) for the sign. The sum of all these products equals the determinant. This method works for any size square matrix and reduces an n x n determinant into several (n-1) x (n-1) determinants.

What are the key properties of determinants?

The most important properties of determinants are: (1) det(AB) = det(A) * det(B) for square matrices. (2) det(A^T) = det(A), the transpose has the same determinant. (3) Swapping two rows negates the determinant. (4) Multiplying a row by k multiplies the determinant by k. (5) Adding a multiple of one row to another leaves the determinant unchanged. (6) det(kA) = k^n * det(A) for an n x n matrix. (7) If any row or column is all zeros, det = 0. (8) If two rows or columns are identical, det = 0.

Related Calculators

Share This Calculator

Found this tool helpful?

Help others discover it with one click.

Copy Link

Suggested hashtags: #determinant #Calculator #FreeTools #AICalculator