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}$. 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.
BT
Bhanzu TeamLast updated on June 10, 20269 min read

What Is a Cofactor Matrix?

The cofactor matrix of a square matrix $A$ is the matrix formed by replacing every entry $a_{ij}$ with its cofactor $C_{ij}$. To get there, two definitions stack:

  • The minor $M_{ij}$ of entry $a_{ij}$ is the determinant of the submatrix that remains after deleting row $i$ and column $j$ from $A$.

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

$$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}$ produces a checkerboard of signs. When $i + 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}$ 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

$$C_{ij} = (-1)^{i+j},M_{ij},$$

and the cofactor matrix collects them all:

$$\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 = \begin{bmatrix} a & b \ c & d \end{bmatrix}$, the minors are single entries, so the cofactor matrix is simply

$$\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 = 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: $\text{adj}(A) = \text{cof}(A)^T$.

  • Inverse. The inverse of the matrix is the adjugate over the determinant: $A^{-1} = \frac{1}{\det A}\text{adj}(A)$, valid whenever $\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 $M_{11}$ of $A = \begin{bmatrix} 4 & 3 & 2 \ 1 & 5 & 6 \ 7 & 8 & 9 \end{bmatrix}$.

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

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

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

Example 2

Find the cofactor $C_{21}$ of $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 $M_{21} = \det\begin{bmatrix} 3 & 2 \ 8 & 9 \end{bmatrix} = 27 - 16 = 11$, and writes $C_{21} = 11$. The minor is computed correctly — but the position's sign was never applied.

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

Correct. Apply the sign:

$$C_{21} = (-1)^{2+1} M_{21} = -11.$$

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

Example 3

Find the cofactor matrix of $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}$:

$$\text{cof}(A) = \begin{bmatrix} 4 & -3 \ -2 & 1 \end{bmatrix}.$$

Final answer: $\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 = \begin{bmatrix} 1 & 0 & 2 \ 3 & 1 & 0 \ 0 & 2 & 1 \end{bmatrix}$.

Compute all nine signed minors. For example, $C_{11} = +\det\begin{bmatrix} 1 & 0 \ 2 & 1 \end{bmatrix} = 1$ and $C_{12} = -\det\begin{bmatrix} 3 & 0 \ 0 & 1 \end{bmatrix} = -3$. Continuing through every entry:

$$\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$ for the matrix in Example 4.

The determinant is each first-row entry times its cofactor: $\det A = a_{11}C_{11} + a_{12}C_{12} + a_{13}C_{13}$. Using the cofactors $C_{11} = 1$, $C_{12} = -3$, $C_{13} = 6$ from Example 4:

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

Final answer: $\det A = 13$. The zero in position $(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 $\text{cof}(A)$ from Example 4:

$$\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$ would give $A^{-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 \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}$ 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 $M_{ij}$.

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

The correct way: For $M_{ij}$, delete row $i$ and column $j$ — 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 $C_{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 \times 3$ and larger matrices.

Practice These Before Moving On

  1. Find the minor $M_{22}$ and cofactor $C_{22}$ of $\begin{bmatrix} 2 & 1 & 0 \ 3 & 4 & 5 \ 1 & 0 & 6 \end{bmatrix}$.

  2. Find the cofactor matrix of $\begin{bmatrix} 5 & 2 \ 7 & 3 \end{bmatrix}$.

  3. Find the cofactor $C_{13}$ of $\begin{bmatrix} 1 & 2 & 3 \ 0 & 4 & 5 \ 1 & 0 & 6 \end{bmatrix}$.

Answer to Question 1: $M_{22} = \det\begin{bmatrix} 2 & 0 \ 1 & 6 \end{bmatrix} = 12$; sign at $(2,2)$ is $+$, so $C_{22} = 12$. Answer to Question 2: $\begin{bmatrix} 3 & -7 \ -2 & 5 \end{bmatrix}$. Answer to Question 3: $M_{13} = \det\begin{bmatrix} 0 & 4 \ 1 & 0 \end{bmatrix} = -4$; sign at $(1,3)$ is $+$, so $C_{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.

Book a Free Demo

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}$. 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 $\begin{bmatrix} a & b \ c & d \end{bmatrix}$ the cofactor matrix is $\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} = \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
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →