Cofactor Matrix — Formula, Signs, Examples

#Algebra
TL;DR
The cofactor matrix of a square matrix is built by replacing each entry with its cofactor — the determinant of the smaller matrix left after deleting that entry's row and column, signed by (−1)i+j(-1)^{i+j}. This article covers minors versus cofactors, the checkerboard sign pattern, the formula, how the cofactor matrix builds the adjugate, determinant, and inverse, and six worked examples.
MV
Madhukar VLast updated on June 10, 20269 min read

What Is a Cofactor Matrix?

The cofactor matrix of a square matrix AA is the matrix formed by replacing every entry aija_{ij} with its cofactor CijC_{ij}. To get there, two definitions stack:

  • The minor MijM_{ij} of entry aija_{ij} is the determinant of the submatrix that remains after deleting row ii and column jj from AA.

  • The cofactor CijC_{ij} is that minor multiplied by a sign:

Cij=(−1)i+j,Mij.C_{ij} = (-1)^{i+j},M_{ij}.

So a minor measures the size of the leftover determinant, and the cofactor adds the sign that the entry's position demands. The distinction matters: a minor is always just a determinant, while a cofactor can be a minor or its negative, depending on where the entry sits.

What Is the Cofactor Sign Pattern?

The factor (−1)i+j(-1)^{i+j} produces a checkerboard of signs. When i+ji + j is even the sign is ++; when odd, the sign is −-. Laid out, it never changes:

[+−+ −+− +−+].\begin{bmatrix} + & - & + \ - & + & - \ + & - & + \end{bmatrix}.

The top-left is always ++, and the signs alternate from there in both directions. You do not need to recompute (−1)i+j(-1)^{i+j} each time — once the pattern is memorised, you read the sign straight off the position. This same pattern shows up in the determinant of a matrix, because cofactor expansion is how a determinant is computed.

What Is the Cofactor Matrix Formula?

For each entry, the cofactor is

Cij=(−1)i+j,Mij,C_{ij} = (-1)^{i+j},M_{ij},

and the cofactor matrix collects them all:

cof(A)=[C11C12C13 C21C22C23 C31C32C33].\text{cof}(A) = \begin{bmatrix} C_{11} & C_{12} & C_{13} \ C_{21} & C_{22} & C_{23} \ C_{31} & C_{32} & C_{33} \end{bmatrix}.

For a 2x2 matrix A=[ab cd]A = \begin{bmatrix} a & b \ c & d \end{bmatrix}, the minors are single entries, so the cofactor matrix is simply

cof(A)=[d−c −ba].\text{cof}(A) = \begin{bmatrix} d & -c \ -b & a \end{bmatrix}.

The procedure for any size is fixed: for each position, delete its row and column, take the determinant of the rest, then apply the checkerboard sign.

How Does the Cofactor Matrix Build the Adjugate, Determinant, and Inverse?

The cofactor matrix is rarely the final goal — it is the step that powers three bigger results:

  • Determinant. Expanding along any row, the determinant is the sum of each entry times its cofactor: det⁡A=ai1Ci1+ai2Ci2+ai3Ci3\det A = a_{i1}C_{i1} + a_{i2}C_{i2} + a_{i3}C_{i3}. This is cofactor expansion.

  • Adjugate. The adjugate (adjoint) is the transpose of the cofactor matrix: adj(A)=cof(A)T\text{adj}(A) = \text{cof}(A)^T.

  • Inverse. The inverse of the matrix is the adjugate over the determinant: A−1=1det⁡Aadj(A)A^{-1} = \frac{1}{\det A}\text{adj}(A), valid whenever det⁡A≠0\det A \neq 0.

So the cofactor matrix sits one transpose away from the adjugate, and one division away from the inverse. Get the cofactors right and everything downstream follows.

Examples of Cofactor Matrix

The set runs from a single minor, through the most common sign mistake, to a full 2x2 and 3x3 cofactor matrix, a cofactor expansion of the determinant, and building the adjugate.

Example 1

Find the minor M11M_{11} of A=[432 156 789]A = \begin{bmatrix} 4 & 3 & 2 \ 1 & 5 & 6 \ 7 & 8 & 9 \end{bmatrix}.

Delete row 1 and column 1, leaving [56 89]\begin{bmatrix} 5 & 6 \ 8 & 9 \end{bmatrix}, and take its determinant:

M11=(5)(9)−(6)(8)=45−48=−3.M_{11} = (5)(9) - (6)(8) = 45 - 48 = -3.

Final answer: M11=−3M_{11} = -3. Since position (1,1)(1,1) has sign ++, here the cofactor equals the minor: C11=−3C_{11} = -3.

Example 2

Find the cofactor C21C_{21} of A=[432 156 789]A = \begin{bmatrix} 4 & 3 & 2 \ 1 & 5 & 6 \ 7 & 8 & 9 \end{bmatrix}.

