# Matrix Addition and Subtraction Calculator

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

> The matrix addition and subtraction calculator adds or subtracts two matrices of the same size (up to 4 × 4), entry by entry.

## Inputs

- Operation
- Matrix size (rows × columns)
- a₁
- b₁
- c₁
- d₁
- a₂
- b₂
- c₂
- d₂
- a₃
- b₃
- c₃
- d₃
- a₄
- b₄
- c₄
- d₄
- B: x₁
- B: y₁
- B: z₁
- B: w₁
- B: x₂
- B: y₂
- B: z₂
- B: w₂
- B: x₃
- B: y₃
- B: z₃
- B: w₃
- B: x₄
- B: y₄
- B: z₄
- B: w₄

## Results

- Result

## Formula

```
(A ± B)ᵢⱼ = aᵢⱼ ± bᵢⱼ
```

## Explanation

Adding matrices combines tables of data – sales of several products over several months, or two transformations' displacement fields. It works entry by entry.

### How to use the Matrix Addition and Subtraction 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

Corresponding entries are added or subtracted. The matrices must have the same number of rows and columns.

## Worked example

Inputs — Operation: Addition A + B; Matrix size (rows × columns): 2 × 2; a₁: 4; b₁: 1; a₂: 1; b₂: 3; B: x₁: 1; B: y₁: 2; B: x₂: 0; B: y₂: 1.

Results — **Result = ⎡ 5 3 ⎤
⎣ 1 4 ⎦**.

## Key terms

- **Element-wise**: Operating on matching entries.

## FAQ

**Can I add a 2 × 3 matrix and a 3 × 2 matrix?**
No – the sizes must match.

**Is matrix addition commutative?**
Yes, A + B = B + A.

**What is the zero matrix?**
The matrix of all zeros, the identity for addition.

**How do I subtract?**
Subtract each entry of B from the matching entry of A.


## Sources

- [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/)
