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
For more JoeCMath linear algebra videos, use the linear algebra playlist.