Report

Help us improve this tool

Cofactor Matrix Calculator

Calculate the matrix of minors, matrix of cofactors, adjugate matrix, determinant, and inverse with step-by-step Laplace expansion.

O M T

What Is a Cofactor Matrix?

In linear algebra, the cofactor matrix (also called the matrix of cofactors) is a square matrix whose entries are the signed minors of a given square matrix $A$. The cofactor matrix is a crucial tool for computing the determinant via Laplace expansion, determining the adjugate matrix ($\text{adj}(A)$), and finding the matrix inverse ($A^{-1}$).

Definition of Minors and Cofactors

For an $n \times n$ matrix $A$, consider an element $a_{ij}$ located at row $i$ and column $j$:

  • Minor ($M_{ij}$): The determinant of the $(n - 1) \times (n - 1)$ submatrix formed by deleting the $i$-th row and the $j$-th column from $A$.
  • Cofactor ($C_{ij}$): The minor multiplied by an alternating sign factor determined by its row and column indices: $$C_{ij} = (-1)^{i+j} M_{ij}$$

The Checkerboard Sign Pattern

The sign factor $(-1)^{i+j}$ follows a predictable checkerboard grid starting with a positive sign in the top-left corner $(1,1)$:

For a $3 \times 3$ matrix:

$$\begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix}$$

For a $4 \times 4$ matrix:

$$\begin{pmatrix} + & - & + & - \\ - & + & - & + \\ + & - & + & - \\ - & + & - & + \end{pmatrix}$$

How to Calculate the Determinant (Laplace Expansion)

The determinant of any square matrix can be calculated by computing the dot product of any single row (or column) with its corresponding cofactors. Expanding along the first row ($i = 1$):

$$\det(A) = a_{11} C_{11} + a_{12} C_{12} + \dots + a_{1n} C_{1n} = \sum_{j=1}^n a_{1j} C_{1j}$$

The Adjugate and Inverse Matrix

The adjugate matrix (or classical adjoint), denoted $\text{adj}(A)$, is the transpose of the cofactor matrix $C$:

$$\text{adj}(A) = C^T$$

If the determinant $\det(A) \neq 0$, the matrix is invertible, and its inverse is computed directly via Cramer's rule:

$$A^{-1} = \frac{1}{\det(A)} \cdot \text{adj}(A) = \frac{1}{\det(A)} \cdot C^T$$

Explore Related Matrix and Linear Algebra Calculators

Explore our comprehensive suite of matrix tools:

Frequently Asked Questions

What is the difference between a minor and a cofactor?

A minor (M_ij) is the determinant of the submatrix obtained after removing the i-th row and j-th column. A cofactor (C_ij) incorporates the alternating checkerboard sign (-1)^(i+j) multiplied by that minor.

How is the cofactor matrix related to the adjugate matrix?

The adjugate matrix adj(A) is simply the transpose of the cofactor matrix (adj(A) = C^T). That is, row i of the cofactor matrix becomes column i of the adjugate matrix.

Can the cofactor matrix be computed for non-square matrices?

No. Minors and cofactors require calculating determinants of submatrices, which are only defined for square (n x n) matrices.

What does it mean if the determinant computed from the cofactor matrix is zero?

If det(A) = 0, the matrix is singular (non-invertible). In this case, the matrix of cofactors and adjugate matrix still exist, but the matrix inverse does not exist.