Mathematical field notes 002

Rows, Columns, and Why You Don’t Multiply Everything

Matrix multiplication: from addresses to answers

If we multiply A by B, how do we find the numbers in C = AB?

We will use the same two matrices throughout. First we will calculate one entry by matching a row with a column, then use the same move to fill the result.

Start reading ← All six notes

01 / The objects and the question

What are we multiplying?

The two grids below are matrices A and B. Our task is to multiply A by B and find every number in the result, C = AB. The question marks show what we still need to calculate.

A2 rows × 3 columns
Matrix A, 2 rows and 3 columns
col 1col 2col 3
row 1213
row 2421
B3 rows × 2 columns
Matrix B, 3 rows and 2 columns
col 1col 2
row 112
row 231
row 324
C2 rows × 2 columns
Matrix C, 2 rows and 2 columns; entries still unknown
col 1col 2
row 1??
row 2??
Shape check. A has 3 columns and B has 3 rows, so the adjacent dimensions match: (2 × 3)(3 × 2). The outside dimensions give C 2 rows and 2 columns, or four entries to calculate. The shared 3 tells us there will be three paired products for each entry; it does not count the output entries.

Each letter names a whole matrix. One number inside a matrix is an entry. We name an entry with a lowercase letter and two subscripts: the first gives its row, the second its column. For example, a21 is row 2, column 1 of A, so a21 = 4.

Let us choose C's lower-left question mark as our first entry. It sits in row 2, column 1, so its address is c21. There is nothing special about starting here; the same move will fill the other three cells.

02 / The visual

How does c21 get its value?

The address selects row 2 of A and column 1 of B. Pair first with first, second with second, third with third. Multiply each pair, then add the three products.

row 2 of A column 1 of B address c21 in C
A2 × 3
Matrix A, 2 rows and 3 columns
col 1col 2col 3
row 1213
row 2421
B3 × 2
Matrix B, 3 rows and 2 columns
col 1col 2
row 112
row 231
row 324
C2 × 2
Matrix C, 2 rows and 2 columns; entries still unknown
col 1col 2
row 1??
row 2??
The long marked strip is A's second row: (4, 2, 1). The marked upright strip is B's first column: (1, 3, 2). Their meeting gives one entry of C, not the whole matrix at once.
Position 14 × 1= 4
Position 22 × 3= 6
Position 31 × 2= 2

Expanded arithmeticc21 = 4 × 1 + 2 × 3 + 1 × 2 = 4 + 6 + 2 = 12

Auxiliary pair grid for A row 2 and B column 1
B pos 1
1
B pos 2
3
B pos 3
2
A pos 1
4
4 × 1
match
4 × 34 × 2
A pos 2
2
2 × 12 × 3
match
2 × 2
A pos 3
1
1 × 11 × 31 × 2
match
This extra grid shows all candidate pairs only to make the choice visible. Use the three cells labeled “match”: positions 1–1, 2–2, and 3–3. The six other combinations do not enter c21. This diagonal belongs to the auxiliary pair grid; it is not a diagonal of A or B.

03 / The worked example

What about the other addresses?

Keep the matrices fixed. Change the row of A or the column of B when the address changes. Each line below makes exactly one entry of C.

Row 1 · Column 1c11 = 2 × 1 + 1 × 3 + 3 × 2= 2 + 3 + 6 = 11
Row 1 · Column 2c12 = 2 × 2 + 1 × 1 + 3 × 4= 4 + 1 + 12 = 17
Row 2 · Column 1c21 = 4 × 1 + 2 × 3 + 1 × 2= 4 + 6 + 2 = 12
Row 2 · Column 2c22 = 4 × 2 + 2 × 1 + 1 × 4= 8 + 2 + 4 = 14

Put the four answers at their addresses:C = 11171214

04 / The compact rule

How do we write the same move generally?

Once the row and column operation is clear, one line can stand for it. Suppose A has m rows and n columns, and B has n rows and p columns. Then C has m rows and p columns.

One entry, at address (i, j)

cij = n∑z = 1 aizbzj

