# Cofactor Matrix Calculator

Created by Anna Szczepanek, PhD
Reviewed by Wojciech Sas, PhD and Jack Bowater
Last updated: Nov 03, 2022

Welcome to Omni's cofactor matrix calculator! Don't hesitate to make use of it whenever you need to find the matrix of cofactors of a given square matrix. If you want to learn how we define the cofactor matrix, or look for the step-by-step instruction on how to find the cofactor matrix, look no further! Scroll down to find an article where you can find even more: we will tell you how to quickly and easily compute the cofactor 2×2 matrix and reveal the secret of finding the inverse matrix using the cofactor method!

Are you looking for the cofactor method of calculating determinants? Visit our dedicated cofactor expansion calculator!

## How do we define the cofactor matrix?

The cofactor matrix of a given square matrix consists of first minors multiplied by sign factors:

• The first minor is the determinant of the matrix cut down from the original matrix by deleting one row and one column. To learn about determinants, visit our determinant calculator.
• The sign factor is -1 if the index of the row that we removed plus the index of the column that we removed is equal to an odd number; otherwise, the sign factor is 1.

More formally, let A be a square matrix of size n × n. Consider i,j=1,...,n.

• The (i, j)-minor is the determinant of the (n-1) × (n-1) submatrix of A formed by removing the i-th row and j-th column.
• The sign factor is (-1)i+j.
• Multiplying the minor by the sign factor, we obtain the (i, j)-cofactor.

Putting all the individual cofactors into a matrix results in the cofactor matrix. Don't worry if you feel a bit overwhelmed by all this theoretical knowledge - in the next section, we will turn it into step-by-step instruction on how to find the cofactor matrix. First, however, let us discuss the sign factor pattern a bit more.

#### Sign factor pattern

Formally, the sign factor is defined as (-1)i+j, where i and j are the row and column index (respectively) of the element we are currently considering. In fact, the signs we obtain in this way form a nice alternating pattern, which makes the sign factor easy to remember:

As you can see, the pattern begins with a "+" in the top left corner of the matrix and then alternates "-/+" throughout the first row. The second row begins with a "-" and then alternates "+/−", etc.

## How to find the cofactor matrix?

Suppose A is an n × n matrix with real or complex entries. To find the cofactor matrix of A, follow these steps:

1. Cross out the i-th row and the j-th column of A. You obtain a (n - 1) × (n - 1) submatrix of A.

2. Compute the determinant of this submatrix. You have found the (i, j)-minor of A.

3. Determine the sign factor (-1)i+j.

4. Multiply the (i, j)-minor of A by the sign factor. The result is exactly the (i, j)-cofactor of A!

5. Repeat Steps 1-4 for all i,j = 1,...,n.

👉 If you ever need to calculate the adjoint (aka adjugate) matrix, remember that it is just the transpose of the cofactor matrix of A. Learn more in the adjoint matrix calculator.

## Cofactor matrix 2×2

As an example, let's discuss how to find the cofactor of the 2 x 2 matrix:

$\qquad \small \begin{bmatrix} a & b \\ c & d \end{bmatrix}$

There are four coefficients, so we will repeat Steps 1, 2, and 3 from the previous section four times.

1. Let i=1 and j=1.

When we cross out the first row and the first column, we get a 1 × 1 matrix whose single coefficient is equal to d. The determinant of such a matrix is equal to d as well. The sign factor is (-1)1+1 = 1, so the (1, 1)-cofactor of the original 2 × 2 matrix is d.

2. Let i=1 and j=2.

Similarly, deleting the first row and the second column gives the 1 × 1 matrix containing c. Its determinant is c. The sign factor is (-1)1+2 = -1, and the (1, 2)-cofactor of the original matrix is -c.

3. Let i=2 and j=1.

Deleting the second row and the first column, we get the 1 × 1 matrix containing b. Its determinant is b. The sign factor is equal to (-1)2+1 = -1, so the (2, 1)-cofactor of our matrix is equal to -b.

