 # 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 $M_{ij}$ be the (n – 1) x (n – 1) matrix obtained by deleting the $i^{th}$ row and $j^{th}$ column. Then, $detM_{ij}$ is called the minor of $a_{ij}$.  The cofactor $A_{ij}$ of $a_{ij}$ is defined by:

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

### Solved Examples

Example: Let $\large \begin{pmatrix} 2 & 5 & -1\\ 0 & 3 & 4\\ 1 & -2 & -5 \end{pmatrix}$
Then,
$\large M_{32}=\bigl(\begin{matrix} 2 & -1\\ 0 & 4 \end{matrix}\bigr)$
So the minor of $a_{32}$ 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

$A_{23}=(-1)^{2+3}(8)=-8$