Matrix Addition and Subtraction Calculator

SUM
Set both sizes, fill the cells, then press =.
Every cell, one at a time
Both matrices must be exactly the same size. Set them separately and the calculator will say which dimension clashed.
Matrix A 2 × 2
Rows first, then columns. A blank cell counts as zero, the box in front multiplies the whole matrix, and a cell will take a fraction such as 3/4 or a decimal.
rows columns
Matrix B 2 × 2
B must have the same number of rows and the same number of columns as A. Nothing else will do — there is no second chance the other way round here.
rows columns
Tap a cell, then use the keys
Leave the two boxes in front empty for a plain A + B or A − B, or fill them for something like 2A − 3B. Both orders are worked out either way: adding gives the same answer whichever way round you go, subtracting turns every sign over.
The working, step by step

This matrix addition and subtraction calculator adds or subtracts two matrices with every cell worked out, takes combinations such as 2A − 3B, and shows both orders side by side. Everything stays in exact fractions.

The simplest case first. For 1 2 / 3 4 and 5 6 / 7 8, add the entries that sit in the same place: 1 + 5 = 6, 2 + 6 = 8, 3 + 7 = 10, 4 + 8 = 12. The sum is 6 8 / 10 12, the same size as the two you started with. Subtract instead and you get −4 −4 / −4 −4 — and turning the two round gives 4 4 / 4 4, which is the part worth being careful about.

Matrix Addition and Subtraction Calculator — a free tool from Monkza

How to Add Two Matrices

Entry by entry, and nothing else. Corresponding entries — the ones in the same row and the same column — are added, and the result keeps the same dimensions. There is no clever rule to remember here, which is exactly why the topic is usually taught first.

Addition of matrices is commutative: A + B and B + A always agree, because underneath each cell you are only adding two ordinary numbers, and 3 + 5 is 5 + 3. It is also associative, so (A + B) + C and A + (B + C) come to the same thing and brackets never matter. Neither is true of matrix multiplication, where the order changes everything — which makes these two operations a useful pair to learn together.

How to Subtract Two Matrices

The same move with the second sign turned over: every entry of the second grid is taken away from the entry in the same place in the first. And here the order does matter, in a very particular way.

B − A is A − B with every sign reversed. Our example gave −4 −4 / −4 −4 one way round and 4 4 / 4 4 the other. They are never the same matrix unless every entry comes out zero, which happens only when the two grids were identical to begin with — and A − A is the zero matrix, the grid of zeros that behaves for matrices the way 0 behaves for numbers.

That zero matrix is also why −A is called the additive inverse of A: the two add to nothing. It is worth keeping that separate from the inverse used in multiplication, which is a different idea entirely and lives on the inverse matrix calculator. Students mix the two up constantly, and the names are the only reason.

The commonest mistake in subtraction is simpler than any of that: turning the sign over on most of the entries and missing one. This calculator prints each cell as its own line for exactly that reason, so a slip has nowhere to hide.

When the Sizes Do Not Match

Both matrices must have the same number of rows and the same number of columns. Not similar, not compatible — identical. Each entry is joined to the entry in the same position, so if there is no entry in that position there is nothing to join it to.

This is a stricter rule than the one for multiplying, and it has no escape hatch. When you multiply, a pair that fails one way round sometimes works the other; here a 2×3 and a 3×2 fail in both directions and that is the end of it. When the sizes clash, this calculator tells you which dimension caused it — rows, columns or both — rather than simply refusing.

Scalar Multiplication and Combinations Like 2A − 3B

A single number in front of a matrix is a scalar, and it multiplies every entry. Applying it to the first row and forgetting the rest is one of the two errors examiners see most often in this topic.

Take A = 1 2 3 / 4 5 6 and B = 6 5 4 / 3 2 1. First multiply through: 2A is 2 4 6 / 8 10 12 and 3B is 18 15 12 / 9 6 3. Now subtract entry by entry, and 2A − 3B comes to −16 −11 −6 / −1 4 9. Multiplying first and joining second is the whole discipline; doing it the other way round is where answers go astray.

An expression like this is called a linear combination of the two matrices, and the boxes in front of each grid on this page exist so you can type one directly. Scalars behave predictably: k(A + B) is always kA + kB. They also reach further than they look — multiplying a whole n×n matrix by k multiplies its determinant by kn, not by k, which surprises most people the first time.

How to Use This Matrix Addition and Subtraction Calculator

The screen has three parts: the answer band at the top, the two matrices below it with a small box in front of each, and the keypad underneath.

1. Set the two sizes. Each matrix has its own row and column buttons, from 1 to 4. They are separate on purpose — set them differently and the calculator explains which dimension clashed instead of quietly preventing it.

2. Fill in the cells. Tap a cell to select it, then use the keypad. A cell takes a whole number, a decimal such as 0.25, or a fraction such as 3/4, and anything left blank counts as zero.

3. Choose + or − with the two buttons between the grids, and put numbers in the boxes in front if you want something like 2A − 3B. Leave those boxes empty for a plain sum or difference.

4. Press =, then open Show every cell worked out. You get the scaled grids first if you used a scalar, then one line per cell with the two entries lit up in both matrices, and finally the same pair the other way round so you can see for yourself whether the order mattered.

Every key and control, in one place:

rows / columnsSets the size of that matrix, 1 to 4, each one on its own
the box in frontThe scalar for that matrix. Leave it empty and it counts as 1
+  −Chooses addition or subtraction; the answer updates straight away
the cellsTap to select; blank counts as zero; fractions and decimals both accepted
← →Move to the previous or next cell — they walk across both matrices and through the scalar boxes
A  BJump straight to the box in front of that matrix
±Flips the sign of the cell you are in, so a minus cannot be typed twice by accident
The fraction bar. 3⁄4 stays a fraction all the way to the answer
.Decimal point. 0.25 is read as one quarter, exactly
Deletes one character from the cell you are in
ACClears both matrices and both boxes
=Works it out
My keyboardSwitches that cell to your own keyboard, for anything the pad does not carry
copyThe icon in the band copies the answer, row by row

Change anything after an answer is showing and the band dims and asks you to press = again, so what you are reading always belongs to what is in the cells. There are no limits, no ads and no account.

Matrix Addition and Subtraction FAQ

How do you add two matrices?
Add the entries that sit in the same position. The number in row 1 column 1 of the first is added to the number in row 1 column 1 of the second, and so on through the grid. The answer is the same size as the two you started with.
Can you add matrices of different sizes?
No. Both matrices must have the same number of rows and the same number of columns, because each entry is joined to the entry in the same place. A 2x3 and a 3x2 cannot be added in either order.
Is matrix addition commutative?
Yes. A + B and B + A always give the same answer, because each cell is just two ordinary numbers added together. Subtraction is not: B - A is A - B with every sign turned over, and the two agree only when every entry comes out zero.
What is scalar multiplication of a matrix?
Multiplying a matrix by a single number, which multiplies every entry by that number. Missing one entry is the most common slip in the topic, so this calculator prints the scaled grid in full before joining anything.
What is the zero matrix?
A grid of zeros, and it is what you get from A minus A. It behaves for matrices the way 0 behaves for numbers: adding it changes nothing. The matrix -A is called the additive inverse of A, which is a different idea from the inverse used in multiplication.
How do you work out something like 2A - 3B?
Multiply through first, then subtract. Every entry of A is doubled, every entry of B is tripled, and the second grid is then taken away from the first entry by entry. Doing the subtraction before the multiplying is where answers go wrong.

Same size or nothing, entry against entry, and the scalar on every entry rather than some. Get those three right and the only thing left to watch is which way round you wrote the subtraction.