Matrix Addition

Add and subtract matrices by combining entries at the same row and column positions.

Add matching entries

Each output entry depends only on the two entries in its own row and column. Add all four pairs independently to complete the 2×2 result.

[[1, 2], [3, 4]] + [[2, −1], [0, 3]]

Subtract a whole matrix

Subtract the second matrix entry by entry, including negative values. Dimensions stay unchanged because both operands have the same shape.

[[5, 1], [2, 0]] − [[2, 1], [−1, 4]]

Add rational entries

Fraction arithmetic happens separately in each cell. A common denominator may differ from one position to another.

[[1/2, 1/3], [1, 2]] + [[1, 1/6], [2, 3]]

Practice

Practice: problems like this one, made and checked in your browser.

Recap

  • Matrix addition and subtraction require identical dimensions.
  • Compute each row-column entry independently.
  • Rational and negative entries follow the same positional rule.