JoeCMath

Cofactor Expansion

This page follows the JoeCMath video on finding determinants with cofactor expansion. The video starts by writing the general cofactor expansion formulas, then works through a $3\times 3$ determinant and a $4\times 4$ determinant.

Main Idea

For an $n\times n$ matrix $A$, the cofactor of entry $a_{ij}$ is:

\[C_{ij}=(-1)^{i+j}M_{ij}\]

where $M_{ij}$ is the determinant of the matrix left after deleting row $i$ and column $j$.

Expanding across row $i$ looks like:

\[\det(A)=\sum_{j=1}^{n} a_{ij}C_{ij}\]

Expanding down column $j$ looks like:

\[\det(A)=\sum_{i=1}^{n} a_{ij}C_{ij}\]

The sign of $(-1)^{i+j}$ is determinant by the values in the row or column chosen for cofactor expansion. For the first few rows and columns, the sign pattern is:

\[\begin{bmatrix} + & - & + & - \\ - & + & - & + \\ + & - & + & - \\ - & + & - & + \end{bmatrix}\]

The 3 By 3 Example

The first worked matrix in the video is:

\[A= \begin{bmatrix} 1 & 7 & 5 \\ 4 & 3 & 8 \\ 6 & 9 & 2 \end{bmatrix}\]

The video expands across the first row, so:

\[\det(A)=1C_{11}+7C_{12}+5C_{13}\]

Now replace each cofactor with its signed minor.

For $C_{11}$, delete row $1$ and column $1$:

\[C_{11}=(-1)^{1+1} \begin{vmatrix} 3 & 8 \\ 9 & 2 \end{vmatrix} =3(2)-8(9)=-66\]

For $C_{12}$, delete row $1$ and column $2$:

\[C_{12}=(-1)^{1+2} \begin{vmatrix} 4 & 8 \\ 6 & 2 \end{vmatrix} =-\left(4(2)-8(6)\right)=40\]

For $C_{13}$, delete row $1$ and column $3$:

\[C_{13}=(-1)^{1+3} \begin{vmatrix} 4 & 3 \\ 6 & 9 \end{vmatrix} =4(9)-3(6)=18\]

Substitute those values back into the expansion:

\[\det(A)=1(-66)+7(40)+5(18)\]

So:

\[\det(A)=-66+280+90=304\]

Watch this part: start the $3\times 3$ example at 1:21.

Why Another Row Or Column Works

A determinant does not depend on which row or column you choose for cofactor expansion. The video checks the same $3\times 3$ determinant by expanding along other rows and columns, and the value still comes back to $304$.

That is useful, but it is not a reason to pick a random row every time. The point is to choose a row or column that makes the work shorter.

Zeros are valuable because every zero entry reduces $0\cdot (\text{some cofactor})=0$, which reduces computation while doing cofactor expansion.

The 4 By 4 Example

The second worked matrix is:

\[B= \begin{bmatrix} 1 & 2 & 0 & 0 \\ 3 & 5 & 0 & 0 \\ 3 & 4 & 1 & 1 \\ 6 & 8 & 0 & 1 \end{bmatrix}\]

The third column has three zeros:

\[\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}\]

That makes column $3$ the natural choice. Expanding down column $3$ gives:

\[\det(B)=0C_{13}+0C_{23}+1C_{33}+0C_{43}\]

All the zero terms disappear:

\[\det(B)=C_{33}\]

Now compute $C_{33}$:

\[C_{33}=(-1)^{3+3} \begin{vmatrix} 1 & 2 & 0 \\ 3 & 5 & 0 \\ 6 & 8 & 1 \end{vmatrix}\]

Since $(-1)^{6}=1$, this is just the $3\times 3$ determinant:

\[\begin{vmatrix} 1 & 2 & 0 \\ 3 & 5 & 0 \\ 6 & 8 & 1 \end{vmatrix}\]

Expand that smaller determinant down its third column:

\[\begin{vmatrix} 1 & 2 & 0 \\ 3 & 5 & 0 \\ 6 & 8 & 1 \end{vmatrix} =1 \begin{vmatrix} 1 & 2 \\ 3 & 5 \end{vmatrix}\]

Now finish with the $2\times 2$ determinant:

\[1\left(1(5)-2(3)\right)=5-6=-1\]

So:

\[\det(B)=-1\]

Watch this part: choose the zero-heavy column at 8:37.

Timestamp Guide

Moment What is shown Video
Introduction Cofactor expansion overview 0:00
Row formula General expansion across rows 0:27
Column formula General expansion down columns 1:06
$3\times 3$ example Start the first determinant 1:21
First cofactor Replace $C_{11}$ 1:59
Second cofactor Replace $C_{12}$ 3:05
Third cofactor Replace $C_{13}$ 3:21
Sign pattern Connect $(-1)^{i+j}$ to the sign chart 3:41
Minors Use $2\times 2$ determinants for the cofactors 5:08
First result Finish the $3\times 3$ determinant 5:36
Check another column Validate the same determinant another way 6:34
Choose wisely Look for the row or column with the most zeros 8:08
$4\times 4$ example Expand down the zero-heavy column 8:37
Smaller determinant Reduce the $4\times 4$ determinant to a $3\times 3$ determinant 9:51
Final result Finish the $4\times 4$ determinant 10:56
Takeaways Review the cofactor expansion strategy 11:10

For more JoeCMath linear algebra videos, use the linear algebra playlist.