Cofactor Matrix - Signed Cofactors, Adjugate, and Inverse

Cofactor matrix calculator that builds the matrix of cofactors for a 2x2 or 3x3 matrix, with the adjugate, the determinant, and the inverse read in one pass.

Updated: June 16, 2026 • Free Tool

Cofactor Matrix

Pick the size of A. In 2x2 mode the last row and column of the entry grid are ignored.

Row 1, column 1.

Row 1, column 2.

Row 1, column 3. 0 for 2x2 mode.

Row 2, column 1.

Row 2, column 2.

Row 2, column 3. 0 for 2x2 mode.

Row 3, column 1. 0 for 2x2 mode.

Row 3, column 2. 0 for 2x2 mode.

Row 3, column 3. 0 for 2x2 mode.

Results

Determinant of A
0

Cofactor matrix C

0
0
0
0
0
0
0
0
0

Adjugate adj(A) = CT

0
0
0
0
0
0
0
0
0

Inverse A-1 = adj(A) / det(A)

0
0
0
0
0
0
0
0
0
Status Invertible

What Is a Cofactor Matrix Calculator?

A cofactor matrix calculator is a focused linear-algebra tool that takes a square 2x2 or 3x3 matrix A and lays out the full matrix of cofactors in the same shape as A, with each entry already multiplied by its (-1)^(i + j) sign factor. Drop in the four or nine entries of A, and the result panel shows the cofactor matrix C, the adjugate adj(A) = C^T, the determinant det(A), and the inverse A^-1 together.

  • Linear-algebra homework and exams: Verify the signed cofactors of a 2x2 or 3x3 matrix, then read the adjugate and the inverse from the same screen so the A^-1 = adj(A) / det(A) identity is checked in one pass.
  • Statics and small structural systems: Compute the inverse of a 3x3 Jacobian or stiffness matrix by hand, then check the cofactor pattern before trusting the inverse in a back-substitution.
  • Computer graphics and robotics: Invert a small rotation or scale matrix used in a shader, a calibration routine, or a kinematic chain, and read the cofactor matrix alongside the inverse to catch a sign error.
  • Statistics and econometrics: Cross-check the inverse of a 2x2 or 3x3 covariance matrix before feeding it into a regression or a Kalman update.

The sign factor starts at +1 in the top-left and flips at every step, which is the most common place a hand calculation goes wrong.

Because the adjugate is exactly the transpose of the cofactor matrix, Adjoint Matrix Calculator is the natural next step after this page once adj(A) is the only thing you still need.

How the Cofactor Matrix Calculator Works

The calculator reads the matrix size, collects the four 2x2 or nine 3x3 entries, and walks the cofactor definition in order: minor, sign factor, signed cofactor, full cofactor matrix, transpose to get the adjugate, and divide by the determinant to get the inverse.

C_ij = (-1)^(i + j) * M_ij, adj(A) = C^T, A^-1 = adj(A) / det(A) when det(A) is not zero
  • A: The input square matrix of size 2x2 or 3x3 with real entries.
  • M_ij: The (i, j) minor: det of the (n - 1) x (n - 1) submatrix after deleting row i and column j.
  • C_ij: The (i, j) cofactor: M_ij times the checkerboard sign factor (-1)^(i + j).
  • (-1)^(i + j): Sign factor. +1 when i + j is even, -1 when odd.
  • adj(A): The classical adjoint, equal to C^T.
  • det(A): The determinant of A. The inverse is defined only when det(A) is not zero.

Worked 2x2 example: A = [[1, 2], [3, 4]]

a11 = 1, a12 = 2, a21 = 3, a22 = 4

C_11 = +(4) = 4, C_12 = -(3) = -3, C_21 = -(2) = -2, C_22 = +(1) = 1.

C = [[4, -3], [-2, 1]], det(A) = -2, adj(A) = [[4, -2], [-3, 1]], A^-1 = [[-2, 1], [1.5, -0.5]].

The 2x2 cofactor pattern is the swap-and-sign rule: same sign on the main diagonal, opposite sign on the anti-diagonal.

Worked 3x3 example: A = [[1, 2, 3], [0, 1, 4], [5, 6, 0]]

Rows 1-3 of A as listed above

C_11 = +det([[1, 4], [6, 0]]) = -24, C_12 = -det([[0, 4], [5, 0]]) = +20, C_13 = +det([[0, 1], [5, 6]]) = -5. The other six follow the same rule.

