Instructions:
Use this calculator to get compute the cofactor matrix associated to a given matrix that you provide.
First, click on one of the buttons below to specify the dimension of the matrix.
Then, click on the first cell and type the value, and move around the matrix by pressing "TAB" or by clicking on the corresponding cells, to
define ALL the matrix values.
Probably without knowing about, you have dealt with cofactors when computing a determinant of a matrix
of 3x3 or larger. So, as you suspect, cofactors have to do with the determinants obtained when removing one row and one column.
How do you find the cofactor of a matrix?
The first thing is to compute the minors matrix. So, for a given n x n matrix A, the element in the i-th row and j-th column of
the minors matrix is equal to the determinant of the sub-matrix formed by removing the i-th row and j-th column of the given
matrix A.
So, if we call A[i,j] to the sub-matrix obtained by removing the i-th row and the j-th column of A, formally we
define the matrix of minors, M as:
Mij=detA[i,j]
Notice that if A is an n x n matrix, then M is n x n as well.
So, Whats a cofactor matrix?
Almost there. So the minors is the matrix that contains all these determinant of the corresponding sub-matrices obtained by
deleting one row and one column. The cofactor is almost that, except that you add a sign (positive or negative), depending on
the i and j.
Indeed, the cofactor matrix, C is defined as:
Cij=(−1)i+jMij=(−1)i+jdetA[i,j]
That looks pretty much like what you use when you compute determinants, huh? So, in order to compute the cofactor matrix, you need to
compute a bunch of determinants.
How to use this Cofactor matrix calculator with steps
In order to use this cofactor calculator, all you need to do is to provide the matrix A. The calculator will guide you through the process
of computing the minors and the signs to get to the cofactors.
Example of cofactor Matrix calculation
Question: Assume you have the following matrix
121231112
Solution:We need to compute the cofactor matrix of the 3×3 matrix that has been provided.
First we compute the minors matrix. We have that, by definition, the minors matrix M is defined by the formula
Mij=detAi,j
where in this case Ai,j is the matrix A after deleting row i and column j.
Therefore, and based on the matrix A provided we get the following coefficients of the minors matrix:
For A1,1:
M11=detA11=3112=3⋅(2)−1⋅(1)=5
For A1,2:
M12=detA12=2112=2⋅(2)−1⋅(1)=3
For A1,3:
M13=detA13=2131=2⋅(1)−1⋅(3)=−1
For A2,1:
M21=detA21=2112=2⋅(2)−1⋅(1)=3
For A2,2:
M22=detA22=1112=1⋅(2)−1⋅(1)=1
For A2,3:
M23=detA23=1121=1⋅(1)−1⋅(2)=−1
For A3,1:
M31=detA31=2311=2⋅(1)−3⋅(1)=−1
For A3,2:
M32=detA32=1211=1⋅(1)−2⋅(1)=−1
For A3,3:
M33=detA33=1223=1⋅(3)−2⋅(2)=−1
Summarizing, the minors matrix is:
M=53−131−1−1−1−1
Now, we can compute the elements of the cofactor matrix C using the formula
Cij=(−1)i+jMij
The above formula can be used directly because the minors are known already. We get