# Section 3.3 $\quad$ Cofactor Expansion

## Definition of Minor

Let $A = [a_{ij}]$ be an $n\times n$ matrix. <br /><br /><br /><br />

## Definition of Cofactor

Let $A = [a_{ij}]$ be an $n\times n$ matrix. <br /><br /><br /><br />

### Example 1

Find the cofactors $A_{12}$ and $A_{23}$ if
\begin{equation*}
  A =
  \left[
    \begin{array}{ccc}
      4 & 3 & 2 \\
      4 & -2 & 5 \\
      2 & 4 & 6 \\
    \end{array}
  \right]
\end{equation*}


```python
from sympy import *

A = Matrix([[4, 3, 2], [4, -2, 5], [2, 4, 6]]);

A.cofactor(0, 1), A.cofactor(1, 2)
```




    (-14, -10)



>**Theorem (cofactor expansion)** Let $A = [a_{ij}]$ be an $n\times n$ matrix. Then<br /><br />
\begin{equation*}
det(A) = \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad
\end{equation*}
<br /><br />
and<br /><br />
\begin{equation*}
det(A) = \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad
\end{equation*}
<br /><br /><br /><br />

### Example 2

Find the determinant of
\begin{equation*}
  A = \left[
    \begin{array}{cccc}
      1 & 2 & -3 & 4 \\
      -4 & 2 & 1 & 3 \\
      3 & 0 & 0 & -3 \\
      2 & 0 & -2 & 3 \\
    \end{array}
  \right]
\end{equation*}


```python
from sympy import *

A = Matrix([[1, 2, -3, 4], [-4, 2, 1, 3], [3, 0, 0, -3], [2, 0, -2, 3]]);

A.det()
```




    48



### Example 3

Find all values of $t$ for which
\begin{equation*}
  det\left[
    \begin{array}{ccc}
      t-1 & 0 & 1 \\
      2 & t+2 & -1 \\
      0 & 0 & t+1 \\
    \end{array}
  \right] = 0
\end{equation*}


```python
from sympy import *

t = symbols('t');
A = Matrix([[t-1, 0, 1], [2, t+2, -1], [0, 0, t+1]]);

solve(A.det())
```




    [-2, -1, 1]



eca21d38460f76969cd86b3e6483f00195a40cdc
ipynb
Jupyter Notebook
Jupyter_Notes/Lecture10_Sec3-3_CofactorExpansion.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture10_Sec3-3_CofactorExpansion.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture10_Sec3-3_CofactorExpansion.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Qwen/Qwen-72B
1. YES
2. YES