Mathwords logoReference LibraryMathwords

Cofactor

Cofactor

The determinant obtained by deleting the row and column of a given element of a matrix or determinant. The cofactor is preceded by a + or – sign depending whether the element is in a + or – position.

 

4×4 matrix showing + and – sign positions: row1: + – + –, row2: – + – +, row3: + – + –, row4: – + – +
4x4 determinant with element 6 circled; its cofactor is the 3x3 determinant of remaining rows/columns, equal to -88.

 

 

See also

Cofactor matrix

Key Formula

Cij=(1)i+jMijC_{ij} = (-1)^{i+j} \, M_{ij}
Where:
  • CijC_{ij} = The cofactor of the element in row i, column j
  • (1)i+j(-1)^{i+j} = The sign factor, which is +1 when i+j is even and −1 when i+j is odd
  • MijM_{ij} = The minor of element a_{ij}, equal to the determinant of the submatrix formed by deleting row i and column j

Worked Example

Problem: Find the cofactor C₁₂ of the element in row 1, column 2 of the matrix A = [[3, 1, 2], [0, 4, 5], [1, 6, 7]].
Step 1: Identify the element. The element in row 1, column 2 is a₁₂ = 1.
a12=1a_{12} = 1
Step 2: Form the minor M₁₂ by deleting row 1 and column 2 from A. The remaining 2×2 submatrix is:
(0517)\begin{pmatrix} 0 & 5 \\ 1 & 7 \end{pmatrix}
Step 3: Compute the determinant of this 2×2 submatrix to get the minor.
M12=(0)(7)(5)(1)=05=5M_{12} = (0)(7) - (5)(1) = 0 - 5 = -5
Step 4: Determine the sign factor using (-1)^(i+j). Here i = 1 and j = 2, so i + j = 3, which is odd.
(1)1+2=(1)3=1(-1)^{1+2} = (-1)^3 = -1
Step 5: Multiply the sign factor by the minor to get the cofactor.
C12=(1)(5)=5C_{12} = (-1)(- 5) = 5
Answer: The cofactor C₁₂ = 5.

Another Example

This example shows how cofactors are used in practice — to compute a determinant via cofactor expansion (Laplace expansion) along a row. The first example computed a single cofactor; this one applies cofactors to find a full determinant.

Problem: Use cofactor expansion along row 1 to find the determinant of B = [[2, 3], [1, 4]].
Step 1: For a 2×2 matrix, each cofactor involves a 1×1 'submatrix' (a single number). Start with element b₁₁ = 2. Delete row 1 and column 1 to get M₁₁ = 4.
C11=(1)1+14=(+1)(4)=4C_{11} = (-1)^{1+1} \cdot 4 = (+1)(4) = 4
Step 2: Now take element b₁₂ = 3. Delete row 1 and column 2 to get M₁₂ = 1.
C12=(1)1+21=(1)(1)=1C_{12} = (-1)^{1+2} \cdot 1 = (-1)(1) = -1
Step 3: Apply cofactor expansion along row 1: multiply each element by its cofactor and sum.
det(B)=a11C11+a12C12=2(4)+3(1)=83=5\det(B) = a_{11} \cdot C_{11} + a_{12} \cdot C_{12} = 2(4) + 3(-1) = 8 - 3 = 5
Answer: det(B) = 5.

Frequently Asked Questions

What is the difference between a minor and a cofactor?
A minor M_{ij} is the determinant of the submatrix that remains after you delete row i and column j — it carries no sign adjustment. A cofactor C_{ij} is that same minor multiplied by the sign factor (-1)^{i+j}. So the cofactor equals the minor when i + j is even, and equals the negative of the minor when i + j is odd.
How do you remember the sign pattern for cofactors?
The signs follow a checkerboard pattern starting with + in the top-left corner: +, −, +, − across the first row, then −, +, −, + across the second row, and so on. Equivalently, the sign is + when the row number plus the column number is even, and − when it is odd.
When do you use cofactors?
Cofactors appear in three main contexts: computing determinants via cofactor expansion (Laplace expansion), finding the inverse of a matrix using the adjugate (the transpose of the cofactor matrix), and in Cramer's rule for solving systems of linear equations. They are most practical for 3×3 and 4×4 matrices.

Cofactor vs. Minor

CofactorMinor
DefinitionThe signed determinant of the submatrix after deleting row i and column jThe unsigned determinant of the submatrix after deleting row i and column j
FormulaC_{ij} = (-1)^{i+j} M_{ij}M_{ij} = det(submatrix with row i, col j removed)
SignIncludes the checkerboard sign factorAlways positive or zero (no sign adjustment)
When to useDeterminant expansion, inverse matrices, Cramer's ruleIntermediate step in computing cofactors

Why It Matters

Cofactors are the mechanism behind cofactor expansion, which is how you compute determinants of 3×3 and larger matrices by hand. They also form the cofactor matrix, whose transpose (the adjugate) gives you a formula for the matrix inverse: A⁻¹ = (1/det A) · adj(A). You will encounter cofactors repeatedly in linear algebra courses and in any application — physics, engineering, economics — that requires solving systems of equations or analyzing transformations.

Common Mistakes

Mistake: Forgetting the sign factor (-1)^{i+j} and treating the cofactor as just the minor.
Correction: Always apply the checkerboard sign. A quick check: if the row number plus the column number is odd, the cofactor has the opposite sign of the minor.
Mistake: Deleting the wrong row or column when forming the submatrix.
Correction: To find C_{ij}, you must delete exactly row i and column j. Double-check by verifying that your submatrix has one fewer row and one fewer column than the original, and that no entries from row i or column j remain.

Related Terms