Hold i (the row) and j (the column) fixed. Let z move through the matching positions, from 1 to the shared dimension n. Multiply at each position and add.

In our example n = 3. The formula describes one number cij. Calculating it for every allowed address and placing those numbers in their positions assembles the whole matrix C.

05 / Optional step-through

Follow another address

Select an entry of C. The marked row and column will move with it. The explanation above is complete on its own; this control simply lets you retrace any of the four calculations.

Choose an address in C The first subscript selects A's row; the second selects B's column.

Showing c21
Arow 2 selected
Matrix A; row 2 is marked
col 1col 2col 3
row 1213
row 2421
Bcolumn 1 selected
Matrix B; column 1 is marked
col 1col 2
row 112
row 231
row 324

Result C select one address

Choose an address in the two by two output matrix C
col 1col 2
row 1
row 2

Address c21 step 1 of 4

Take row 2 of A and column 1 of B. Which positions pair up?

06 / Practice

Try the addresses yourself

Begin with the guided address checks, then work the independent questions on paper. Open each answer to check the method, not only the final number.

Guided / recognize

In A = [[2, 1, 3], [4, 2, 1]] and B = [[1, 2], [3, 1], [2, 4]], find a_23 and b_32. Say each address as row, column before reading its value.

Show a hint

For a_23, use A's second row and third column. For b_32, use B's third row and second column.

Show the full reasoning and answer
Worked answer

a_23 = 1 and b_32 = 4.

A's second row is (4, 2, 1); its third entry is 1.

B's third row is (2, 4); its second entry is 4. An address names one entry, not the whole matrix.

Guided / recognize

Let A = [[2, 1, 3], [4, 2, 1]], B = [[1, 2], [3, 1], [2, 4]], and C = AB. For c_12, which row of A and column of B must meet? How many paired products make that one entry?

Show a hint

Read 12 as row 1, column 2. The shared dimension is 3.

Show the full reasoning and answer
Worked answer

Use A row 1, (2, 1, 3), with B column 2, (2, 1, 4). That entry has three paired products.

The first subscript 1 selects A row 1; the second subscript 2 selects B column 2.

Their positions match three times: 2 with 2, 1 with 1, and 3 with 4. The shape's shared 3 sets the count.

Independent / apply

Let A = [[2, 1, 3], [4, 2, 1]], B = [[1, 2], [3, 1], [2, 4]], and C = AB. Calculate c_22. Write the chosen row and column before the arithmetic.

Show a hint

Take A row 2, (4, 2, 1), and B column 2, (2, 1, 4).

Show the full reasoning and answer
Worked answer

c_22 = 4×2 + 2×1 + 1×4 = 8 + 2 + 4 = 14.

Address 22 fixes row 2 of A and column 2 of B.

The corresponding pairs are 4 with 2, 2 with 1, and 1 with 4. Their products add to 14.

Place 14 at row 2, column 2 of C.

Independent / apply

Let A = [[2, 1, 3], [4, 2, 1]] and B = [[1, 2], [3, 1], [2, 4]]. Is BA defined? If so, give its shape and top-left entry.

Show a hint

B is 3 × 2 and A is 2 × 3. For the top-left entry, use B row 1 and A column 1.

Show the full reasoning and answer
Worked answer

BA has shape 3 × 3. Its top-left entry is 1×2 + 2×4 = 10.

The adjacent dimensions in (3 × 2)(2 × 3) match at 2; the outside dimensions are 3 and 3.

B row 1 is (1, 2), and A column 1 is (2, 4). Pair their positions and add 2 + 8 = 10.

Independent / apply

Let P = [[1, 0], [2, 3]] and Q = [[4], [5]]. Find PQ and its shape.

Show a hint

Q has one column, so PQ has one column. Make its two entries using each row of P with that column.

Show the full reasoning and answer
Worked answer

PQ = [[4], [23]], a 2 × 1 matrix.

The shapes (2 × 2)(2 × 1) fit, and the outside dimensions give 2 × 1.

The first entry is 1×4 + 0×5 = 4. The second is 2×4 + 3×5 = 8 + 15 = 23.