Wrong attempt. A student deletes row 2 and column 1, gets the minor M21=det⁡[32 89]=27−16=11M_{21} = \det\begin{bmatrix} 3 & 2 \ 8 & 9 \end{bmatrix} = 27 - 16 = 11, and writes C21=11C_{21} = 11. The minor is computed correctly — but the position's sign was never applied.

Check the position. Entry (2,1)(2,1) has i+j=3i + j = 3, which is odd, so (−1)2+1=−1(-1)^{2+1} = -1. The cofactor cannot match the minor here.

Correct. Apply the sign:

C21=(−1)2+1M21=−11.C_{21} = (-1)^{2+1} M_{21} = -11.

Final answer: C21=−11C_{21} = -11. The minor and the cofactor agree only when the position's sign is ++.

Example 3

Find the cofactor matrix of A=[12 34]A = \begin{bmatrix} 1 & 2 \ 3 & 4 \end{bmatrix}.

For a 2x2, each minor is the single remaining entry. Applying the signs [+− −+]\begin{bmatrix} + & - \ - & + \end{bmatrix}:

cof(A)=[4−3 −21].\text{cof}(A) = \begin{bmatrix} 4 & -3 \ -2 & 1 \end{bmatrix}.

Final answer: [4−3 −21]\begin{bmatrix} 4 & -3 \ -2 & 1 \end{bmatrix}. Notice this is the "swap-and-negate" pattern from the 2x2 inverse — the same cofactors, before transposing and dividing.

Example 4

Find the cofactor matrix of A=[102 310 021]A = \begin{bmatrix} 1 & 0 & 2 \ 3 & 1 & 0 \ 0 & 2 & 1 \end{bmatrix}.

Compute all nine signed minors. For example, C11=+det⁡[10 21]=1C_{11} = +\det\begin{bmatrix} 1 & 0 \ 2 & 1 \end{bmatrix} = 1 and C12=−det⁡[30 01]=−3C_{12} = -\det\begin{bmatrix} 3 & 0 \ 0 & 1 \end{bmatrix} = -3. Continuing through every entry:

cof(A)=[1−36 41−2 −261].\text{cof}(A) = \begin{bmatrix} 1 & -3 & 6 \ 4 & 1 & -2 \ -2 & 6 & 1 \end{bmatrix}.

Final answer: the matrix above. Each entry was a signed 2x2 determinant — the checkerboard handles the alternation automatically.

Example 5

Use cofactor expansion along the first row to find det⁡A\det A for the matrix in Example 4.

The determinant is each first-row entry times its cofactor: det⁡A=a11C11+a12C12+a13C13\det A = a_{11}C_{11} + a_{12}C_{12} + a_{13}C_{13}. Using the cofactors C11=1C_{11} = 1, C12=−3C_{12} = -3, C13=6C_{13} = 6 from Example 4:

det⁡A=(1)(1)+(0)(−3)+(2)(6)=1+0+12=13.\det A = (1)(1) + (0)(-3) + (2)(6) = 1 + 0 + 12 = 13.

Final answer: det⁡A=13\det A = 13. The zero in position (1,2)(1,2) wiped out a whole cofactor term — choosing a row with zeros saves work.

Example 6

Build the adjugate of the matrix in Example 4 from its cofactor matrix.

The adjugate is the transpose of the cofactor matrix. Transposing cof(A)\text{cof}(A) from Example 4:

adj(A)=cof(A)T=[14−2 −316 6−21].\text{adj}(A) = \text{cof}(A)^T = \begin{bmatrix} 1 & 4 & -2 \ -3 & 1 & 6 \ 6 & -2 & 1 \end{bmatrix}.

Final answer: the matrix above. Dividing this by det⁡A=13\det A = 13 would give A−1A^{-1} — the cofactor matrix is two short steps from the inverse.

Why the Cofactor Matrix Earns Its Place

"How do you break one big determinant into smaller ones you can actually compute?"

Cofactors come from the theory of determinants, shaped through the 1800s by figures including James Joseph Sylvester (1814–1897, England), who coined the word "matrix" in 1850 and worked on the minors that underlie cofactor expansion. The idea solved a real problem: a large determinant is impossible to compute directly, but cofactor expansion reduces it to a chain of small, manageable determinants.

Where the cofactor matrix does real work:

  • Computing determinants by hand. Cofactor (Laplace) expansion is the standard textbook method for 3×33 \times 3 and larger determinants — the only practical hand method beyond the 2x2.

  • Finding inverses. The adjugate-over-determinant formula is built entirely on the cofactor matrix; it is how most students first compute a 3x3 inverse.

  • Cramer's rule. Solving systems by ratios of determinants relies on cofactors to evaluate each determinant.

  • Symbolic computation. When entries are variables rather than numbers, cofactor expansion is one of the few methods that stays exact rather than approximate.

Where Students Trip Up on the Cofactor Matrix

