Matrix Addition and Subtraction Calculator

Your details

Both matrices must be the same size. Rows x Columns. For example 3x4 means 3 rows and 4 columns.
Enter all entries of Matrix A in row-major order separated by commas. For a 2x2 matrix "a,b,c,d" means row 1 = [a b] and row 2 = [c d].
Enter all entries of Matrix B in the same format as Matrix A: row by row, left to right, comma-separated.
Result matrix
6, 8 | 10, 12

The element-wise sum or difference of Matrix A and Matrix B.

Rows2
Columns2
Elements computed4
Rows2
Columns2
Elements computed4

A + B computed for a 2x2 matrix.

  • The result is a 2x2 matrix with 4 elements, each computed by adding the corresponding entries of A and B.
  • Matrix addition and subtraction are commutative for addition (A+B = B+A) but not for subtraction (A-B does not equal B-A in general).
  • These operations require both matrices to have identical dimensions (same number of rows and columns).

Next stepTo multiply matrices, the number of columns in A must equal the number of rows in B - that constraint is stricter than for addition.

= Powered by OnlyCalculators