C = [[-24, 20, -5], [18, -15, 4], [5, -4, 1]], adj(A) = C^T = [[-24, 18, 5], [20, -15, -4], [-5, 4, 1]], det(A) = 1, so A^-1 = adj(A).

Because det(A) = 1, the adjugate is the inverse. A sign error shows up as A * adj(A) no longer giving the identity.

According to Wikipedia, the classical adjoint (also called the adjugate) of a square matrix A is the transpose of the cofactor matrix, defined as C_ij = (-1)^(i + j) times the minor M_ij.

According to MIT OpenCourseWare 18.06 (Strang), the formula A^-1 = adj(A) / det(A) is the cofactor expansion of the inverse and is the textbook alternative to row reduction for small square systems.

When the same cofactor C_ij is summed along a row or column to evaluate det(A) as a Laplace expansion, Cofactor Expansion Calculator walks the term-by-term calculation explicitly.

Key Concepts Behind the Cofactor Matrix

Four small ideas cover the entire pipeline from A to A^-1. They are the same concepts in any linear-algebra textbook.

Minor M_ij

The (i, j) minor is the determinant of the (n - 1) x (n - 1) submatrix of A after deleting row i and column j. For a 3x3 matrix each minor is a 2x2 determinant.

Cofactor C_ij = (-1)^(i + j) * M_ij

The cofactor is the minor with a checkerboard sign. The sign starts at +1 in the top-left and flips at every step across rows and down columns.

Adjugate adj(A) = C^T

The adjugate is the transpose of the cofactor matrix. The modern term avoids confusion with the conjugate transpose used in quantum mechanics.

A * adj(A) = det(A) * I

The defining identity. When det(A) is not zero, the inverse equals adj(A) / det(A). When det(A) is zero, the matrix is singular and the inverse is not defined.

When the same cofactors reappear inside the determinant of (A - lambda * I) for an eigenvalue problem, Characteristic Polynomial Calculator returns the characteristic polynomial without any hand sign bookkeeping.

How to Use This Calculator

Pick the matrix size, type the entries of A, and read the cofactor matrix, the adjugate, the determinant, and the inverse from the right-hand panel.

  1. 1 Choose the matrix size: Select 2x2 to enter four entries, or 3x3 to enter nine entries. In 2x2 mode the bottom row and right column of the entry grid are ignored.
  2. 2 Type the matrix entries: Real numbers, decimals allowed, negative numbers allowed. The calculation updates as you type.
  3. 3 Read the cofactor matrix: The first result panel. Each cell is the matching (n - 1) x (n - 1) minor with the checkerboard sign already applied.
  4. 4 Read the adjugate: The transpose of the cofactor matrix, equal to C^T. The off-diagonal of adj(A) is the off-diagonal of C swapped across the main diagonal.
  5. 5 Read the determinant and the inverse: The determinant is the scalar that turns the adjugate into the inverse. The inverse panel shows adj(A) / det(A) when det(A) is not zero, or a singular-matrix warning.
  6. 6 Reset or change the size: Reset restores the default 2x2 matrix; the size selector jumps to 3x3 without reloading the page.

Example: a student is asked for the cofactor matrix of A = [[1, 2], [3, 4]]. They pick 2x2, type the four entries, and read [[4, -3], [-2, 1]] in the first result panel. The adjugate shows [[4, -2], [-3, 1]], the determinant reads -2, and the inverse reads [[-2, 1], [1.5, -0.5]].

For a 3x3 problem where the cofactors are easier to remember as determinants of 2x2 cross-product slices, Cross Product Calculator returns the same 2x2 determinant directly from two vector inputs.

Benefits of This Cofactor Matrix Calculator

The cofactor definition is short, but going from a 3x3 matrix to the inverse by hand is a multi-step bookkeeping task. The calculator keeps the whole pipeline on screen at once.

  • Cofactor matrix shown as its own step: The cofactor matrix sits between the input and the adjugate, so the user can audit the checkerboard sign pattern before the transpose.
  • 2x2 and 3x3 in one tool: A size selector swaps between the four-entry 2x2 input and the nine-entry 3x3 input.
  • Inverse through the adjugate identity: The inverse is computed as adj(A) / det(A), the textbook alternative to Gaussian elimination for small square matrices.
  • Singular-matrix warning built in: When the determinant is exactly zero, the inverse panel switches to a warning. C and adj(A) are still returned.
  • Decimal-friendly arithmetic: Entries can be decimals like 1.5 or 0.25, with four decimal places of precision in the result panels.

