➕ Matrix Addition & Subtraction

Matrix Addition & Subtraction

Matrix addition and subtraction combine two same-dimension matrices element-by-element, and this calculator performs the operation with step-by-step working. Shows element-by-element computation. Automatically checks if dimensions match.

➕

Matrix Addition / Subtraction A ± B

Both matrices must have the same dimensions

✓ Add & Subtract✓ Dim Check✓ Free⚡ Loading precision engine…
Matrix A
+
Matrix B
Quick Examples

Matrix Addition & Subtraction

Two matrices can only be added or subtracted if they have the same dimensions (same number of rows and columns):

$$(A \pm B)_{ij} = A_{ij} \pm B_{ij}$$

Properties of Addition

  • Commutative: A + B = B + A
  • Associative: (A + B) + C = A + (B + C)
  • Identity: A + O = A (O = zero matrix)
  • Inverse: A + (−A) = O

Worked Example

For A = [[1,2],[3,4]] and B = [[5,6],[7,8]]: A + B = [[6,8],[10,12]], adding each matching position together. A - B = [[-4,-4],[-4,-4]], subtracting each matching position instead.

Requirements

Both matrices must be exactly the same size — same number of rows and same number of columns. You cannot add a 2×3 matrix to a 3×2 matrix, even though they have the same total number of entries.

Applications

  • Combining datasets of the same shape, such as sales figures from two different months
  • Image processing, where each matrix represents pixel values and addition blends two images
  • Physics, for combining vector quantities like forces represented in matrix form

Frequently Asked Questions

No — matrix addition and subtraction require both matrices to have exactly the same dimensions. There's no way to add a 2×2 matrix to a 3×3 matrix.
Yes — A - B gives a different result than B - A (they're opposite in sign for every entry), unlike addition, where A + B always equals B + A.
This calculator handles two matrices at a time, but you can add a third by taking the result of A + B and adding it to a new matrix C, since matrix addition can be done step by step.

Related Calculators