4. Let i=2 and j=2.

Lastly, we delete the second row and the second column, which leads to the 1 × 1 matrix containing a. Its determinant is a. The sign factor equals (-1)2+2 = 1, and so the (2, 2)-cofactor of the original 2 × 2 matrix is equal to a.

Next, we write down the matrix of cofactors by putting the (i, j)-cofactor into the i-th row and j-th column:

1. The (1, 1)-cofactor goes to the first row and first column:
$\qquad \small \begin{bmatrix} d & \\ & \end{bmatrix}$
1. The (1, 2)-cofactor goes to the first row and second column:
$\qquad \small \begin{bmatrix} d & -c \\ & \end{bmatrix}$
1. The (2, 1)-cofactor goes to the second row and first column:
$\qquad \small \begin{bmatrix} d & -c \\ -b & \end{bmatrix}$
1. The (2, 2)-cofactor goes to the second row and second column:
$\qquad \small \begin{bmatrix} d & -c \\ -b & a \end{bmatrix}$

As you can see, it's not at all hard to determine the cofactor matrix 2 × 2 .

## How to use this cofactor matrix calculator?

In contrast to the 2 × 2 case, calculating the cofactor matrix of a bigger matrix can be exhausting - imagine computing several dozens of cofactors... Don't worry! Omni's cofactor matrix calculator is here to save your time and effort! Follow these steps to use our calculator like a pro:

1. Choose the size of the matrix;

2. Enter the coefficients of your matrix;

Tip: the cofactor matrix calculator updates the preview of the matrix as you input the coefficients in the calculator's fields. Use this feature to verify if the matrix is correct.

3. You can find the cofactor matrix of the original matrix at the bottom of the calculator.

## Finding inverse matrix using cofactor method

The cofactor matrix plays an important role when we want to inverse a matrix. If you want to find the inverse of a matrix A with the help of the cofactor matrix, follow these steps:

1. Estimate the cofactor matrix of A.
2. Calculate the transpose of this cofactor matrix of A.
3. Evaluate the determinant of A.
4. Multiply the matrix obtained in Step 2 by 1/determinant(A).
5. Congratulate yourself on finding the inverse matrix using the cofactor method!

## FAQ

### How do I find the cofactor of a 2×2 matrix?

To find the cofactor matrix of a 2x2 matrix, follow these instructions:

1. Swap the diagonal elements.
2. Swap the anti-diagonal elements, i.e., the upper-right and the bottom-left element.
3. Change signs of the anti-diagonal elements.
4. Congratulate yourself on finding the cofactor matrix!

### How do I find minors of 2×2 matrix?

To find the (i, j)-th minor of the 2×2 matrix, cross out the i-th row and j-th column of your matrix. The remaining element is the minor you're looking for. In particular:

• The minor of a diagonal element is the other diagonal element; and
• The minor of an anti-diagonal element is the other anti-diagonal element.

### How do I find the inverse matrix using a cofactor?

The inverse matrix A-1 is given by the formula:
A-1 = 1/det(A) × cofactor(A)T,
where:

• det(A)  is the determinant of A; and
• cofactor(A)T is the transpose of the cofactor matrix of A.

### How do I find minors and cofactors of a matrix?

To find minors and cofactors, you have to:

1. To find the (i, j)-th minor, cross out the i-th row and j-th column of your matrix and compute the determinant of the remaining matrix.
2. To compute the (i, j)-th cofactor, multiply the (i, j)-th minor by the sign factor (-1)i+j.
Anna Szczepanek, PhD
Matrix size
2 x 2
a₁a₂
b₁b₂
Enter the coefficients in the fields below.
Blanks are interpreted as zeros. Precision: 6 decimal places.
First row
a₁
a₂
Second row
b₁
b₂
Cofactor matrix
00
00
People also viewed…

### Plastic footprint

Find out how much plastic you use throughout the year with this plastic footprint calculator. Rethink your habits, reduce your plastic waste, and make your life a little greener.