# Cofactor Expansion Calculator

URL: https://speedycalculator.com/calculators/math/cofactor-expansion/
Last updated: 2026-11-08

> The cofactor expansion calculator computes the determinant of a 3 × 3 or 4 × 4 matrix by Laplace expansion along any row or column you choose, listing every term.

## Inputs

- Matrix size
- a₁
- b₁
- c₁
- d₁
- a₂
- b₂
- c₂
- d₂
- a₃
- b₃
- c₃
- d₃
- a₄
- b₄
- c₄
- d₄
- Expand along
- Row or column number

## Results

- Determinant
- Expansion
- Matrix

## Formula

```
det A = Σⱼ (−1)^(i+j) aᵢⱼ Mᵢⱼ  (along row i)
```

## Explanation

Laplace (cofactor) expansion reduces a determinant to smaller determinants. Choosing a row or column with many zeros saves work, which is why being able to expand along any line matters.

### How to use the Cofactor Expansion 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

Each entry of the chosen row or column is multiplied by its signed minor; the signs follow the checkerboard pattern + − + …

## 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; Expand along: a row; Row or column number: 1.

Results: **Determinant = 43**; Expansion = |A| = 4 × M₁₁ (= 15) − 1 × M₁₂ (= 5) + 2 × M₁₃ (= −6); Matrix = ⎡ 4 1 2 ⎤
⎢ 1 3 0 ⎥
⎣ 2 0 5 ⎦.

## Key terms

- **Minor Mᵢⱼ**: The determinant after deleting row i and column j.

## FAQ

**Which row should I expand along?**
The one with the most zeros, since those terms vanish.

**What is the sign pattern?**
(−1)^(i+j): + − + in the first row, − + − in the second, and so on.

**Is cofactor expansion efficient?**
Not for large matrices, since it grows like n!; elimination is much faster.

**Does expanding along a column give the same answer?**
Yes, always.


## Sources

- [Wolfram MathWorld: Determinant expansion by minors](https://mathworld.wolfram.com/DeterminantExpansionbyMinors.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/)
