# Cofactor

**What is a cofactor?**

A **cofactor** is a number that is obtained by eliminating the row and column of a particular element which is in the form of a square or rectangle. The cofactor is preceded by a negative or positive sign based on the element’s position.

## How to Find the Cofactor?

Let’s consider the following matrix:

\(\begin{bmatrix} 6 & 4 & 3\\ 9 & 2 &5 \\ 1 & 7 & 8 \end{bmatrix}\)To find the cofactor of 2, we put blinders across the 2 and remove the row and column that involve 2, like below:

\(\begin{bmatrix} 6 & 3\\ 1 & 8 \end{bmatrix}\)Now we have the matrix that does not have 2. We can easily find the determinant of a matrix of which will be the cofactor of 2. Multiplying the diagonal elements of the matrix, we get.

- 6 x 8 = 48
- 3 x 1 = 3

Now subtract the value of the second diagonal from the first, i.e, 48 – 3 = 45.

Check the sign that is assigned to the number. Every 3 x 3 determinant carries a sign based on the position of the eliminated element.

The Matrix sign can be represented to write the **cofactor matrix** is given below-

Check the actual location of the 2. You can note that the positive sign is in the previous place of the 2. Hence, the resultant value is +3, or 3.

### Minors and Cofactors

A minor is defined as the determinant of a square matrix that is formed when a row and a column is deleted from a square matrix. The minors are based on the columns and rows that are deleted. For instance, if you eliminate the fourth column and the second row of the matrix, the determinant of the matrix is *M*24.

So co-factors are the number you get when you eliminate the row and column of a designated element in a matrix, which is just a grid in the form of a square or a rectangle. The co-factor is always preceded by a negative (-) or a positive (+) sign, depending on whether the number is in a + or – position.

### Cofactor Formula

Let A be any matrix of order n x n and M_{ij} be the (n – 1) x (n – 1) matrix obtained by deleting the ith row and jth column. Then, det(M_{ij}) is called the minor of a_{ij}. The cofactor C_{ij} of a_{ij} can be found using the formula:

**C _{ij }= (−1)^{i+j }det(M_{ij})**

Thus, cofactor is always represented with +ve (positive) or -ve (negative) signs.

## Solved Examples

**Question 1:** **Find the cofactor matrix of the matrix \(A=\begin{bmatrix} 1 & 9 & 3\\ 2 & 5 & 4\\ 3 & 7 & 8 \end{bmatrix}\)**

**Solution:**

Given matrix is:

\(A=\begin{bmatrix} 1 & 9 & 3\\ 2 & 5 & 4\\ 3 & 7 & 8 \end{bmatrix}\)Let M_{ij} be the minor of elements of the ith row and jth column.

Minor of the elements of matrix A are:

\(M_{11}=\begin{vmatrix} 5 & 4\\ 7 & 8 \end{vmatrix}=40-28=12\\M_{12}=\begin{vmatrix} 2 & 4\\ 3 & 8 \end{vmatrix}=16-12=4\\M_{13}=\begin{vmatrix} 2 & 5\\ 3 & 7 \end{vmatrix}=14-15=-1\\M_{21}=\begin{vmatrix} 9 & 3\\ 7 & 8 \end{vmatrix}=72-21=51\\M_{22}=\begin{vmatrix} 1 & 3\\ 3 & 8 \end{vmatrix}=8-9=-1\\M_{23}=\begin{vmatrix} 1 & 9\\ 3 & 7 \end{vmatrix}=7-27=-20\\M_{31}=\begin{vmatrix} 9 & 3\\ 5 & 4 \end{vmatrix}=36-15=21\\M_{32}=\begin{vmatrix} 1 & 3\\ 2 & 4 \end{vmatrix}=4-6=-2\\M_{33}=\begin{vmatrix} 1 & 9\\ 2 & 5 \end{vmatrix}=5-18=-13\)Matrix of cofactors of A is:

\(=\begin{bmatrix} +12 & -4 & +(-1)\\ -51 & +(-1) & -(-20)\\ +21 & -(-2) & +(-13) \end{bmatrix}\) \(=\begin{bmatrix} 12 & -4 & -1\\ -51 & -1 & 20\\ 21 & 2 & -13 \end{bmatrix}\)

**Question 2:** **If the cofactor of the element a _{11} of the matrix \(A=\begin{bmatrix} 2 & -3 & 5\\ 6 & 0 & p\\ 1 &5 & -7 \end{bmatrix}\) is -20, then find the value of p.**

**Solution:** Given matrix is:

Using the formula of cofactor of an element,

C_{ij }= (−1)^{i+j }det(M_{ij})

Cofactor of a_{11} is:

C_{11} = (-1)^{1+1} det(M_{11})

-20 = 0 – 5p

-20 = -5p

⇒ 5p = 20

⇒ p = 20/5

⇒ p = 4

Hence, the value of p is 4.

Learn more on the topics like Matrices, operation on matrices, determinants, inverse matrices etc. with BYJU’S.