Put the two entries in one column: [[4], [23]].

Independent / transfer

A is 2 × 3, B is 3 × 2, and D is any 2 × 3 matrix. Which of AB, BA, AD, and DA are defined? Give each valid output shape.

Show a hint

For each order, compare only the adjacent dimensions. Then read the outside dimensions if they match.

Show the full reasoning and answer
Worked answer

AB is defined and is 2 × 2. BA is defined and is 3 × 3. AD and DA are undefined.

AB has shapes (2 × 3)(3 × 2): the adjacent 3s match, giving 2 × 2.

BA has shapes (3 × 2)(2 × 3): the adjacent 2s match, giving 3 × 3.

AD and DA both have shapes (2 × 3)(2 × 3). Their adjacent dimensions are 3 and 2, so neither product is defined.

Independent / transfer

Without calculating entries, describe (4 × 9)(9 × 6): output shape, total output entries, and paired products per entry.

Show a hint

The outside numbers make the output shape. Count its cells, then use the shared dimension for the number of products inside each cell.

Show the full reasoning and answer
Worked answer

The output is 4 × 6, with 24 entries and 9 paired products in each entry.

The adjacent 9s match, so the product is defined. The outside dimensions 4 and 6 give its shape.

A 4 × 6 matrix has 4×6 = 24 entries. The shared 9 means each entry adds nine corresponding products.

Independent / transfer

Let A = [[2, 1, 3], [4, 2, 1]], B = [[1, 2], [3, 1], [2, 4]], and C = AB. Someone tries nine every-to-every products for c_21. Which row and column should they choose, how should they pair positions instead, and what is c_21?

Show a hint

Write the two three-number strips side by side. Pair only entries at the same position.

Show the full reasoning and answer
Worked answer

Make three corresponding products: 4×1 + 2×3 + 1×2 = 12.

For c_21, A row 2 is (4, 2, 1) and B column 1 is (1, 3, 2).

Pair first with first, second with second, and third with third, giving 4, 6, and 2.

Add those three products to get 12. The shared dimension is 3, so nine every-to-every products answer a different question.

FIELD NOTES / RECALL

Practice cards from note 002

Read the front, decide on an answer, then reveal the reasoning.

Card 1 of 8

Front / questionrecognize

In A = 213421 and B = 123124, find a23 and b32. Say each address as row, column before reading its value.

Card 1 of 8: In A = [[2, 1, 3], [4, 2, 1]] and B = [[1, 2], [3, 1], [2, 4]], find a_23 and b_32. Say each address as row, column before reading its value.. Answer hidden.

Card 1 / recognize

Front / question

In A = [[2, 1, 3], [4, 2, 1]] and B = [[1, 2], [3, 1], [2, 4]], find a_23 and b_32. Say each address as row, column before reading its value.

Back / answer

a_23 = 1 and b_32 = 4.

A's second row is (4, 2, 1); its third entry is 1. B's third row is (2, 4); its second entry is 4. An address names one entry, not the whole matrix.

Card 2 / recognize

Front / question

Let A = [[2, 1, 3], [4, 2, 1]], B = [[1, 2], [3, 1], [2, 4]], and C = AB. For c_12, which row of A and column of B must meet? How many paired products make that one entry?

Back / answer

Use A row 1, (2, 1, 3), with B column 2, (2, 1, 4). That entry has three paired products.

The first subscript 1 selects A row 1; the second subscript 2 selects B column 2. Their positions match three times: 2 with 2, 1 with 1, and 3 with 4. The shape's shared 3 sets the count.

Card 3 / apply

Front / question

Let A = [[2, 1, 3], [4, 2, 1]], B = [[1, 2], [3, 1], [2, 4]], and C = AB. Calculate c_22. Write the chosen row and column before the arithmetic.

Back / answer

c_22 = 4×2 + 2×1 + 1×4 = 8 + 2 + 4 = 14.

Address 22 fixes row 2 of A and column 2 of B. The corresponding pairs are 4 with 2, 2 with 1, and 1 with 4. Their products add to 14. Place 14 at row 2, column 2 of C.

Card 4 / apply