The result panel is laid out so the identity A * adj(A) = det(A) * I is visible: C in the first panel, adj(A) in the second, det(A) as the scalar that ties them together, and A^-1 in the last panel.

For a symmetric positive-definite matrix where the inverse could also be built from a Cholesky factor, Cholesky Decomposition Calculator returns L and L^T so the same matrix can be inverted by forward and back substitution.

Factors That Affect Your Cofactor Result

A handful of input choices and structural facts decide whether the cofactor matrix lines up with the matrix you intended, and whether the inverse is meaningful at all.

Matrix size

The cofactor definition is the same for 2x2 and 3x3, but the number of minors is different (four 1x1 minors for 2x2, nine 2x2 minors for 3x3). Mixing the two sizes is the most common reason a hand check disagrees.

Checkerboard sign pattern

Each cofactor carries a (-1)^(i + j) factor that flips sign at every step. A single sign error mirrors into a sign error on the adjugate and then on the inverse.

Determinant magnitude

A non-zero determinant is required for the inverse. When the determinant is very small, the inverse entries get large and the result is numerically sensitive.

Decimal precision

Output is rounded to four decimal places for display, but the calculation runs in full IEEE 754 double precision.

Linear dependence

When two rows (or two columns) of A are linearly dependent, det(A) is zero, the cofactor matrix and adjugate are still defined, but the inverse is not.

  • The calculator is restricted to 2x2 and 3x3 square matrices. For 4x4 and larger, a row-reduction approach is more practical.
  • The cofactor definition extends to complex entries, but this calculator is built for real 2x2 and 3x3 inputs.
  • Results are rounded to four decimal places for display. A clean fraction like 1/3 will read as 0.3333 on the screen.

The same two ideas cover everything: the sign convention is fixed, and the determinant decides whether the inverse is defined.

According to Wolfram MathWorld, the cofactor C_ij of an n x n matrix A is the determinant of the (n - 1) x (n - 1) submatrix obtained by deleting row i and column j, multiplied by the sign factor (-1)^(i + j).

To go from a cofactor matrix to the solution vector of A * x = b, System of Equations Calculator returns x for 2x2 and 3x3 systems and uses row reduction when det(A) is zero.

Cofactor matrix calculator showing a 2x2 matrix on the left and the resulting signed cofactor matrix, adjugate, determinant, and inverse on the right.
Cofactor matrix calculator showing a 2x2 matrix on the left and the resulting signed cofactor matrix, adjugate, determinant, and inverse on the right.

Frequently Asked Questions

Q: What is a cofactor matrix?

A: The cofactor matrix of A is the matrix whose (i, j) entry is C_ij = (-1)^(i + j) * M_ij, where M_ij is the determinant of the submatrix of A after deleting row i and column j. It feeds into the adjugate adj(A) = C^T and the inverse.

Q: How do you find the cofactor of a 2x2 matrix?

A: For A = [[a, b], [c, d]], the cofactor matrix is the swap-and-sign pattern [[d, -c], [-b, a]]. The diagonal entries swap, the off-diagonal entries change sign, and no 2x2 minor expansion is needed.

Q: How do you find the cofactor of a 3x3 matrix?

A: Compute each 2x2 minor M_ij by deleting row i and column j, multiply by the checkerboard sign (-1)^(i + j) to get C_ij, and lay out all nine cofactors in the same shape as A.

Q: What is the difference between a minor and a cofactor?

A: The minor M_ij is the determinant of the (n - 1) x (n - 1) submatrix of A after deleting row i and column j. The cofactor C_ij is the same number with the sign factor (-1)^(i + j) applied.

Q: How does the cofactor matrix relate to the adjugate and the inverse?

A: The adjugate adj(A) is the transpose of the cofactor matrix, so adj(A) = C^T. The identity A * adj(A) = det(A) * I gives A^-1 = adj(A) / det(A) when det(A) is not exactly zero.

Q: What does the cofactor matrix look like for a singular matrix?

A: For a singular matrix det(A) is exactly zero, but C and adj(A) = C^T are still defined and can be non-zero. The calculator returns C and adj(A) with a singular-matrix warning on the inverse panel.