Mistake 1: Confusing the minor with the cofactor

Where it slips in: Filling the cofactor matrix straight from the minors.

Don't do this: Copy each minor in as-is, ignoring the (−1)i+j(-1)^{i+j} sign.

The correct way: A cofactor is a signed minor. Apply the checkerboard sign to every position before placing the value.

Mistake 2: Deleting the wrong row or column

Where it slips in: Computing the minor MijM_{ij}.

Don't do this: Delete row jj and column ii (swapping the indices), or delete by value instead of by position.

The correct way: For MijM_{ij}, delete row ii and column jj — row first, then column, matching the subscript order. The rusher who works fast often transposes the indices and computes the wrong submatrix entirely.

Mistake 3: Forgetting to transpose when building the adjugate

Where it slips in: Going from the cofactor matrix to the adjugate (and then the inverse).

Don't do this: Use the cofactor matrix directly as the adjugate.

The correct way: The adjugate is the transpose of the cofactor matrix. Skip the transpose and the inverse comes out wrong everywhere except on the diagonal. The second-guesser who knows the rule still sometimes "un-transposes" on a recheck — trusting the one transpose keeps it right.

Key Takeaways

  • The cofactor matrix replaces each entry with its cofactor Cij=(−1)i+jMijC_{ij} = (-1)^{i+j}M_{ij} — a signed minor.

  • A minor is the leftover determinant after deleting a row and column; the cofactor adds the position's sign.

  • The signs follow a fixed checkerboard, top-left always ++: [+−+ −+− +−+]\begin{bmatrix} + & - & + \ - & + & - \ + & - & + \end{bmatrix}.

  • Transposing the cofactor matrix gives the adjugate; dividing the adjugate by the determinant gives the inverse.

  • The most common mistake is treating the minor as the cofactor — always apply the sign.

  • Cofactor expansion is the standard way to compute determinants of 3×33 \times 3 and larger matrices.

Practice These Before Moving On

  1. Find the minor M22M_{22} and cofactor C22C_{22} of [210 345 106]\begin{bmatrix} 2 & 1 & 0 \ 3 & 4 & 5 \ 1 & 0 & 6 \end{bmatrix}.

  2. Find the cofactor matrix of [52 73]\begin{bmatrix} 5 & 2 \ 7 & 3 \end{bmatrix}.

  3. Find the cofactor C13C_{13} of [123 045 106]\begin{bmatrix} 1 & 2 & 3 \ 0 & 4 & 5 \ 1 & 0 & 6 \end{bmatrix}.

Answer to Question 1: M22=det⁡[20 16]=12M_{22} = \det\begin{bmatrix} 2 & 0 \ 1 & 6 \end{bmatrix} = 12; sign at (2,2)(2,2) is ++, so C22=12C_{22} = 12. Answer to Question 2: [3−7 −25]\begin{bmatrix} 3 & -7 \ -2 & 5 \end{bmatrix}. Answer to Question 3: M13=det⁡[04 10]=−4M_{13} = \det\begin{bmatrix} 0 & 4 \ 1 & 0 \end{bmatrix} = -4; sign at (1,3)(1,3) is ++, so C13=−4C_{13} = -4. If Question 2 came out without negative signs, return to Mistake 1.

Want a live Bhanzu trainer to walk through more cofactor matrix problems? Book a free demo class — online globally.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the difference between a minor and a cofactor?
A minor is the determinant left after deleting an entry's row and column. A cofactor is that minor multiplied by (−1)i+j(-1)^{i+j}. They are equal only when the position's sign is positive.
How do you find the cofactor of a 2x2 matrix?
Each minor is a single entry, so for [ab cd]\begin{bmatrix} a & b \ c & d \end{bmatrix} the cofactor matrix is [d−c −ba]\begin{bmatrix} d & -c \ -b & a \end{bmatrix} — the same swap-and-negate pattern behind the 2x2 inverse.
What is the cofactor matrix used for?
To compute determinants (via cofactor expansion), to build the adjugate (its transpose), and to find the inverse (A−1=1det⁡Aadj(A)A^{-1} = \frac{1}{\det A}\text{adj}(A)). It also drives Cramer's rule.
Is the cofactor matrix the same as the adjugate?
No. The adjugate is the transpose of the cofactor matrix. For a symmetric matrix they happen to coincide, but in general they differ.
✍️ Written By
Madhukar V
Madhukar V
Math Columnist & Analyst
I see mathematics as more than just numbers and formulas—it is a way of thinking, questioning, and understanding the world around us. I work at the intersection of mathematics, EdTech, technology, and AI-powered learning, I enjoy exploring how mathematical ideas can be made simple, meaningful, and relatable. Through my articles, I aim to present mathematics with curiosity and a practical perspective, helping readers see the beauty and relevance behind every concept in a Bhanzu way.
LinkedIn
Related Articles
Book a FREE Demo ClassBook Now →