🧮
🧮 Math & statistics

Cofactor Matrix Calculator (matrix of minors, cofactors and the adjugate)

Results update as you type.

Your numbers

Understanding the cofactor matrix calculator — concept and principle

This calculator builds the matrix of minors, the cofactor matrix and the adjugate of a square matrix, and checks the determinant from the first row. Use it for linear algebra homework, for finding an inverse by the adjugate method or to check each step of a hand calculation.

Cofactor matrixMinors → signs → cofactorsminors24−5−4123−2−254signs+−+−+−+−+C245−4−1232−2−54det A = 1·24 + 2·5 + 3·(−4) = 22A⁻¹ = Cᵀ ÷ 22
Flip the sign wherever row + column is odd; transpose C to get the adjugate.

How it is calculated

Minor M_ij = determinant of A with row i and column j removed

Cofactor C_ij = (−1)^(i+j) × M_ij

Sign pattern: + − + / − + − / + − + …

Adjugate adj(A) = Cᵀ; A⁻¹ = adj(A) ÷ det(A) when det(A) ≠ 0

Check: det(A) = a₁₁C₁₁ + a₁₂C₁₂ + … + a₁ₙC₁ₙ

The principle

Each cofactor measures how the determinant depends on one entry: if you change a_ij by a small amount, the determinant changes by that amount times C_ij. That is why multiplying a row of A by its own row of cofactors gives the determinant, while multiplying it by another row's cofactors gives zero (it is the determinant of a matrix with two equal rows). Transposing the cofactor matrix puts these products in the right places, so A × adj(A) = det(A) × I and the inverse follows.

Worked example

Default input: A = [1 2 3; 0 4 5; 1 0 6].

  1. Minors: row 1: 24, −5, −4; row 2: 12, 3, −2; row 3: −2, 5, 4, giving the matrix of minors [24 −5 −4; 12 3 −2; −2 5 4].
  2. Apply the sign pattern [+ − +; − + −; + − +].
  3. Cofactor matrix C = [24 5 −4; −12 3 2; −2 −5 4].
  4. Adjugate adj(A) = Cᵀ = [24 −12 −2; 5 3 −5; −4 2 4].
  5. det(A) = 1 × 24 + 2 × 5 + 3 × (−4) = 22, so A⁻¹ = adj(A) ÷ 22.

How to read the result

If the determinant is 0, the cofactor matrix still exists but there is no inverse. For a 2 × 2 matrix [a b; c d] the cofactor matrix is [d −c; −b a]. Large cofactors relative to the determinant warn that the inverse has large entries, so small input errors will be magnified.

Common mistakes

Keep in mind: For large matrices the cofactor method is slow and sensitive to rounding; elimination is the practical way to invert matrices.

Frequently asked questions

What is the difference between the cofactor matrix and the adjugate?

The adjugate is the transpose of the cofactor matrix.

How do I find the inverse with cofactors?

Build the cofactor matrix, transpose it, and divide by the determinant.

What is the cofactor matrix of a 2 × 2 matrix?

For [a b; c d] it is [d −c; −b a].

Sources: D. Margalit & J. Rabinoff, Interactive Linear Algebra, §4.2 Cofactor Expansions · A. Davis, P. Zachlin et al., Coordinated Linear Algebra (University of Nebraska–Lincoln), §5.3

Checked 9 Nov 2026. D. Margalit & J. Rabinoff, Interactive Linear Algebra, §4.2 Cofactor Expansions (cofactor C(ij) = (−1)^(i+j)·det(A(ij)); the adjugate is the transpose of the cofactor matrix; A⁻¹ = adj(A)/det(A)); Coordinated Linear Algebra (University of Nebraska–Lincoln), §5.3 (adjugate formula for the inverse).

🧮 All math & statistics tools →🌍 Calculators by country →