How this calculator works
Matrix addition combines entries in the same position. The entry in row i and column j of the result is the sum, or difference, of the entries in that position in A and B. Both matrices must have identical dimensions; there is no way to add matrices of different shapes. The operation is commutative for addition and follows the usual sign rules for subtraction.
Formula
(A + B)ij = Aij + Bij. Subtraction uses (A - B)ij = Aij - Bij.
Worked example
Adding the matrices with rows 1, 2; 3, 4 and 5, 6; 7, 8 gives rows 6, 8; 10, 12. Subtracting the second from the first gives rows -4, -4; -4, -4.
Advertisement
Frequently asked questions
Can I add a 2 by 3 matrix to a 3 by 2 matrix?
No. Addition needs matching dimensions, so both matrices must have the same number of rows and the same number of columns.
Is matrix addition commutative?
Yes. A + B equals B + A entry by entry. Matrix multiplication, by contrast, is not generally commutative.
Why does the result keep the same dimensions?
Each output entry comes from one entry of A and one entry of B in the same position, so the result has the shared shape.