TITLE: Why is the matrix multiplication defined as it is?
QUESTION [11 upvotes]: Matrix multiplication is defined as:

Let $A$ be a $n \times m$ matrix and $B$ a $m\times p$ matrix, the product $AB$ is defined as a matrix of size $n\times p$ such that $(AB)_i,_j = \sum\limits_{k=1}^mA_i,_kB_k,_j$.

For what good reason did mathematicians define it like this?

REPLY [8 votes]: One reason is that it gives you associativity with a vector: If $A$ and $B$ are matrices and $x$ is a vector, then
$$
(AB)x = A(Bx)
$$
ETA: This doesn't say anything more than Thomas's answer, by the way; I thought it might help if it were presented in a more tangible way, though.