Cofactor Matrix Calculator
Enter the elements of the square matrix (2x2 up to 6x6)
to calculate its cofactor matrix step by step.
Calculate matrix
Clear
Quick Examples
2x2 matrix (integers)
2x2 matrix (fractions)
3x3 matrix (basic)
3x3 matrix (fractions)
3x3 matrix (negatives)
4x4 matrix (basic)
Rate this tool
Change my vote
Solved Exercises
The following are examples of problems solved by the calculator.
Exercise 1
Find the cofactor matrix of the following 3x3 matrix:
$$ \displaystyle A = \begin{bmatrix} 2 & -1 & 3 \\[0.5em] 0 & 4 & -2 \\[0.5em] 1 & 5 & 1 \end{bmatrix} $$
Result
The cofactor matrix of A is:
$$ \displaystyle C(A) = \begin{bmatrix} 14 & -2 & -4 \\[0.5em] 16 & -1 & -11 \\[0.5em] -10 & 4 & 8 \end{bmatrix} $$
Step-by-step solution
1. Determine the order of the cofactor matrix and its formula.
The cofactor matrix of A has the same order as the original matrix, but each element is replaced by its corresponding cofactor.
$$ \displaystyle C(A) = \begin{bmatrix} C_{11} & C_{12} & C_{13} \\[0.5em] C_{21} & C_{22} & C_{23} \\[0.5em] C_{31} & C_{32} & C_{33} \end{bmatrix} $$
Each element Cij is calculated using the following formula, where Mij is called the minor: the determinant of the submatrix resulting from removing row i and column j of matrix A:
$$ \displaystyle C_{ij} = (-1)^{i+j} M_{ij} $$
2. Calculate each cofactor.
To see the step-by-step calculation of each determinant, check out the determinant calculator .
Calculation of C11 $$ \displaystyle C_{11} = (-1)^{1+1} M_{11} \\[0.8em] = (-1)^{2} \begin{vmatrix} 4 & -2 \\[0.5em] 5 & 1 \end{vmatrix} \\[0.8em] = (1) (14) \\[0.8em] = 14 $$
Calculation of C12 $$ \displaystyle C_{12} = (-1)^{1+2} M_{12} \\[0.8em] = (-1)^{3} \begin{vmatrix} 0 & -2 \\[0.5em] 1 & 1 \end{vmatrix} \\[0.8em] = (-1) (2) \\[0.8em] = -2 $$
Calculation of C13 $$ \displaystyle C_{13} = (-1)^{1+3} M_{13} \\[0.8em] = (-1)^{4} \begin{vmatrix} 0 & 4 \\[0.5em] 1 & 5 \end{vmatrix} \\[0.8em] = (1) (-4) \\[0.8em] = -4 $$
Calculation of C21 $$ \displaystyle C_{21} = (-1)^{2+1} M_{21} \\[0.8em] = (-1)^{3} \begin{vmatrix} -1 & 3 \\[0.5em] 5 & 1 \end{vmatrix} \\[0.8em] = (-1) (-16) \\[0.8em] = 16 $$
Calculation of C22 $$ \displaystyle C_{22} = (-1)^{2+2} M_{22} \\[0.8em] = (-1)^{4} \begin{vmatrix} 2 & 3 \\[0.5em] 1 & 1 \end{vmatrix} \\[0.8em] = (1) (-1) \\[0.8em] = -1 $$
Calculation of C23 $$ \displaystyle C_{23} = (-1)^{2+3} M_{23} \\[0.8em] = (-1)^{5} \begin{vmatrix} 2 & -1 \\[0.5em] 1 & 5 \end{vmatrix} \\[0.8em] = (-1) (11) \\[0.8em] = -11 $$
Calculation of C31 $$ \displaystyle C_{31} = (-1)^{3+1} M_{31} \\[0.8em] = (-1)^{4} \begin{vmatrix} -1 & 3 \\[0.5em] 4 & -2 \end{vmatrix} \\[0.8em] = (1) (-10) \\[0.8em] = -10 $$
Calculation of C32 $$ \displaystyle C_{32} = (-1)^{3+2} M_{32} \\[0.8em] = (-1)^{5} \begin{vmatrix} 2 & 3 \\[0.5em] 0 & -2 \end{vmatrix} \\[0.8em] = (-1) (-4) \\[0.8em] = 4 $$
Calculation of C33 $$ \displaystyle C_{33} = (-1)^{3+3} M_{33} \\[0.8em] = (-1)^{6} \begin{vmatrix} 2 & -1 \\[0.5em] 0 & 4 \end{vmatrix} \\[0.8em] = (1) (8) \\[0.8em] = 8 $$
3. Construct the final matrix.
Having the values of all cofactors, we determine that the cofactor matrix is:
$$ \displaystyle C(A) = \begin{bmatrix} 14 & -2 & -4 \\[0.5em] 16 & -1 & -11 \\[0.5em] -10 & 4 & 8 \end{bmatrix} $$
Exercise 2
Calculate the cofactor matrix given the matrix:
$$ \displaystyle A = \begin{bmatrix} \frac{1}{3} & -1 & 2 \\[0.5em] 0 & \frac{1}{4} & 3 \\[0.5em] -2 & 0 & 1 \end{bmatrix} $$
Result
We obtain the following cofactor matrix of A as a result:
$$ \displaystyle C(A) = \begin{bmatrix} \frac{1}{4} & -6 & \frac{1}{2} \\[0.5em] 1 & \frac{13}{3} & 2 \\[0.5em] -\frac{7}{2} & -1 & \frac{1}{12} \end{bmatrix} $$
Step-by-step solution
1. Determine the order of the cofactor matrix and its formula.
The cofactor matrix of A has the same order as the original matrix, but each element is replaced by its corresponding cofactor.
$$ \displaystyle C(A) = \begin{bmatrix} C_{11} & C_{12} & C_{13} \\[0.5em] C_{21} & C_{22} & C_{23} \\[0.5em] C_{31} & C_{32} & C_{33} \end{bmatrix} $$
Each element Cij is calculated using the following formula, where Mij is the determinant of the submatrix resulting from removing row i and column j of matrix A:
$$ \displaystyle C_{ij} = (-1)^{i+j} M_{ij} $$
2. Calculate each cofactor.
Calculation of C11 $$ \displaystyle C_{11} = (-1)^{1+1} M_{11} \\[0.8em] = (-1)^{2} \begin{vmatrix} \frac{1}{4} & 3 \\[0.5em] 0 & 1 \end{vmatrix} \\[0.8em] = (1) \left(\frac{1}{4}\right) \\[0.8em] = \frac{1}{4} = 0.25 $$
Calculation of C12 $$ \displaystyle C_{12} = (-1)^{1+2} M_{12} \\[0.8em] = (-1)^{3} \begin{vmatrix} 0 & 3 \\[0.5em] -2 & 1 \end{vmatrix} \\[0.8em] = (-1) (6) \\[0.8em] = -6 $$
Calculation of C13 $$ \displaystyle C_{13} = (-1)^{1+3} M_{13} \\[0.8em] = (-1)^{4} \begin{vmatrix} 0 & \frac{1}{4} \\[0.5em] -2 & 0 \end{vmatrix} \\[0.8em] = (1) \left(\frac{1}{2}\right) \\[0.8em] = \frac{1}{2} = 0.5 $$
Calculation of C21 $$ \displaystyle C_{21} = (-1)^{2+1} M_{21} \\[0.8em] = (-1)^{3} \begin{vmatrix} -1 & 2 \\[0.5em] 0 & 1 \end{vmatrix} \\[0.8em] = (-1) (-1) \\[0.8em] = 1 $$
Calculation of C22 $$ \displaystyle C_{22} = (-1)^{2+2} M_{22} \\[0.8em] = (-1)^{4} \begin{vmatrix} \frac{1}{3} & 2 \\[0.5em] -2 & 1 \end{vmatrix} \\[0.8em] = (1) \left(\frac{13}{3}\right) \\[0.8em] = \frac{13}{3} \approx 4.33 $$
Calculation of C23 $$ \displaystyle C_{23} = (-1)^{2+3} M_{23} \\[0.8em] = (-1)^{5} \begin{vmatrix} \frac{1}{3} & -1 \\[0.5em] -2 & 0 \end{vmatrix} \\[0.8em] = (-1) (-2) \\[0.8em] = 2 $$
Calculation of C31 $$ \displaystyle C_{31} = (-1)^{3+1} M_{31} \\[0.8em] = (-1)^{4} \begin{vmatrix} -1 & 2 \\[0.5em] \frac{1}{4} & 3 \end{vmatrix} \\[0.8em] = (1) \left(-\frac{7}{2}\right) \\[0.8em] = -\frac{7}{2} = -3.5 $$
Calculation of C32 $$ \displaystyle C_{32} = (-1)^{3+2} M_{32} \\[0.8em] = (-1)^{5} \begin{vmatrix} \frac{1}{3} & 2 \\[0.5em] 0 & 3 \end{vmatrix} \\[0.8em] = (-1) (1) \\[0.8em] = -1 $$
Calculation of C33 $$ \displaystyle C_{33} = (-1)^{3+3} M_{33} \\[0.8em] = (-1)^{6} \begin{vmatrix} \frac{1}{3} & -1 \\[0.5em] 0 & \frac{1}{4} \end{vmatrix} \\[0.8em] = (1) \left(\frac{1}{12}\right) \\[0.8em] = \frac{1}{12} \approx 0.08 $$
3. Construct the final matrix.
Having the values of all cofactors, we determine that the cofactor matrix is:
$$ \displaystyle C(A) = \begin{bmatrix} \frac{1}{4} & -6 & \frac{1}{2} \\[0.5em] 1 & \frac{13}{3} & 2 \\[0.5em] -\frac{7}{2} & -1 & \frac{1}{12} \end{bmatrix} $$
Exercise 3
Determine the cofactor matrix of the 2x2 matrix:
$$ \displaystyle A = \begin{bmatrix} 3 & 4 \\[0.5em] -2 & 5 \end{bmatrix} $$
Result
The corresponding cofactor matrix of A is:
$$ \displaystyle C(A) = \begin{bmatrix} 5 & 2 \\[0.5em] -4 & 3 \end{bmatrix} $$
Step-by-step solution
1. Determine the order of the cofactor matrix and its formula.
The cofactor matrix of A has the same order as the original matrix, but each element is replaced by its corresponding cofactor.
$$ \displaystyle C(A) = \begin{bmatrix} C_{11} & C_{12} \\[0.5em] C_{21} & C_{22} \end{bmatrix} $$
Each element Cij is calculated using the following formula, where Mij is the determinant of the submatrix resulting from removing row i and column j of matrix A:
$$ \displaystyle C_{ij} = (-1)^{i+j} M_{ij} $$
2. Calculate each cofactor.
Calculation of C11 $$ \displaystyle C_{11} = (-1)^{1+1} M_{11} \\[0.8em] = (-1)^{2} \begin{vmatrix} 5 \end{vmatrix} \\[0.8em] = (1) (5) \\[0.8em] = 5 $$
Calculation of C12 $$ \displaystyle C_{12} = (-1)^{1+2} M_{12} \\[0.8em] = (-1)^{3} \begin{vmatrix} -2 \end{vmatrix} \\[0.8em] = (-1) (-2) \\[0.8em] = 2 $$
Calculation of C21 $$ \displaystyle C_{21} = (-1)^{2+1} M_{21} \\[0.8em] = (-1)^{3} \begin{vmatrix} 4 \end{vmatrix} \\[0.8em] = (-1) (4) \\[0.8em] = -4 $$
Calculation of C22 $$ \displaystyle C_{22} = (-1)^{2+2} M_{22} \\[0.8em] = (-1)^{4} \begin{vmatrix} 3 \end{vmatrix} \\[0.8em] = (1) (3) \\[0.8em] = 3 $$
3. Construct the final matrix.
Having the values of all cofactors, we determine that the cofactor matrix is:
$$ \displaystyle C(A) = \begin{bmatrix} 5 & 2 \\[0.5em] -4 & 3 \end{bmatrix} $$
Exercise 4
Find the cofactor matrix of the 4x4 matrix:
$$ \displaystyle A = \begin{bmatrix} 1 & 0 & 2 & -1 \\[0.5em] 3 & 1 & 0 & 2 \\[0.5em] -2 & 0 & 1 & 1 \\[0.5em] 4 & -1 & 3 & 0 \end{bmatrix} $$
Result
The resulting cofactor matrix for A is:
$$ \displaystyle C(A) = \begin{bmatrix} -1 & 29 & 11 & -13 \\[0.5em] 3 & 15 & 1 & 5 \\[0.5em] -7 & -1 & 9 & 11 \\[0.5em] 3 & -19 & 1 & 5 \end{bmatrix} $$
Step-by-step solution
1. Determine the order of the cofactor matrix and its formula.
The cofactor matrix of A has the same order as the original matrix, but each element is replaced by its corresponding cofactor.
$$ \displaystyle C(A) = \begin{bmatrix} C_{11} & C_{12} & C_{13} & C_{14} \\[0.5em] C_{21} & C_{22} & C_{23} & C_{24} \\[0.5em] C_{31} & C_{32} & C_{33} & C_{34} \\[0.5em] C_{41} & C_{42} & C_{43} & C_{44} \end{bmatrix} $$
Each element Cij is calculated using the following formula, where Mij is the determinant of the submatrix resulting from removing row i and column j of matrix A:
$$ \displaystyle C_{ij} = (-1)^{i+j} M_{ij} $$
2. Calculate each cofactor.
Calculation of C11 $$ \displaystyle C_{11} = (-1)^{1+1} M_{11} \\[0.8em] = (-1)^{2} \begin{vmatrix} 1 & 0 & 2 \\[0.5em] 0 & 1 & 1 \\[0.5em] -1 & 3 & 0 \end{vmatrix} \\[0.8em] = (1) (-1) \\[0.8em] = -1 $$
Calculation of C12 $$ \displaystyle C_{12} = (-1)^{1+2} M_{12} \\[0.8em] = (-1)^{3} \begin{vmatrix} 3 & 0 & 2 \\[0.5em] -2 & 1 & 1 \\[0.5em] 4 & 3 & 0 \end{vmatrix} \\[0.8em] = (-1) (-29) \\[0.8em] = 29 $$
Calculation of C13 $$ \displaystyle C_{13} = (-1)^{1+3} M_{13} \\[0.8em] = (-1)^{4} \begin{vmatrix} 3 & 1 & 2 \\[0.5em] -2 & 0 & 1 \\[0.5em] 4 & -1 & 0 \end{vmatrix} \\[0.8em] = (1) (11) \\[0.8em] = 11 $$
Calculation of C14 $$ \displaystyle C_{14} = (-1)^{1+4} M_{14} \\[0.8em] = (-1)^{5} \begin{vmatrix} 3 & 1 & 0 \\[0.5em] -2 & 0 & 1 \\[0.5em] 4 & -1 & 3 \end{vmatrix} \\[0.8em] = (-1) (13) \\[0.8em] = -13 $$
Calculation of C21 $$ \displaystyle C_{21} = (-1)^{2+1} M_{21} \\[0.8em] = (-1)^{3} \begin{vmatrix} 0 & 2 & -1 \\[0.5em] 0 & 1 & 1 \\[0.5em] -1 & 3 & 0 \end{vmatrix} \\[0.8em] = (-1) (-3) \\[0.8em] = 3 $$
Calculation of C22 $$ \displaystyle C_{22} = (-1)^{2+2} M_{22} \\[0.8em] = (-1)^{4} \begin{vmatrix} 1 & 2 & -1 \\[0.5em] -2 & 1 & 1 \\[0.5em] 4 & 3 & 0 \end{vmatrix} \\[0.8em] = (1) (15) \\[0.8em] = 15 $$
Calculation of C23 $$ \displaystyle C_{23} = (-1)^{2+3} M_{23} \\[0.8em] = (-1)^{5} \begin{vmatrix} 1 & 0 & -1 \\[0.5em] -2 & 0 & 1 \\[0.5em] 4 & -1 & 0 \end{vmatrix} \\[0.8em] = (-1) (-1) \\[0.8em] = 1 $$
Calculation of C24 $$ \displaystyle C_{24} = (-1)^{2+4} M_{24} \\[0.8em] = (-1)^{6} \begin{vmatrix} 1 & 0 & 2 \\[0.5em] -2 & 0 & 1 \\[0.5em] 4 & -1 & 3 \end{vmatrix} \\[0.8em] = (1) (5) \\[0.8em] = 5 $$
Calculation of C31 $$ \displaystyle C_{31} = (-1)^{3+1} M_{31} \\[0.8em] = (-1)^{4} \begin{vmatrix} 0 & 2 & -1 \\[0.5em] 1 & 0 & 2 \\[0.5em] -1 & 3 & 0 \end{vmatrix} \\[0.8em] = (1) (-7) \\[0.8em] = -7 $$
Calculation of C32 $$ \displaystyle C_{32} = (-1)^{3+2} M_{32} \\[0.8em] = (-1)^{5} \begin{vmatrix} 1 & 2 & -1 \\[0.5em] 3 & 0 & 2 \\[0.5em] 4 & 3 & 0 \end{vmatrix} \\[0.8em] = (-1) (1) \\[0.8em] = -1 $$
Calculation of C33 $$ \displaystyle C_{33} = (-1)^{3+3} M_{33} \\[0.8em] = (-1)^{6} \begin{vmatrix} 1 & 0 & -1 \\[0.5em] 3 & 1 & 2 \\[0.5em] 4 & -1 & 0 \end{vmatrix} \\[0.8em] = (1) (9) \\[0.8em] = 9 $$
Calculation of C34 $$ \displaystyle C_{34} = (-1)^{3+4} M_{34} \\[0.8em] = (-1)^{7} \begin{vmatrix} 1 & 0 & 2 \\[0.5em] 3 & 1 & 0 \\[0.5em] 4 & -1 & 3 \end{vmatrix} \\[0.8em] = (-1) (-11) \\[0.8em] = 11 $$
Calculation of C41 $$ \displaystyle C_{41} = (-1)^{4+1} M_{41} \\[0.8em] = (-1)^{5} \begin{vmatrix} 0 & 2 & -1 \\[0.5em] 1 & 0 & 2 \\[0.5em] 0 & 1 & 1 \end{vmatrix} \\[0.8em] = (-1) (-3) \\[0.8em] = 3 $$
Calculation of C42 $$ \displaystyle C_{42} = (-1)^{4+2} M_{42} \\[0.8em] = (-1)^{6} \begin{vmatrix} 1 & 2 & -1 \\[0.5em] 3 & 0 & 2 \\[0.5em] -2 & 1 & 1 \end{vmatrix} \\[0.8em] = (1) (-19) \\[0.8em] = -19 $$
Calculation of C43 $$ \displaystyle C_{43} = (-1)^{4+3} M_{43} \\[0.8em] = (-1)^{7} \begin{vmatrix} 1 & 0 & -1 \\[0.5em] 3 & 1 & 2 \\[0.5em] -2 & 0 & 1 \end{vmatrix} \\[0.8em] = (-1) (-1) \\[0.8em] = 1 $$
Calculation of C44 $$ \displaystyle C_{44} = (-1)^{4+4} M_{44} \\[0.8em] = (-1)^{8} \begin{vmatrix} 1 & 0 & 2 \\[0.5em] 3 & 1 & 0 \\[0.5em] -2 & 0 & 1 \end{vmatrix} \\[0.8em] = (1) (5) \\[0.8em] = 5 $$
3. Construct the final matrix.
Having the values of all cofactors, we determine that the cofactor matrix is:
$$ \displaystyle C(A) = \begin{bmatrix} -1 & 29 & 11 & -13 \\[0.5em] 3 & 15 & 1 & 5 \\[0.5em] -7 & -1 & 9 & 11 \\[0.5em] 3 & -19 & 1 & 5 \end{bmatrix} $$
Related Tools