Mathwords logoMathwords

Matrix Determinant — Definition, Formula & Examples

The matrix determinant is a single number computed from a square matrix that reveals key properties of the matrix, such as whether it is invertible and how it scales area or volume. It is denoted det(A)\det(A) or A|A| and is defined only for square matrices.

For an n×nn \times n matrix A=[aij]A = [a_{ij}], the determinant is a scalar-valued function det:Rn×nR\det: \mathbb{R}^{n \times n} \to \mathbb{R} defined recursively by cofactor expansion: det(A)=j=1naijCij\det(A) = \sum_{j=1}^{n} a_{ij}\,C_{ij} for any fixed row ii, where Cij=(1)i+jMijC_{ij} = (-1)^{i+j}\,M_{ij} is the cofactor and MijM_{ij} is the minor obtained by deleting row ii and column jj. The determinant equals zero if and only if the matrix is singular (non-invertible), and it is multiplicative: det(AB)=det(A)det(B)\det(AB) = \det(A)\det(B).

Key Formula

det(abcd)=adbc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc
Where:
  • a,b,c,da, b, c, d = Entries of the 2×2 matrix, where a and d are on the main diagonal
  • adad = Product of the main diagonal entries
  • bcbc = Product of the off-diagonal entries

How It Works

To compute a determinant, you need a square matrix. For a 2×22 \times 2 matrix, multiply the diagonal entries and subtract the product of the off-diagonal entries. For a 3×33 \times 3 matrix, pick any row or column and expand along it: multiply each entry by its cofactor (the signed determinant of the smaller matrix formed by deleting that entry's row and column), then sum the results. Choosing a row or column with zeros simplifies the calculation since those terms vanish. The sign of each cofactor alternates in a checkerboard pattern starting with ++ at position (1,1)(1,1). For larger matrices, row reduction to upper-triangular form (then multiplying the diagonal) is far more efficient than cofactor expansion.

Worked Example

Problem: Find the determinant of the 2×2 matrix A=(5324)A = \begin{pmatrix} 5 & 3 \\ 2 & 4 \end{pmatrix}.
Step 1: Identify the entries: a=5a = 5, b=3b = 3, c=2c = 2, d=4d = 4.
Step 2: Compute the product of the main diagonal entries.
ad=5×4=20ad = 5 \times 4 = 20
Step 3: Compute the product of the off-diagonal entries.
bc=3×2=6bc = 3 \times 2 = 6
Step 4: Subtract to get the determinant.
det(A)=206=14\det(A) = 20 - 6 = 14
Answer: det(A)=14\det(A) = 14. Since the determinant is nonzero, the matrix is invertible.

Another Example

This example demonstrates cofactor expansion on a 3×3 matrix and shows how a zero entry simplifies the calculation by eliminating one cofactor term entirely.

Problem: Find the determinant of the 3×3 matrix B=(201314021)B = \begin{pmatrix} 2 & 0 & 1 \\ 3 & 1 & 4 \\ 0 & 2 & -1 \end{pmatrix} using cofactor expansion along the first row.
Step 1: Write the cofactor expansion along row 1. The signs alternate +,,++, -, +.
det(B)=2C11+0C12+1C13\det(B) = 2\,C_{11} + 0\,C_{12} + 1\,C_{13}
Step 2: Since b12=0b_{12} = 0, the middle term vanishes. Compute minor M11M_{11} by deleting row 1 and column 1.
M11=det(1421)=(1)(1)(4)(2)=18=9M_{11} = \det\begin{pmatrix} 1 & 4 \\ 2 & -1 \end{pmatrix} = (1)(-1) - (4)(2) = -1 - 8 = -9
Step 3: Compute minor M13M_{13} by deleting row 1 and column 3.
M13=det(3102)=(3)(2)(1)(0)=6M_{13} = \det\begin{pmatrix} 3 & 1 \\ 0 & 2 \end{pmatrix} = (3)(2) - (1)(0) = 6
Step 4: Apply the cofactor signs: C11=(+1)(9)=9C_{11} = (+1)(-9) = -9 and C13=(+1)(6)=6C_{13} = (+1)(6) = 6.
det(B)=2(9)+0+1(6)=18+6=12\det(B) = 2(-9) + 0 + 1(6) = -18 + 6 = -12
Answer: det(B)=12\det(B) = -12.

Why It Matters

The determinant appears throughout linear algebra, differential equations, and multivariable calculus (e.g., Jacobians in coordinate transformations). Engineers use determinants in structural analysis and control theory to test system stability. In data science, the determinant of a covariance matrix measures the "spread" of multivariate data and is central to algorithms like Gaussian discriminant analysis.

Common Mistakes

Mistake: Applying the 2×2 formula in the wrong order, computing ad+bcad + bc or bcadbc - ad.
Correction: The formula is adbcad - bc — main diagonal product minus off-diagonal product. Getting the sign wrong will flip your answer.
Mistake: Forgetting to alternate signs during cofactor expansion on a 3×3 matrix.
Correction: The cofactor signs follow a checkerboard: +,,++, -, + for the first row, ,+,-, +, - for the second row, and so on. Use (1)i+j(-1)^{i+j} to determine the sign at position (i,j)(i,j).
Mistake: Trying to compute the determinant of a non-square matrix.
Correction: Determinants only exist for square matrices. If your matrix is not n×nn \times n, the determinant is undefined.

Check Your Understanding

Find det(7253)\det\begin{pmatrix} 7 & 2 \\ 5 & 3 \end{pmatrix}.
Hint: Use the formula adbcad - bc.
Answer: 7(3)2(5)=2110=117(3) - 2(5) = 21 - 10 = 11
If det(A)=4\det(A) = 4 and det(B)=3\det(B) = -3, what is det(AB)\det(AB)?
Hint: Determinants are multiplicative.
Answer: det(AB)=det(A)det(B)=4×(3)=12\det(AB) = \det(A) \cdot \det(B) = 4 \times (-3) = -12
A 3×3 matrix has a determinant of 0. Can you solve Ax=bAx = b uniquely?
Hint: Think about what det(A)=0\det(A) = 0 says about invertibility.
Answer: No. A zero determinant means AA is singular and the system does not have a unique solution.

Related Terms