In this post we explain what the cofactor matrix is and how to find it. Also, you’ll find examples of 2×2 and 3×3 cofactors matrices, so that you can perfectly understand how to compute the cofactor matrix.

However, to comprehend the cofactor matrix, you need to know what a cofactor is. So, first we’ll see how to calculate a cofactor and then how to find a cofactor matrix.

Table of Contents

## What is a cofactor?

The **cofactor of an element** of a matrix is the determinant obtained by eliminating the row and the column of that element. However, the sign of the cofactor depends on the position of the element.

Thus, the formula to compute the i, j cofactor of a matrix is as follows:

Where M_{ij} is the i, j minor of the matrix, that is, the determinant that results from deleting the i-th row and the j-th column of the matrix.

For example, let A be a 2×2 square matrix:

We can compute the cofactor of element 1 by applying the formula (first row and second column):

The minor of 1 is the determinant of the matrix that we get by removing the row and the column where the 1 is. So we have to delete the first row and the second column:

So to find the cofactor of 1 we simply have to compute the 2×2 determinant and the multiplication:

## How to find the cofactor matrix

The cofactor matrix is the matrix obtained by replacing each element of a matrix by its cofactor. Thus:

To find the **cofactor matrix**, compute the cofactor of each element in the matrix and replace each element by its cofactor.

Once we’ve seen the definition of cofactor matrix, let’s see two examples of how to compute the cofactor matrix.

## Example of a 2×2 cofactor matrix

We are going to find the cofactor matrix of the following matrix of order 2:

First we have to calculate the cofactor of each entry of the matrix. So we compute all cofactors of the matrix with the formula seen above:

Now we simply have to replace each element of matrix A by its cofactor to find the cofactor matrix of A:

## Example of a 3×3 cofactor matrix

We are going to compute the cofactor matrix of the following matrix of order 3:

First we have to find the cofactor of each element of the matrix. So we find all cofactors of the matrix using the formula:

And finally, we substitute each element of matrix B for its cofactor to determine the cofactor matrix of B:

➤ See also: upper triangular matrix

## Applications of the cofactor matrix

Once we have seen the meaning of the cofactor matrix and we already know how it is found, let’s see what the cofactor matrix is for.

The cofactor matrix is the step before finding the adjugate matrix (or adjoint of a matrix), since the adjugate matrix is the transpose of the cofactor matrix.

For example, in the previous section we have calculated the cofactor matrix of matrix B:

Then, the adjoint of matrix B is the transpose of its cofactor matrix:

The adjoint of matrix may seem a simple type of matrix, but it is not. See all properties of the adjoint of a matrix.

Also, the adjugate matrix is used to compute the inverse of a matrix. See matrix inversion.