Cofactor Matrix Calculator
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 stepbystep 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 is1
.
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(n1) × (n1)
submatrix ofA
formed by removing thei
th row andj
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 stepbystep 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:

Cross out the
i
th row and thej
th column ofA
. You obtain a(n  1) × (n  1)
submatrix ofA
. 
Compute the determinant of this submatrix. You have found the
(i, j)
minor ofA
. 
Determine the sign factor (1)^{i+j}.

Multiply the
(i, j)
minor ofA
by the sign factor. The result is exactly the(i, j)
cofactor ofA
! 
Repeat Steps 14 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:
There are four coefficients, so we will repeat Steps 1, 2, and 3 from the previous section four times.

Let
i=1
andj=1
.When we cross out the first row and the first column, we get a
1 × 1
matrix whose single coefficient is equal tod
. The determinant of such a matrix is equal tod
as well. The sign factor is (1)^{1+1} = 1, so the(1, 1)
cofactor of the original2 × 2
matrix isd
. 
Let
i=1
andj=2
.Similarly, deleting the first row and the second column gives the
1 × 1
matrix containingc
. Its determinant isc
. The sign factor is (1)^{1+2} = 1, and the(1, 2)
cofactor of the original matrix isc
. 
Let
i=2
andj=1
.Deleting the second row and the first column, we get the
1 × 1
matrix containingb
. Its determinant isb
. The sign factor is equal to (1)^{2+1} = 1, so the(2, 1)
cofactor of our matrix is equal tob
. 
Let
i=2
andj=2
.Lastly, we delete the second row and the second column, which leads to the
1 × 1
matrix containinga
. Its determinant isa
. The sign factor equals (1)^{2+2} = 1, and so the(2, 2)
cofactor of the original2 × 2
matrix is equal toa
.
Next, we write down the matrix of cofactors by putting the (i, j)
cofactor into the i
th row and j
th column:
 The
(1, 1)
cofactor goes to the first row and first column:
 The
(1, 2)
cofactor goes to the first row and second column:
 The
(2, 1)
cofactor goes to the second row and first column:
 The
(2, 2)
cofactor goes to the second row and second column:
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:

Choose the size of the matrix;

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.

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:
 Estimate the cofactor matrix of
A
.  Calculate the transpose of this cofactor matrix of
A
.  Evaluate the determinant of
A
.  Multiply the matrix obtained in Step 2 by
1/determinant(A)
.  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:
 Swap the diagonal elements.
 Swap the antidiagonal elements, i.e., the upperright and the bottomleft element.
 Change signs of the antidiagonal elements.
 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 antidiagonal element is the other antidiagonal 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 ofA
; 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:
 To find the
(i, j)
th minor, cross out thei
th row andj
th column of your matrix and compute the determinant of the remaining matrix.  To compute the
(i, j)
th cofactor, multiply the(i, j)
th minor by the sign factor (1)^{i+j}.
⌈  a₁  a₂  ⌉ 
⌊  b₁  b₂  ⌋ 
⌈  0  0  ⌉ 
⌊  0  0  ⌋ 