"Kestrel ran the short course 3 times and the long course 2 times," Wren reads from the log.
"Heron ran them 1 and 4. That is a 2 by 2 matrix of runs."
"A short run is 2 laps and 1 buoy turn," Comet says. "A long run is 5 laps and 3 turns."
"Another 2 by 2," Wren says. "How many laps did Kestrel row altogether?"
Comet works it out. "3 × 2 + 2 × 5 = 16. A row of runs times a column of laps."
Nova projects the row sliding across the column. "Would you like a hint? Multiply pair by pair, then add."
"What do you notice?" Wren says. "Four of those gives a whole new matrix. Runs times per-run equals totals."
To multiply A × B, each entry of the answer comes from one row of A and one column of B.
Lay the row on the column, multiply pair by pair, and add the products. That sum is one entry.
The entry in row i, column j of AB uses row i of A and column j of B.
The sizes must fit: the number of columns of A equals the number of rows of B. A 2 by 2 times a 2 by 2 is a 2 by 2.
Runs R = [3 2; 1 4] (rows Kestrel, Heron; columns short, long). Per run P = [2 1; 5 3] (rows short, long; columns laps, turns).
Kestrel's laps: row 1 of R on column 1 of P: 3 × 2 + 2 × 5 = 16.
Kestrel's turns: row 1 of R on column 2 of P: 3 × 1 + 2 × 3 = 9.
Heron's laps: 1 × 2 + 4 × 5 = 22. Heron's turns: 1 × 1 + 4 × 3 = 13.
So RP = [16 9; 22 13]: rows are boats, columns are total laps and total turns.
Before multiplying, read the labels. R's columns are courses. P's rows are courses. They match, so the product makes sense.
The answer keeps R's row labels (boats) and P's column labels (laps, turns). The shared label, courses, is summed away.
Try it the other way, P × R. P's columns are laps and turns, but R's rows are boats. The labels do not match.
The numbers still multiply, PR = [7 8; 18 22], but the entries mean nothing. AB and BA are different matrices.
| Product | Row label | Column label | Entry (row 1, column 1) |
|---|---|---|---|
| R × P | boat | laps or turns | 3 × 2 + 2 × 5 = 16 |
| P × R | course | course | 2 × 3 + 1 × 1 = 7 |
The zero matrix [0 0; 0 0] adds nothing. A + 0 = A, just as a + 0 = a for numbers.
The identity matrix I = [1 0; 0 1] has 1s on the diagonal and 0s elsewhere. A × I = A and I × A = A, like a × 1 = a.
Check: [3 2; 1 4] × [1 0; 0 1] = [3 2; 1 4]. Each row meets a column with a single 1, and the entry survives.
| Statement | True or false? |
|---|---|
| Each entry of AB comes from a row of A and a column of B. | ? |
| 3 × 2 + 2 × 5 = 16 | ? |
| AB and BA are always equal. | ? |
| A × I = A for the identity matrix I. | ? |
| A 2 by 3 matrix times a 2 by 3 matrix is allowed. | ? |
Excellent. Tomorrow the boat cutout goes on the grid and a matrix stretches, flips and shears it in the Boathouse Lab.