Evanalysis
7.1Estimated reading time: 12 min

7.1 Determinants and cofactor expansion

Define determinants carefully through minors and cofactors, then learn how cofactor expansion turns one scalar into a precise summary of square-matrix structure.

Course contents

MATH1030: Linear algebra I

Rigorous linear algebra notes on systems, matrices, structure, and proof, with interaction used only where it clarifies the mathematics.

Chapter 1Systems of equations1 sections
Chapter 4Solution structure1 sections
Chapter 5Invertibility1 sections

Determinants attach one number to a square matrix. That number is not just a decoration. Later it tells you whether the matrix is invertible, how row and column operations affect the matrix, and how to solve certain square systems by formula.

The price of that power is that the definition is more delicate than matrix addition or scalar multiplication. A determinant is defined only for square matrices, and it is built recursively from smaller determinants.

Why this section matters

If you only memorize the 2×22 \times 2 formula

det[abcd]=adbc,\det\begin{bmatrix}a&b\\c&d\end{bmatrix}=ad-bc,

you will miss the actual structure. The point of this section is to explain where that formula comes from, why the sign pattern alternates, and why expanding along a clever row or column can make a hard computation manageable.

Definition

Submatrix, minor, and cofactor

Let A=[aij]A=[a_{ij}] be an n×nn\times n matrix.

For fixed i and j, delete row i and column j. The resulting (n1)×(n1)(n-1)\times(n-1) matrix is written A(ij)A(i\mid j).

The minor of the entry aija_{ij} is

Mij=det(A(ij)).M_{ij}=\det(A(i\mid j)).

The cofactor of the entry aija_{ij} is

Aij=(1)i+jMij.A_{ij}=(-1)^{i+j}M_{ij}.

The factor (1)i+j(-1)^{i+j} creates the checkerboard sign pattern

[+++++].\begin{bmatrix} + & - & + & \cdots\\ - & + & - & \cdots\\ + & - & + & \cdots\\ \vdots & \vdots & \vdots & \ddots \end{bmatrix}.

Definition

Determinant by cofactor expansion

If A=[a11]A=[a_{11}] is a 1×11\times 1 matrix, define

det(A)=a11.\det(A)=a_{11}.

If A=[aij]A=[a_{ij}] is an n×nn\times n matrix with n>1n>1, define its determinant by expanding along the first row:

det(A)=a11A11+a12A12++a1nA1n.\det(A)=a_{11}A_{11}+a_{12}A_{12}+\cdots+a_{1n}A_{1n}.

Equivalently,

det(A)=a11M11a12M12++(1)1+na1nM1n.\det(A)=a_{11}M_{11}-a_{12}M_{12}+\cdots+(-1)^{1+n}a_{1n}M_{1n}.

The definition is recursive. A 4×44\times4 determinant is reduced to several 3×33\times3 determinants, each of those is reduced to 2×22\times2 determinants, and those finally reduce to 1×11\times1 determinants.

First examples

Worked example

The familiar 2×2 formula comes from the definition

Let

A=[a11a12a21a22].A=\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}.

The first-row cofactors are

A11=(1)1+1a22=a22,A12=(1)1+2a21=a21.A_{11}=(-1)^{1+1}a_{22}=a_{22}, \qquad A_{12}=(-1)^{1+2}a_{21}=-a_{21}.

So

det(A)=a11A11+a12A12=a11a22a12a21.\det(A)=a_{11}A_{11}+a_{12}A_{12} =a_{11}a_{22}-a_{12}a_{21}.

The usual adbcad-bc rule is therefore not a separate theorem. It is the 2×22\times2 case of the recursive definition.

Worked example

A 3×3 determinant by cofactor expansion

Let

B=[321416312].B= \begin{bmatrix} 3&2&-1\\ 4&1&6\\ -3&-1&2 \end{bmatrix}.

Expand along the first row:

det(B)=3161224632(1)4131.\det(B)=3 \begin{vmatrix} 1&6\\ -1&2 \end{vmatrix} -2 \begin{vmatrix} 4&6\\ -3&2 \end{vmatrix} (-1) \begin{vmatrix} 4&1\\ -3&-1 \end{vmatrix}.

Compute the 2×22\times2 determinants:

1612=126(1)=8,\begin{vmatrix} 1&6\\ -1&2 \end{vmatrix}=1\cdot2-6(-1)=8,4632=426(3)=26,\begin{vmatrix} 4&6\\ -3&2 \end{vmatrix}=4\cdot2-6(-3)=26,4131=4(1)1(3)=1.\begin{vmatrix} 4&1\\ -3&-1 \end{vmatrix}=4(-1)-1(-3)=-1.

Therefore

det(B)=3(8)2(26)+(1)(1)=2452+1=27.\det(B)=3(8)-2(26)+(-1)(-1)=24-52+1=-27.

Expand where the zeros are

Direct expansion is usually expensive. The whole point of cofactor expansion is that you may choose the row or column that makes the work smallest.

Theorem

Cofactor expansion along any row

For any fixed row i of an n×nn\times n matrix A=[aij]A=[a_{ij}],

det(A)=ai1Ai1+ai2Ai2++ainAin.\det(A)=a_{i1}A_{i1}+a_{i2}A_{i2}+\cdots+a_{in}A_{in}.

Equivalently,

