# Cofactor (mathematics)

In mathematics, a **cofactor** is a component of a matrix computation of the matrix determinant.

Let *M* be a square matrix of size *n*. The (*i*,*j*) **minor** refers to the determinant of the (*n*-1)×(*n*-1) submatrix *M*_{i,j} formed by deleting the *i*-th row and *j*-th column from *M* (or sometimes just to the submatrix *M*_{i,j} itself). The corresponding *cofactor* is the signed determinant

The **adjugate matrix** adj *M* is the square matrix whose (*i*,*j*) entry is the (*j*,*i*) cofactor. We have

which encodes the rule for expansion of the determinant of *M* by any the cofactors of any row or column.
This expression shows that if det *M* is invertible, then *M* is invertible and the matrix inverse is determined as

## Example

Consider the following example matrix,

Its minors are the determinants (bars indicate a determinant):

The adjugate matrix of *M* is

and the inverse matrix is

Indeed,

and the other matrix elements of the product follow likewise.

## References

- C.W. Norman (1986).
*Undergraduate Algebra: A first course*. Oxford University Press, 306,310,315. ISBN 0-19-853248-2.