Steply

Multiplying matrices

Row times column, AB ≠ BA · Algebra 2 · 20 problems, easy to harder

▶ Watch the first one solved

How we do it

  1. Check the sizes
  2. Work out AB
  3. Work out BA
  4. Compare
  5. Check

The steps for AB and BA for A = [1, 2; 0, 3], B = [2, 0; 1, 1]. Every solution names its steps, so you always know what comes next.

Worked examples

Calculate [1, 2; 3, 4] × [2, 0; 1, 3] Easy

The question

Question: multiply these two matrices.

[1, 2; 3, 4] × [2, 0; 1, 3]

1 Check the sizes

2 Row times column

Each entry of the answer is one row of the first matrix, times one column of the second.

= [1 × 2 + 2 × 1, 1 × 0 + 2 × 3; 3 × 2 + 4 × 1, 3 × 0 + 4 × 3]

Careful!

We do not just multiply the entries in the same place.

Each entry is a whole row times a whole column.

Careful: not entry × entry ✗

3 Work out each entry

First we work out every times.

= [2 + 2, 0 + 6; 6 + 4, 0 + 12]

Then we add.

The answer: rows 4, 6 and 10, 12.

= [4, 6; 10, 12]

4 Check

Let's check each entry, adding its products the other way round.

2 + 2 = 4, 6 + 0 = 6
4 + 6 = 10, 12 + 0 = 12

Every entry matches.

So the answer is right!

Let's look back.

First: check the sizes.

Then: row times column.

Then: work out each entry.

Last: check.

Answer
= [4, 6; 10, 12]

▶ Watch it solved

Calculate [2, -1; 3, 4] × [1, 5; -2, 3] Medium

The question

Question: multiply these two matrices.

[2, −1; 3, 4] × [1, 5; −2, 3]

1 Check the sizes

2 Row times column

Each entry of the answer is one row of the first matrix, times one column of the second.

= [2 × 1 + −1 × (−2), 2 × 5 + −1 × 3; 3 × 1 + 4 × (−2), 3 × 5 + 4 × 3]

Careful!

We do not just multiply the entries in the same place.

Each entry is a whole row times a whole column.

Careful: not entry × entry ✗

3 Work out each entry

First we work out every times.

= [2 + 2, 10 + (−3); 3 + (−8), 15 + 12]

Then we add.

The answer: rows 4, 7 and −5, 27.

= [4, 7; −5, 27]

4 Check

Let's check each entry, adding its products the other way round.

2 + 2 = 4, −3 + 10 = 7
−8 + 3 = −5, 12 + 15 = 27

Every entry matches.

So the answer is right!

Let's look back.

First: check the sizes.

Then: row times column.

Then: work out each entry.

Last: check.

Answer
= [4, 7; −5, 27]

▶ Watch it solved

AB and BA for A = [1, 2; 0, 3], B = [2, 0; 1, 1] Harder

The question

Question: work out A B and B A.

Is the order important?

A = [1, 2; 0, 3]

A B means A times B.

B A means B times A.

B = [2, 0; 1, 1]

1 Check the sizes

Both are 2 by 2.

The inside numbers are 2 and 2 both ways.

So we can multiply in both orders, and both answers are 2 by 2.

2 Work out AB

Careful!

In A B, the rows come from A and the columns from B.

Careful: A B: rows of A × columns of B
AB = [1 × 2 + 2 × 1, 1 × 0 + 2 × 1; 0 × 2 + 3 × 1, 0 × 0 + 3 × 1]

First we work out every times.

AB = [2 + 2, 0 + 2; 0 + 3, 0 + 3]

Then we add.

So A B is rows 4, 2 and 3, 3.

AB = [4, 2; 3, 3]

3 Work out BA

Now the other order: rows of B, columns of A.

BA = [2 × 1 + 0 × 0, 2 × 2 + 0 × 3; 1 × 1 + 1 × 0, 1 × 2 + 1 × 3]

First we work out every times.

BA = [2 + 0, 4 + 0; 1 + 0, 2 + 3]

Then we add.

So B A is rows 2, 4 and 1, 5.

BA = [2, 4; 1, 5]

4 Compare

The two answers are different.

So A B is not the same as B A: with matrices, the order matters!

AB ≠ BA

5 Check

Let's check A B: each entry's products added the other way round.

2 + 2 = 4, 2 + 0 = 2
3 + 0 = 3, 3 + 0 = 3

A B is right.

And B A the same way.

0 + 2 = 2, 0 + 4 = 4
0 + 1 = 1, 3 + 2 = 5

B A is right too.

So the answer is right!

Let's look back.

First: check the sizes.

Then: work out AB.

Then: work out BA.

Then: compare.

Last: check.

Answer
AB ≠ BA

▶ Watch it solved

Practice

Try each one, then open the answer. Stuck? Open the problem to watch every step.

Easy

  1. [1, 2; 3, 4] × [2, 0; 1, 3]
    Answer
    = [4, 6; 10, 12]
  2. [2, 1; 0, 3] × [4; 5]
    Answer
    = [13; 15]
  3. [3, -1] × [2, 4; 1, 5]
    Answer
    = [5, 7]
  4. [1, 0; 0, 1] × [7, 2; -3, 5]
    Answer
    = [7, 2; −3, 5]
  5. [2, 3] × [4; 1]
    Answer
    = [11]
  6. [1, 2, 3] × [2; 0; 1]
    Answer
    = [5]
  7. [3, 1; 1, 2] × [1, 1; 2, 0]
    Answer
    = [5, 3; 5, 1]

Medium

  1. [2, -1; 3, 4] × [1, 5; -2, 3]
    Answer
    = [4, 7; −5, 27]
  2. [1, 2, 0; -1, 3, 2] × [2, 1; 0, -1; 3, 4]
    Answer
    = [2, −1; 4, 4]
  3. [4, 0; -2, 1; 3, 5] × [1, -1; 2, 3]
    Answer
    = [4, −4; 0, 5; 13, 12]
  4. [3, 1; -2, 5] × [-1; 4]
    Answer
    = [1; 22]
  5. [-1, 2; 0, 3] × [2, -3; 4, 1]
    Answer
    = [6, 5; 12, 3]
  6. [2, 1, -3] × [1; 4; 2]
    Answer
    = [0]
  7. [5, -2; 1, 0] × [3, 1; 2, -4]
    Answer
    = [11, 13; 3, 1]

Harder

  1. AB and BA for A = [1, 2; 0, 3], B = [2, 0; 1, 1]
    Answer
    AB ≠ BA
  2. AB and BA for A = [2, -1; 3, 1], B = [0, 1; 1, 2]
    Answer
    AB ≠ BA
  3. [1, 2, 3; 0, 1, 4] × [1; -1; 2]
    Answer
    = [5; 7]
  4. [2, 0, -1; 1, 3, 2] × [1, 2; 0, -1; 4, 1]
    Answer
    = [−2, 3; 9, 1]
  5. [1, 2] × [3, 4]
    Answer
    2 ≠ 1: we cannot multiply
  6. [1, 2; 3, 4] × [1, 2, 3]
    Answer
    2 ≠ 1: we cannot multiply