det(A)=j=1n(1)i+jaijMij.\det(A)=\sum_{j=1}^n (-1)^{i+j}a_{ij}M_{ij}.

So the definition uses the first row, but the same determinant can be expanded along any row.

Worked example

Choose the row that kills the most work

Let

C=[1977052519801983].C= \begin{bmatrix} 1&9&7&7\\ 0&5&2&5\\ 1&9&8&0\\ 1&9&8&3 \end{bmatrix}.

Expanding along the second row is much better than expanding along the first, because the entry in the first position is already 0:

det(C)=0A21+5A22+2A23+5A24.\det(C)= 0\cdot A_{21} +5A_{22} +2A_{23} +5A_{24}.

Only three 3×33\times3 determinants appear instead of four. In practice, the best row or column is the one with the most zeros or the simplest entries.

Fast consequences of the definition

Several useful theorems fall out almost immediately once you are allowed to expand along a convenient row or column.

Theorem

A zero row or a zero column forces determinant 0

If a square matrix has an entire row of zeros, then its determinant is 0. Likewise, if it has an entire column of zeros, then its determinant is 0.

The row statement is immediate: expand along that zero row. The column statement says the same geometry from the column viewpoint and is also a direct consequence of expansion.

Theorem

A row or column with one nonzero entry collapses the problem

Suppose a square matrix CC has at most one nonzero entry in row k, and that entry is ckc_{k\ell}. Then

det(C)=ck(1)k+det(C(k)).\det(C)=c_{k\ell}(-1)^{k+\ell}\det(C(k\mid \ell)).

The same conclusion holds if column \ell has at most one nonzero entry and it occurs in row k.

This theorem is the formal version of the beginner's instinct: if one row or column is almost all zeros, exploit it immediately.

Theorem

Triangular matrices are easy

If TT is upper triangular or lower triangular, then

det(T)=t11t22tnn,\det(T)=t_{11}t_{22}\cdots t_{nn},

the product of its diagonal entries.

This is why row reduction is so important later. If you can turn a matrix into triangular form while keeping careful track of how the determinant changes, then the final determinant is easy to read.

Worked example

Triangular determinants read off the diagonal

For

T=[234057001],T= \begin{bmatrix} 2&3&4\\ 0&5&7\\ 0&0&-1 \end{bmatrix},

we do not need a full expansion. Since TT is upper triangular,

det(T)=25(1)=10.\det(T)=2\cdot5\cdot(-1)=-10.

The entries above the diagonal matter for the matrix itself, but not for the determinant formula in this triangular case.

Multilinearity and alternating behavior

The determinant is not linear in the whole matrix at once, but it is linear in each individual row when the other rows are held fixed.

Theorem

Multilinearity in one row

Fix all rows of a square matrix except row p. If the new row is

αu+βv,\alpha u+\beta v,

then the determinant splits as

det(same rows except αu+βv)=αdet(same rows except u)+βdet(same rows except v).\det(\text{same rows except }\alpha u+\beta v) =\alpha\det(\text{same rows except }u) +\beta\det(\text{same rows except }v).

So the determinant is linear in each row separately.

Theorem

Repeated rows force determinant 0

If a square matrix has two identical rows, then its determinant is 0.

This fact is one of the basic reasons determinants measure independence rather than mere size. Repeating one row means the matrix no longer contributes a new direction, so the signed area or signed volume collapses.

Proof

Why repeated rows force the determinant to vanish

Common mistake

Common mistake

A determinant belongs to a square matrix only

It is tempting to ask for the determinant of a 2×32\times3 or 3×23\times2 matrix. Do not do that. Determinants are defined only for square matrices, because the recursive minor construction must always delete one row and one column from a square matrix and stay square.

Quick check

Quick check

What is det[4]\det\begin{bmatrix}4\end{bmatrix}?

Remember the base case of the recursive definition.

Solution

Answer

Quick check

Why is it wise to expand a determinant along a row with many zeros?

Think about how many minors survive in the expansion sum.

Solution

Answer

Quick check

If a diagonal matrix has diagonal entries 2, 1-1, and 5, what is its determinant?

Use the triangular-matrix rule.

Solution

Answer

Exercises

Quick check

Compute det[1234]\det\begin{bmatrix}1&2\\3&4\end{bmatrix} from the cofactor definition.

Write the two cofactors in the first row explicitly before multiplying.

Solution

Guided solution

Quick check

Find the determinant of [201030405]\begin{bmatrix}2&0&1\\0&3&0\\4&0&5\end{bmatrix} by expanding along the best row or column.

Pick the row or column with the greatest number of zeros.

Solution

Guided solution

Quick check

Explain why a matrix with one zero row cannot be invertible.

Connect the determinant theorem here with the invertibility theorem from the next note.

Solution

Guided solution

Read 2.1 Matrix basics to review square matrices and indexing language.

Continue with 7.2 Row operations, products, and invertibility to see how determinants behave under elimination.

Keep 5.1 Invertible matrices nearby, because determinants soon become one more equivalent test for invertibility.

Section mastery checkpoint

Answer each question correctly to complete this section checkpoint. Correct progress: 0%.

Skills: determinant, triangular-matrix, cofactor-expansion

If A is an upper triangular 4×4 matrix with diagonal entries 2, -3, 5, and 7, what is det(A)?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Key terms in this unit