Skip to content
math

Matrix Subtraction Calculator

Subtract two matrices of equal dimensions component-wise to find A − B instantly.

Matrix A
Matrix B
A − B
[0, 0] [0, 0]
Subtraction is component-wise: each entry of A − B equals the corresponding entry of A minus the corresponding entry of B. Both matrices must share the same dimensions.

How it works

  1. 1Set the shared row and column count (1–4) using the selectors — both matrices resize together.
  2. 2Fill in each cell of Matrix A and Matrix B; blank cells are treated as 0.
  3. 3The result A − B is computed component-wise: every entry equals Aᵢⱼ − Bᵢⱼ.

Use cases

  • Compute net displacement vectors in physics by subtracting position matrices.
  • Find the difference between two datasets arranged as matrices in statistics.
  • Verify hand calculations of matrix differences in linear-algebra coursework.

Frequently asked questions

Why must A and B have the same dimensions?

Matrix subtraction is defined entry-by-entry — each Aᵢⱼ − Bᵢⱼ pair must exist, so both matrices need identical row and column counts.

Is matrix subtraction commutative?

No. A − B ≠ B − A in general; swapping the operands negates every entry of the result.

How does this differ from matrix addition?

The operation is identical in structure — component-wise — but each entry is subtracted rather than summed, so A − B = A + (−B).

See all →