MatrixStep

Matrix Addition Calculator

Adds the corresponding entries of two matrices of the same size.

INPUT

Integers, fractions (1/3) and decimals (0.25) are accepted. Empty cells count as 0. Paste a block of numbers from a spreadsheet or textbook into the first cell to fill the whole matrix.

RESULT

LaTeX is the math code you can paste into Overleaf, Notion equation blocks or Word's equation editor.

Matrix addition

Only matrices of the same size can be added. Add the entries in the same position.

Full explanation with examples: Matrix Addition, Subtraction and Scalar Multiplication: Rules and Examples

Exam tipAddition is commutative and associative: A + B = B + A.

How to do it by hand

  1. Check that both matrices have the same size: same number of rows and same number of columns.
  2. Add the entries in matching positions (row i, column j). That is all there is to it.
  3. The result has the same size. Order does not matter (A + B = B + A) and neither does grouping when adding three or more.
Worked example

With A = [1 2; 3 4] and B = [5 −1; 0 2],

A + B = [1+5 2+(−1); 3+0 4+2] = [6 1; 3 6]

Fractions work the same way: [½ 1; 0 ⅓] + [½ 0; 1 ⅔] = [1 1; 1 1]

Where is it used?

  • Combining data of the same shape: a January sales table plus a February sales table gives the two-month total.
  • Combining linear maps: applying A to a vector and adding the result of applying B equals applying (A + B).
  • Blending two images pixel by pixel in image processing is matrix addition.

Common mistakes

  • Forcing matrices of different sizes together. A 2×3 and a 3×2 cannot be added, which is why this calculator locks B's size to A's.
  • Adding a plain number to a matrix. A + 3 is undefined; to add 3 to every entry write A + 3J where J is the all-ones matrix.
  • Sign slips with negative entries. Write 2 + (−5) = −3 with the parentheses and go slowly.

How to use

  1. Set the matrix size with the row and column buttons. Up to 6×6 is supported.
  2. Type numbers into the cells and the result updates instantly. Enter fractions as 1/3 and negatives as -2.
  3. Enter moves to the next cell; the ← → ↑ ↓ arrow keys move between cells.
  4. Open ‘Steps’ to see the full working. ‘Copy LaTeX’ copies the result as math code you can paste into Overleaf, a Notion equation block or Word's equation editor.

FAQ

Can I add matrices of different sizes?
No. Both the row and column counts must match, so the size of B follows A automatically.

Related guides