Linear Algebra Foundations

Lesson 5 of 8

Add and subtract matrices

Add or subtract two matrices of the same size, one position at a time.

The idea

Matrices are added the same way as vectors: entry by entry. The entry in row 1, column 1 of A is added to the entry in row 1, column 1 of B, and so on for every position.

That only makes sense when both matrices have the same size, so every entry has a partner.

Worked example: adding

A equals a 2 by 2 matrix, row 1: 1, 4; row 2: 2, 3 B equals a 2 by 2 matrix, row 1: 5, 0; row 2: 1, 2

Find AplusB.

  1. Check the sizes

    A and B are both 2×2, so A + B is defined and is also 2×2.

  2. Add matching entries

    A plus B equals a matrix with row 1: 1 plus 5, 4 plus 0; row 2: 2 plus 1, 3 plus 2
  3. Simplify

    A plus B equals a 2 by 2 matrix, row 1: 6, 4; row 2: 3, 5

Worked example: subtracting

For A − B, subtract each entry of B from the matching entry of A. Keep the order: A’s entry comes first.

A equals a 2 by 2 matrix, row 1: 7, 5; row 2: 4, 9 B equals a 2 by 2 matrix, row 1: 2, 3; row 2: 4, 1

Find AminusB.

  1. Check the sizes

    A and B are both 2×2, so A − B is defined and is also 2×2.

  2. Subtract matching entries

    A minus B equals a matrix with row 1: 7 minus 2, 5 minus 3; row 2: 4 minus 4, 9 minus 1
  3. Simplify

    A minus B equals a 2 by 2 matrix, row 1: 5, 2; row 2: 0, 8

When you cannot add

These two matrices cannot be added, because one is 2×3 and the other is 2×2. Some entries would have no partner.

a 2 by 3 matrix, row 1: 1, 0, 2; row 2: 3, 1, 4 plus a 2 by 2 matrix, row 1: 5, 1; row 2: 2, 6 is not defined

Once 2×2 feels comfortable, practice will also include 2×3 matrices. The rule is exactly the same.

Common mistakes

  • Pairing the wrong entries. Only entries in the same row and the same column go together.
  • Subtracting in the wrong order. In A − B, take B’s entry away from A’s.
  • Sign slips with negatives. 4 − (−2) = 6.

Try one

Add two matricesPositive numbers

This first one is guided: the first hint is already open below the question.

A equals a 2 by 2 matrix, row 1: 4, 2; row 2: 6, 1 B equals a 2 by 2 matrix, row 1: 1, 2; row 2: 8, 5

Find AplusB.

A + B (2×2)

Fill each box in reading order.

  1. Hint 1

    Both matrices are 2×2, so they can be added. Add the entries that sit in the same position.

Question code mat-add/A/35/v1.0.0