Why matrix multiplication is defined this way
7 min read
Short answer
A matrix is a recipe for a linear map, and the product is defined so that it is the recipe for doing first, then . The row-times-column rule is not a convention someone chose; it is the only formula that makes true for every vector .
A matrix is what a linear map does to the basis
A linear map is completely determined by what it does to the standard basis vectors , because every vector is a combination of them and linearity lets you carry the combination through. The columns of the matrix are exactly those images: column of is .
So a matrix is a table of "where does each basis vector land?" Once you know that, is not a rule to memorize. It is just linearity.
Deriving the formula
Ask what the composite map does to a basis vector . First sends it to column of , which is . Then acts on that sum, and linearity gives . Reading off the -th coordinate of this result:
That is the row-times-column rule. Row of is paired with column of because column of says how much of each to mix in. Nothing else would make the composite work.
What the definition forces
Sizes. To feed the output of into , the output dimension of must equal the input dimension of . That is why an matrix times an matrix is defined and the inner sizes must match.
Associativity. Composing functions is associative, so for free. You never need to expand indices to prove it.
No commutativity. "Put on socks, then shoes" differs from "shoes, then socks". In general , and one product can exist while the other does not.
Not entrywise. Multiplying matching entries (the Hadamard product) is a different operation. It does not compose maps, so it does not behave like a transformation at all.
Worked example
Let (a shear) and (a 90° rotation). Compute and and check on .
Rows of against columns of :
They differ, so order matters.
Check: , then . That is column 1 of , as the definition promises.
Try it yourself
For and , compute and . Are they equal?
Show the answer
and . They are not equal, so these two matrices do not commute.
Keep going with practice
Vidi's linear algebra lessons build matrices from the maps they describe, so the multiplication rule stops feeling arbitrary.