Cofactor matrix

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.

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:

C_{i,j}=(-1)^{i+j}\cdot M_{ij}

Where Mij 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:

 \displaystyle A = \left( \begin{array}{ccc} 6 & \color{red}\bm{1} & 7 \\[1.1ex] 3 & 2 & 0 \\[1.1ex] 5 & 8 & 4 \end{array} \right)

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

C_{1,2}&=(-1)^{1+2}\cdot M_{1,2}

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:

    \left( \begin{tabular}{ccc} \cellcolor[HTML]{F5B7B1}6 & \cellcolor[HTML]{F5B7B1}1 & \cellcolor[HTML]{F5B7B1}7 \\ & \cellcolor[HTML]{F5B7B1} & \\[-2ex] 3 & \cellcolor[HTML]{F5B7B1}2 & 0 \\ & \cellcolor[HTML]{F5B7B1} & \\[-2ex] 5 &  \cellcolor[HTML]{F5B7B1}8 & 4                    \end{tabular} \right)

\begin{aligned}C_{1,2}&=(-1)^{1+2}\cdot M_{1,2} \\[2ex]& =(-1)^3\cdot\begin{vmatrix} 3 & 0 \\[1.1ex] 5 & 4 \end{vmatrix}\end{aligned}

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

\begin{aligned}C_{1,2}&=(-1)^{1+2}\cdot M_{1,2} \\[2ex]& =(-1)^3\cdot\begin{vmatrix} 3 & 0 \\[1.1ex] 5 & 4 \end{vmatrix}\\[2ex]&=-1\cdot12\\[2ex]&=-12\end{aligned}

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:

\displaystyle A  =  \begin{pmatrix} 4 & -1 \\[1.1ex] 3 & 2  \end{pmatrix}

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:

C_{i,j}=(-1)^{i+j}\cdot M_{ij}

\text{Cofactor of 4} \ \longrightarrow \ \displaystyle C_{11}=(-1)^{1+1} \cdot \begin{vmatrix} 2 \end{vmatrix}=1\cdot2=2

\text{Cofactor of -1} \ \longrightarrow \ \displaystyle C_{12}=(-1)^{1+2} \cdot\begin{vmatrix} 3 \end{vmatrix}=-1\cdot3=-3

\text{Cofactor of 3} \ \longrightarrow \ \displaystyle C_{21}=(-1)^{2+1} \cdot\begin{vmatrix} -1 \end{vmatrix}=-1\cdot(-1)=1

\text{Cofactor of 2} \ \longrightarrow \ \displaystyle C_{22}=(-1)^{2+2} \cdot\begin{vmatrix} 4 \end{vmatrix}=1\cdot4=4

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

\begin{pmatrix}2& -3\\[1.1ex]1&4\end{pmatrix}

Example of a 3×3 cofactor matrix

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

\displaystyle B=\begin{pmatrix} 1 & 3 & -1 \\[1.1ex] 2 & 4 & 0 \\[1.1ex] 5 & 0 & -2 \end{pmatrix}

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

C_{i,j}=(-1)^{i+j}\cdot M_{ij}

\text{Cofactor of 1} \ \longrightarrow \ \displaystyle C_{11}=(-1)^{1+1}\cdot\begin{vmatrix} 4 & 0 \\[1.1ex] 0 & -2\end{vmatrix} = 1 \cdot (-8) =-8

\text{Cofactor of 3} \ \longrightarrow \ \displaystyle C_{12}= (-1)^{1+2}\cdot\begin{vmatrix}  2 & 0 \\[1.1ex] 5 & -2\end{vmatrix} = -1 \cdot (-4) = 4

\text{Cofactor of -1} \ \longrightarrow \ \displaystyle C_{13}= (-1)^{1+3}\cdot\begin{vmatrix} 2 & 4 \\[1.1ex] 5 & 0\end{vmatrix} = 1 \cdot (-20) =-20

\text{Cofactor of 2} \ \longrightarrow \ \displaystyle C_{21}= (-1)^{2+1}\cdot\begin{vmatrix} 3 & -1 \\[1.1ex] 0 & -2\end{vmatrix} = -1 \cdot (-6)=6

\text{Cofactor of 4} \ \longrightarrow \ \displaystyle C_{22}= (-1)^{2+2}\cdot\begin{vmatrix} 1 & -1 \\[1.1ex] 5 & -2\end{vmatrix} = 1 \cdot 3=3

\text{Cofactor of 0} \ \longrightarrow \ \displaystyle C_{23}=(-1)^{2+3}\cdot\begin{vmatrix} 1 & 3  \\[1.1ex] 5 & 0 \end{vmatrix} = -1 \cdot (-15)=15

\text{Cofactor of 5} \ \longrightarrow \ \displaystyle C_{31}= (-1)^{3+1}\cdot\begin{vmatrix} 3 & -1 \\[1.1ex] 4 & 0 \end{vmatrix} = 1 \cdot 4=4

\text{Cofactor of 0} \ \longrightarrow \ \displaystyle C_{32}= (-1)^{3+2}\cdot\begin{vmatrix} 1 & -1 \\[1.1ex] 2 & 0\end{vmatrix} = -1 \cdot 2 =-2

\text{Cofactor of -2} \ \longrightarrow \ \displaystyle C_{33}=(-1)^{3+3}\cdot\begin{vmatrix} 1 & 3 \\[1.1ex] 2 & 4 \end{vmatrix} = 1 \cdot (-2) =-2

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

 \begin{pmatrix}-8&4&-20\\[1.1ex]6&3&15\\[1.1ex]4&-2&-2\end{pmatrix}

➤ 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:

\displaystyle B=\begin{pmatrix} 1 & 3 & -1 \\[1.1ex] 2 & 4 & 0 \\[1.1ex] 5 & 0 & -2 \end{pmatrix} \ \longrightarrow \ \begin{pmatrix}-8&4&-20\\[1.1ex]6&3&15\\[1.1ex]4&-2&-2\end{pmatrix}

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

 \text{Adj}\displaystyle (B)= \begin{pmatrix}-8&6&4\\[1.1ex]4&3&-2\\[1.1ex]-20&15&-2\end{pmatrix}

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.

Leave a Comment

Your email address will not be published.

Scroll to Top