# Section 3.1 The Cofactor Expansion

Question: We know the determinant of a $2 \times 2$ matrix. How about the determinant of an $n \times n$ matrix?

We know that if a $2 \times 2$ matrix is invertible if and only if det$A \neq 0$. If we want to define the determinant of an $n \times n$ matrix then we would want the similar property as the $2 \times 2$ matrix case.

Recall that a $2 \times 2$ matrix is invertible if and only if it is row equivalent to the $2 \times 2$ identity matrix. Here is how we operate the row reduction on a $2 \times 2$ matrix:

$A = \begin{bmatrix}a_{11} & a_{12}\\a_{21} & a_{22}\end{bmatrix} \sim \begin{bmatrix}a_{11} & a_{12}\\a_{11}a_{21} & a_{11}a_{22}\end{bmatrix} \sim \begin{bmatrix}a_{11} & a_{12}\\ & a_{11}a_{22} - a_{12}a_{21}\end{bmatrix}$

When $A$ is equivalent to identity matrix, we must have det$A$ is nonzero. Similarly, we can have the row operation on an $3 \times 3$ matrix:

$A = \begin{bmatrix}a_{11} & a_{12} & a_{13}\\a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\end{bmatrix} \sim \begin{bmatrix}a_{11} & a_{12} & a_{13}\\a_{11}a_{21} & a_{11}a_{22} & a_{11}a_{23}\\a_{11}a_{31} & a_{11}a_{32} & a_{11}a_{33}\end{bmatrix} \sim \begin{bmatrix}a_{11} & a_{12} & a_{13}\\0 & a_{11}a_{22} - a_{21}a_{12} & a_{11}a_{23} - a_{21}a_{13}\\0 & a_{11}a_{32} - a_{31}a_{12} & a_{11}a_{33} - a_{31}a_{13}\end{bmatrix} \sim \begin{bmatrix}a_{11} & a_{12} & a_{13}\\0 & a_{11}a_{22} - a_{21}a_{12} & a_{11}a_{23} - a_{21}a_{13}\\0 & 0 & a_{11}\triangle \end{bmatrix}$

where $\triangle = a_{11}a_{22}a_{33} + a_{12}a_{23}a_{31} + a_{13}a_{21}a_{32} - a_{11}a_{23}a_{32} - a_{12}a_{21}a_{33} - a_{13}a_{22}a_{31}$. If $A$ is equivalent to the $3 \times 3$ identity matrix then $\triangle$ must be nonzero. It is naturally to define the determinant of the $3 \times 3$ matrix $A$ as $\triangle$. But how about $4 \times 4$ matrix?

Notice that

$\triangle = a_{11}$det$\begin{bmatrix}a_{22} & a_{23}\\a_{32} & a_{33}\end{bmatrix} - a_{12}$det$\begin{bmatrix}a_{21} & a_{23}\\a_{31} & a_{33}\end{bmatrix} + a_{13}$det$\begin{bmatrix}a_{21} & a_{22}\\a_{31} & a_{32}\end{bmatrix} = a_{11}$det$A_{11} - a_{12}$det$A_{12} + a_{13}$det$A_{13}$

where $A_{11}$ is coming from deleting first row and first column of $A$ or the row and the column of the $a_{11}, A_{12}$ is coming from deleting first row and the second column of $A$ or the row and the column of a_{12}, and $A_{13}$ is coming from deleting first row and third column of $A$ or the row and the column of $a_{13}$.

We use $\triangle = a_{11}$det$A_{11} - a_{12}$det$A_{12} + a_{13}$det$A_{13}$ to extend to the determinant of $n \times n$ matrix $A$.

Definition: Let $n \geq 2$, the determinant of an $n \times n$ matrix $A = \begin{bmatrix}a_{ij}\end{bmatrix}$ is the following

det$A = a_{11}$det$A_{11} - a_{12}$det$A_{12} + a_{13}$det$A_{13} - a_{14}$det$A_{14} + \cdots + (-1)^{1+n}a_{1n}$det$A_{1n} = \sum_{n}^{j = 1}(-1)^{1j}$det$A_{1j}$

where $A_{1j}$ is the submatrix of $A$ by deleting the first row and $j$-th column of $A$ or the row and the column of $a_{1j}$.

Example 1: Compute the determinant of $A = \begin{bmatrix}1 & -2 & 3\\0 & -1 & 4\\2 & 4 & -2\end{bmatrix}$.

Exercise 1: Compute the determinant of $A = \begin{bmatrix}0 & 2 & -2\\1 & 0 & 5\\-1 & 4 & -2\end{bmatrix}$.

Definition: Given $A=\begin{bmatrix}a_{ij}\end{bmatrix}$, the ($i, j$)-cofactor of $A$ is the number $C_{ij} = (-1)^{i+j}$det$A_{ij}$ where $A_{ij}$ is the submtrix of $A$ by deleting $i$-th row and $j$-th column of $A$. Then

det$A = a_{11}C_{11} + a_{12}C_{12} + \cdots + a_{1n}C_{1n}$

