# Cofactor Formula

A Cofactor, in mathematics, is used to find the inverse of the matrix, adjoined. The Cofactor is the number you get when you remove the column and row of a designated element in a matrix, which is just a numerical grid in the form of rectangle or a square.

The cofactor is always preceded by a positive (+) or negative (-) sign. Let A be an n x n matrix and let

$$\begin{array}{l}M_{ij}\end{array}$$
be the (n – 1) x (n – 1) matrix obtained by deleting the
$$\begin{array}{l}i^{th}\end{array}$$
row and
$$\begin{array}{l}j^{th}\end{array}$$
column. Then,
$$\begin{array}{l}detM_{ij}\end{array}$$
is called the minor of
$$\begin{array}{l}a_{ij}\end{array}$$
.  The cofactor
$$\begin{array}{l}A_{ij}\end{array}$$
of
$$\begin{array}{l}a_{ij}\end{array}$$
is defined by:

$\LARGE A_{ij}=(-1)^{i+j}\; \det\;M_{ij}$

### Solved Examples

Example: Let
$$\begin{array}{l}\large \begin{pmatrix} 2 & 5 & -1\\ 0 & 3 & 4\\ 1 & -2 & -5 \end{pmatrix}\end{array}$$

Then,
$$\begin{array}{l}\large M_{32}=\bigl(\begin{matrix} 2 & -1\\ 0 & 4 \end{matrix}\bigr)\end{array}$$
So the minor of
$$\begin{array}{l}a_{32}\end{array}$$
is the determinant of this 2 x 2 matrix.

Since the matrix is triangular, the determinant is the product of the diagonals.

(2) (4) = 8

$$\begin{array}{l}A_{32}=(-1)^{3+2}(8)=-8\end{array}$$