Front / question

Let A = [[2, 1, 3], [4, 2, 1]] and B = [[1, 2], [3, 1], [2, 4]]. Is BA defined? If so, give its shape and top-left entry.

Back / answer

BA has shape 3 × 3. Its top-left entry is 1×2 + 2×4 = 10.

The adjacent dimensions in (3 × 2)(2 × 3) match at 2; the outside dimensions are 3 and 3. B row 1 is (1, 2), and A column 1 is (2, 4). Pair their positions and add 2 + 8 = 10.

Card 5 / apply

Front / question

Let P = [[1, 0], [2, 3]] and Q = [[4], [5]]. Find PQ and its shape.

Back / answer

PQ = [[4], [23]], a 2 × 1 matrix.

The shapes (2 × 2)(2 × 1) fit, and the outside dimensions give 2 × 1. The first entry is 1×4 + 0×5 = 4. The second is 2×4 + 3×5 = 8 + 15 = 23. Put the two entries in one column: [[4], [23]].

Card 6 / transfer

Front / question

A is 2 × 3, B is 3 × 2, and D is any 2 × 3 matrix. Which of AB, BA, AD, and DA are defined? Give each valid output shape.

Back / answer

AB is defined and is 2 × 2. BA is defined and is 3 × 3. AD and DA are undefined.

AB has shapes (2 × 3)(3 × 2): the adjacent 3s match, giving 2 × 2. BA has shapes (3 × 2)(2 × 3): the adjacent 2s match, giving 3 × 3. AD and DA both have shapes (2 × 3)(2 × 3). Their adjacent dimensions are 3 and 2, so neither product is defined.

Card 7 / transfer

Front / question

Without calculating entries, describe (4 × 9)(9 × 6): output shape, total output entries, and paired products per entry.

Back / answer

The output is 4 × 6, with 24 entries and 9 paired products in each entry.

The adjacent 9s match, so the product is defined. The outside dimensions 4 and 6 give its shape. A 4 × 6 matrix has 4×6 = 24 entries. The shared 9 means each entry adds nine corresponding products.

Card 8 / transfer

Front / question

Let A = [[2, 1, 3], [4, 2, 1]], B = [[1, 2], [3, 1], [2, 4]], and C = AB. Someone tries nine every-to-every products for c_21. Which row and column should they choose, how should they pair positions instead, and what is c_21?

Back / answer

Make three corresponding products: 4×1 + 2×3 + 1×2 = 12.

For c_21, A row 2 is (4, 2, 1) and B column 1 is (1, 3, 2). Pair first with first, second with second, and third with third, giving 4, 6, and 2. Add those three products to get 12. The shared dimension is 3, so nine every-to-every products answer a different question.

Where it appears again

This row-and-column move is a foundation

A matrix product can describe the composition of transformations. In a later note, a square matrix A and nonzero eigenvector v satisfy Av = λv for some scalar λ. Step zero leaves v unchanged; for whole-number steps n ≥ 1, repeated application gives Aⁿv = λⁿv. This is repeated matrix application, not entrywise squaring. A real matrix need not have a real eigenvector.

Continue through the six-note volume

Each guide begins with a plain-language question and develops one worked example before introducing compact notation.

See the complete reading order and all six guides →

For real scaling: λ = 2 doubles the size; ½ halves it; −½ halves it and reverses direction each time; 1 leaves v unchanged; −1 reverses direction without changing size; and 0 sends v to the zero vector, which has no direction. With λ = −½ the first four states are v, −v/2, v/4, −v/8.

One-minute reference

The move in four lines

  1. Check shape: the adjacent dimensions must match. (2 × 3)(3 × 2) gives a 2 × 2 output.
  2. Choose one address c_ij: i fixes the row of A, and j fixes the column of B.
  3. Pair position 1 with 1, position 2 with 2, and so on through the shared dimension. Multiply within each pair and add.
  4. One sum gives one c_ij. Repeat over all valid output addresses to assemble C.

Keep this note

Read or practise on paper.

The guide and worked answers are separate PDFs. The volume card deck is set up for duplex printing.