# Cofactor Matrix Calculator

URL: https://speedycalculator.com/calculators/math/cofactor-matrix/
Last updated: 2026-10-30

> The cofactor matrix calculator replaces every entry of a square matrix by its cofactor (−1)^(i+j)·Mᵢⱼ, and shows the determinant.

## Inputs

- Matrix size
- a₁
- b₁
- c₁
- d₁
- a₂
- b₂
- c₂
- d₂
- a₃
- b₃
- c₃
- d₃
- a₄
- b₄
- c₄
- d₄

## Results

- Cofactor matrix
- Determinant
- Each cofactor

## Formula

```
Cᵢⱼ = (−1)^(i+j) · det(Mᵢⱼ)
```

## Explanation

The cofactor matrix is the stepping stone to the adjugate and the inverse, and to computing determinants by expansion. For [[a, b], [c, d]] it is [[d, −c], [−b, a]].

### How to use the Cofactor Matrix Calculator

- Choose the **matrix size** – the matching grid of fields appears.
- Enter the entries **row by row** (a₁ b₁ c₁ is the first row, a₂ b₂ c₂ the second, and so on).
- Read the result; integer matrices give exact fractions.

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

For each position, the row and column are deleted, the determinant of what remains is computed and the checkerboard sign is applied.

## Worked example

Inputs — Matrix size: 3 × 3; a₁: 4; b₁: 1; c₁: 2; a₂: 1; b₂: 3; c₂: 0; a₃: 2; b₃: 0; c₃: 5.

Results — **Cofactor matrix = ⎡ 15 −5 −6 ⎤
⎢ −5 16 2 ⎥
⎣ −6 2 11 ⎦**; Determinant = 43; Each cofactor = C₁₁ = (−1)² × 15 = 15
C₁₂ = (−1)³ × 5 = −5
C₁₃ = (−1)⁴ × −6 = −6
C₂₁ = (−1)³ × 5 = −5
C₂₂ = (−1)⁴ × 16 = 16
C₂₃ = (−1)⁵ × −2 = 2
C₃₁ = (−1)⁴ × −6 = −6
C₃₂ = (−1)⁵ × −2 = 2
C₃₃ = (−1)⁶ × 11 = 11.

## Key terms

- **Cofactor matrix**: The matrix of all cofactors.

## FAQ

**What is a cofactor?**
A signed minor: (−1)^(i+j) times the determinant of the submatrix without row i and column j.

**How do I get the inverse from it?**
Transpose it (the adjugate) and divide by the determinant.

**What is the cofactor matrix of a 1 × 1 matrix?**
[1].

**How do cofactors give the determinant?**
Multiply each entry of one row by its cofactor and add.


## Sources

- [Wolfram MathWorld – Cofactor](https://mathworld.wolfram.com/Cofactor.html)
- [MIT OpenCourseWare – 18.06 Linear Algebra (Gilbert Strang)](https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/)
- [Jim Hefferon – Linear Algebra (free textbook)](https://hefferon.net/linearalgebra/)
