Why matrix multiplication works that way: when linear maps become matrices
The definition of matrix multiplication looks arbitrary — until you realize it encodes composition of linear maps. We compute a concrete composition by hand and watch the "row-times-column" rule emerge naturally.
Most students, on first encountering the definition of matrix multiplication, have the same reaction: why on earth is it defined this way?
Given and , the product is
Multiplying entry-by-entry would be much simpler. But the "row-times-column" rule is not a convention chosen for aesthetic reasons. It is forced on us by the fact that matrices represent linear maps, and matrix multiplication represents composition.
1 Matrices as linear maps
A linear map is completely determined by what it does to a basis. If we know and , we know everything.
The recipe is simple: place the images of the basis vectors as columns. The resulting matrix is the representation of .
2 Composition forces the rule
Here is the crux. Take two linear maps and compose them — apply one after the other — and compute the representation matrix of the composition by hand.
Now look carefully at what happened. To get the entry of the result, we took the dot product of the -th row of with the -th column of . That is precisely the definition of matrix multiplication:
A perfect match.
3 Size constraints become obvious
An matrix represents a map , and a matrix represents a map . The composition makes sense only when the output of can be fed into — that is, when . The result is a map , hence an matrix.
4 Associativity is just composition
The associative law for matrices is a reflection of the associativity of function composition: . Applying three maps in succession, it does not matter which pair you compose first — the final result is the same. There is nothing to prove about matrices specifically; associativity is inherited from the nature of function composition itself.
5 Why
The non-commutativity of matrix multiplication is also transparent from the map perspective.
6 Change of basis: the same map in a different outfit
The same linear map can look very different depending on the choice of basis. If is the change-of-basis matrix from basis to basis , then the representation matrix transforms as
7 The takeaway
The "row-times-column" rule for matrix multiplication is not an arbitrary convention. It is the unique rule that makes the product of two matrices equal the matrix of the composed maps. Size constraints, associativity, non-commutativity — they all follow from thinking of matrices not as tables of numbers but as proxies for linear maps.
Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.