Open Mathhh

Matrix multiplication

Matrices · worksheets 19 to 27 · 3 min read

I can

  • multiply two matrices, including a 2 × 3 by a 3 × 2
  • find a single entry of a product
  • see that AB and BA can be different
  • square a matrix

Key idea

Each entry of AB comes from one row of A and one column of B. Multiply along, then add. The entry in row 2, column 1 of AB uses row 2 of A and column 1 of B.

Order matters. AB and BA are usually different. A² means A × A.

A 2 × 3 matrix times a 3 × 2 matrix gives a 2 × 2 matrix. Each entry then adds three products. Give answers row by row.

Worked examples

Example 1: AB

Watch it: A = [[1, 2], [3, 4]] and B = [[0, 1], [5, 2]]: AB, step by step:

  1. Write A and B. A has 2 rows and 2 columns. B has 2 rows and 2 columns.
  2. Row 1 of A with column 1 of B: 1 × 0 + 2 × 5 = 10.
  3. Row 1 of A with column 2 of B: 1 × 1 + 2 × 2 = 5.
  4. Row 2 of A with column 1 of B: 3 × 0 + 4 × 5 = 20.
  5. Row 2 of A with column 2 of B: 3 × 1 + 4 × 2 = 11.
  6. So AB = (10, 5, 20, 11), row by row.

A = [[1, 2], [3, 4]] and B = [[0, 1], [5, 2]].

  1. Row 1: 1 × 0 + 2 × 5 = 10 and 1 × 1 + 2 × 2 = 5.
  2. Row 2: 3 × 0 + 4 × 5 = 20 and 3 × 1 + 4 × 2 = 11.

AB = (10, 5, 20, 11)

Example 2: BA with the same matrices

Watch it: the same A and B: BA, step by step:

  1. Write B and A. B has 2 rows and 2 columns. A has 2 rows and 2 columns.
  2. Row 1 of B with column 1 of A: 0 × 1 + 1 × 3 = 3.
  3. Row 1 of B with column 2 of A: 0 × 2 + 1 × 4 = 4.
  4. Row 2 of B with column 1 of A: 5 × 1 + 2 × 3 = 11.
  5. Row 2 of B with column 2 of A: 5 × 2 + 2 × 4 = 18.
  6. So BA = (3, 4, 11, 18), row by row.
  1. Row 1: 0 × 1 + 1 × 3 = 3 and 0 × 2 + 1 × 4 = 4.
  2. Row 2: 5 × 1 + 2 × 3 = 11 and 5 × 2 + 2 × 4 = 18.

BA = (3, 4, 11, 18), which is not AB

Example 3: 2 × 3 times 3 × 2

Watch it: A = [[1, 2, 0], [0, 1, 3]] (2 × 3) and B = [[2, 1], [1, 0], [0, 4]] (3 × 2): AB, step by step:

  1. Write A and B. A has 2 rows and 3 columns. B has 3 rows and 2 columns.
  2. Row 1 of A with column 1 of B: 1 × 2 + 2 × 1 + 0 × 0 = 4.
  3. Row 1 of A with column 2 of B: 1 × 1 + 2 × 0 + 0 × 4 = 1.
  4. Row 2 of A with column 1 of B: 0 × 2 + 1 × 1 + 3 × 0 = 1.
  5. Row 2 of A with column 2 of B: 0 × 1 + 1 × 0 + 3 × 4 = 12.
  6. So AB = (4, 1, 1, 12), row by row.

A = [[1, 2, 0], [0, 1, 3]] and B = [[2, 1], [1, 0], [0, 4]].

  1. Row 1: 1 × 2 + 2 × 1 + 0 × 0 = 4 and 1 × 1 + 2 × 0 + 0 × 4 = 1.
  2. Row 2: 0 × 2 + 1 × 1 + 3 × 0 = 1 and 0 × 1 + 1 × 0 + 3 × 4 = 12.

AB = (4, 1, 1, 12)

Try it

A = [[7, 6], [3, 0]], B = [[3, 2], [3, −1]]. Find the entry in row 1, column 1 of AB.
Show answer39
A = [[1, 3], [1, 2]], B = [[2, 4], [−2, 4]]. Find BA. Give the answer row by row.
Show answer(6, 14, 2, 2)
A = [[−3, 3], [0, 3]]. Find A². Give the answer row by row.
Show answer(9, 0, 0, 9)
A = [[−1, −1], [−3, −3]]. Find A². Give the answer row by row.
Show answer(4, 4, 12, 12)
A = [[−1, −2, 1], [−2, 4, 4]] (2 × 3), B = [[4, 3], [0, −2], [4, −3]] (3 × 2). Find AB (2 × 2). Give the answer row by row.
Show answer(0, -2, 8, -26)

Common mistakes

  • Squaring each entry to get A². You must multiply the matrix by itself.
  • Finding AB when the question asks for BA. Check which matrix is on the left.

Remember

  • Row of the left matrix times column of the right matrix.
  • AB and BA are usually not equal.

Practise this

Worksheets 19 to 27 of Matrices practise this note. Sign in to Mathhh, write your answers by hand and see your marks straight away.

Open Mathhh

More Matrices notes

Keep learning

All Matrices notes · All study notes