is called a cofactor expansion across the first row of $A$.

Theorem: The determinant of an $n \times n$ matrix $A$ can be computed by a cofactor expansion across any row or down any column. The expansion across the $i$-th row is the following:

det$A = a_{i1}C_{i1} + a_{i2}C_{i2} + \cdots + a_{in}C_{in}$

The cofactor expansion down the $j$-th column is

det$A = a_{1j}C_{1j} + a_{2j}C_{2j} + \cdots + a_{nj}C_{nj}$

Example 2: Use cofactor expansion across third row to compute det$A$ and then use the cofactor expansion across second column to compute det$A$, where $A = \begin{bmatrix}1 & 0 & -1\\0 & 2 & 3\\3 & 4 & -2\end{bmatrix}$.

Exercise 2: Use cofactor expansion across third row to compute det$A$ and then use the cofactor expansion across second column to compute det$A$, where $A = \begin{bmatrix}2 & -1 & 1\\1 & 0 & 3\\0 & 4 & -2\end{bmatrix}$.

Example 3: Compute determinant $A = \begin{bmatrix}2 & 1 & -2 & 1 & 4\\-1 & 0 & 1 & -1 & 2\\0 & 0 & 3 & 0 & 0\\1 & 0 & 2 & -3 & 1\\2 & 0 & 1 & 3 & 0\end{bmatrix}$.

Exercise 3: Compute determinant $A = \begin{bmatrix}2 & 0 & -2 & 1 & 0\\-1 & 0 & 1 & -1 & 2\\3 & 0 & 0 & 0 & 0\\1 & 1 & 2 & -3 & -2\\2 & 0 & 1 & 3 & 1\end{bmatrix}$.

Definition: A matrix is called a triangular matrix if $A$ has either upper diagonal or lower diagonal entries that are nonzero.

Theorem: If $A$ is a triangular matrix then det$A$ is the product of the entries on the main diagonal.

Fact: For an $3 \times 3$ matrix $A = \begin{bmatrix}a_{11} & a_{12} & a_{13}\\a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\end{bmatrix}$, one can compute the determinant as the following: 1: write the first two columns of $A$ after the third column of $A$ then the determinant of $A$ is the sum of products of diagonal minus the sum of products of anti-diagonal.

Example 4: Compute determinant $A$ using the fact above. $A = \begin{bmatrix}1 & 2 & 3\\-2 & -3 & 4\\0 & 3 & 5\end{bmatrix}$.

Exercise 4: Compute determinant $A$ using the fact above. $A = \begin{bmatrix}0 & 1 & 3\\-2 & -3 & 3\\1 & 2 & 4\end{bmatrix}$.

Group Work 1: Mark each statement True or False. Justify each answer. All matrices are $n \times n$ matrices.

a. The determinant of an $n \times n$ matrix is defined by the $(n-1) \times (n-1)$ submatrices.

b. The $(i, j)$-cofactor of a matrix $A = \begin{bmatrix}a_{ij}\end{bmatrix}$ is the matrix $A_{ij}$ obtained by deleting from $A$ its $i$-th column and $j$-th row.

c. det$(2A) = 2$ det$A$ when $A$ is a $2 \times 2$ matrix.

d. If $A$ has a row or column consisting of zeros then det$A = 0$.

e. The cofactor expansion of det$A$ down a column is the negative of the cofactor down a row.

f. The determinant of a triangular matrix is the sum of the diagonal matrix.

g. det$(-A)$ = det$A$.

Group Work 2: Compute the determinant.

$E_{1} = \begin{bmatrix}1 & 0 & 0\\0 & 1 & 0\\k & 0 & 1\end{bmatrix}$

$E_{2} = \begin{bmatrix}0 & 1 & 0\\1 & 0 & 0\\0 & 0 & 1\end{bmatrix}$

$E_{3} = \begin{bmatrix}1 & 0 & 0\\0 & c & 0\\0 & 0 & 1\end{bmatrix}$

Group Work 3: Compute det$AB$, det$A$ and det$B$. Find a relationship between them.

$A = \begin{bmatrix}1 & 3 & 0\\1 & 2 & -2\\0 & 0 & 1\end{bmatrix}$

$B = \begin{bmatrix}-2 & 5 & -2\\1 & 0 & 4\\3 & 0 & 1\end{bmatrix}$

Group Work 4: n each case either prove the statement or give an example showing that it is false. All matrices are $n \times n$ matrices.

a. det$(A+B) =$det$A +$det$B$.

b. If det$A = 0$, then $A$ has two equal rows.

c. If $R$ is the reduced row-echelon form of $A$, then det$A=$det$R$.

d. If det$A=$det$B$ then $A = B$.

Group Work 5: Find the relationship between det$A$ and det$cA$ where $c$ is a scalar.

Group Work 6: If $B$ is obtained by multiply a number $c$ to one row of the matrix $A$. Find the relationship between det$A$ and det$B$.

Group Work 7: If $B$ is obtained by switching two rows of the matrix $A$, find the relationship between det$A$ and det$B$.