Matrix Calculator · Practical guide
How to Add and Subtract Matrices
Add or subtract matching elements — the two matrices just need to be the same size.
At a glance
The Element-by-Element Rule
Matrix addition and subtraction work on matching positions: the element in row 1, column 1 of A combines with the element in row 1, column 1 of B, and so on. Unlike multiplication, there are no dot products and no order tricks — A + B always equals B + A.
Interactive tool
Matrix Calculator
Enter your own values, then compare the result with the examples below.
Matrix A
Matrix B
Matrix A
Matrix B
Result
Worked Example: Addition
Let A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]. Then:
A + B = [[1+5, 2+6], [3+7, 4+8]] = [[6, 8], [10, 12]]
Worked Example: Subtraction
Subtraction works the same way, position by position:
A - B = [[1-5, 2-6], [3-7, 4-8]] = [[-4, -4], [-4, -4]]
Enter these same values into the calculator above with Addition or Subtraction selected and you will get exactly these results, plus the determinant of each matrix.
The One Requirement: Matching Sizes
You can only add or subtract matrices of identical dimensions — 2x2 with 2x2, or 3x3 with 3x3. A 2x2 plus a 3x3 is undefined because some positions have no partner. That is why the calculator offers separate tabs for the two sizes rather than a mixed mode.
Frequently Asked Questions
Is matrix addition commutative?
Yes. A + B = B + A always, because each position is ordinary addition of two numbers. Matrix multiplication is the operation where order matters.
Can I add a 2x3 matrix to a 3x2 matrix?
No. Addition requires exactly matching dimensions — same number of rows and same number of columns in both matrices.
What is the zero matrix?
A matrix where every element is 0. Adding it to any matrix leaves that matrix unchanged, the same role 0 plays in ordinary arithmetic.
Does subtraction affect the determinant in a predictable way?
No simple rule connects det(A - B) to det(A) and det(B). Compute the difference matrix first, then take its determinant — the calculator shows all of these together.