# Definition:Cofactor

## Definition

Let $R$ be a commutative ring with unity.

Let $\mathbf A \in R^{n \times n}$ be a square matrix of order $n$.

Let:

$D = \begin{vmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn}\end{vmatrix}$

be a determinant of order $n$.

### Cofactor of an Element

Let $a_{r s}$ be an element of $D$.

Let $D_{r s}$ be the determinant of order $n-1$ obtained from $D$ by deleting row $r$ and column $s$.

Then the cofactor $A_{r s}$ of the element $a_{r s}$ is defined as:

$A_{r s} := \paren {-1}^{r + s} D_{r s}$

### Cofactor of a Minor

Let $D \left({r_1, r_2, \ldots, r_k \mid s_1, s_2, \ldots, s_k}\right)$ be a order-$k$ minor of $D$.

Then the cofactor of $D \left({r_1, r_2, \ldots, r_k \mid s_1, s_2, \ldots, s_k}\right)$ can be denoted:

$\tilde D \left({r_1, r_2, \ldots, r_k \mid s_1, s_2, \ldots, s_k}\right)$

and is defined as:

$\tilde D \left({r_1, r_2, \ldots, r_k \mid s_1, s_2, \ldots, s_k}\right) = \left({-1}\right)^t D \left({r_{k+1}, r_{k+2}, \ldots, r_n \mid s_{k+1}, s_{k+2}, \ldots, s_n}\right)$

where:

$t = r_1 + r_2 + \ldots + r_k + s_1 + s_2 + \ldots s_k$
$r_{k+1}, r_{k+2}, \ldots, r_n$ are the numbers in $1, 2, \ldots, n$ not in $\left\{{r_1, r_2, \ldots, r_k}\right\}$
$s_{k+1}, s_{k+2}, \ldots, s_n$ are the numbers in $1, 2, \ldots, n$ not in $\left\{{s_1, s_2, \ldots, s_k}\right\}$

That is, the cofactor of a minor is the determinant formed from the rows and columns not in that minor, multiplied by the appropriate sign.

When $k = 1$, this reduces to the cofactor of an element (as above).

When $k = n$, the "minor" is in fact the whole determinant.

For convenience its cofactor is defined as being $1$.

Note that the cofactor of the cofactor of a minor is the minor itself (multiplied by the appropriate sign).

## Examples

Let $D$ be the determinant defined as:

$D = \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33}\end{vmatrix}$

Then the cofactor of $a_{2 1}$ is defined as:

 $\displaystyle A_{21}$ $=$ $\displaystyle \left({-1}\right)^3 D_{21}$ $\displaystyle$ $=$ $\displaystyle \left({-1}\right)^3 \begin{vmatrix} a_{12} & a_{13} \\ a_{32} & a_{33} \end{vmatrix}$ $\displaystyle$ $=$ $\displaystyle -1 \left({a_{12} a_{33} - a_{13} a_{32} }\right)$ $\displaystyle$ $=$ $\displaystyle a_{13} a_{32} - a_{12} a_{33}$

Let:

$D = \begin{vmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44} \\ \end{vmatrix}$

Let $D \left({2, 3 \mid 2, 4}\right)$ be an order-$2$ minor of $D$.

Then the cofactor of $D \left({2, 3 \mid 2, 4}\right)$ is given by:

 $\displaystyle \tilde D \left({2, 3 \mid 2, 4}\right)$ $=$ $\displaystyle \left({-1}\right)^{2 + 3 + 2 + 4} D \left({1, 4 \mid 1, 3}\right)$ $\displaystyle$ $=$ $\displaystyle \left({-1}\right)^{11} \begin{vmatrix} a_{11} & a_{13} \\ a_{41} & a_{43} \\ \end{vmatrix}$ $\displaystyle$ $=$ $\displaystyle - \left({a_{11} a_{43} - a_{41} a_{13} }\right)$ $\displaystyle$ $=$ $\displaystyle a_{41} a_{13} - a_{11} a_{43}$