TITLE: Why does matrix multiplication represent linear transformation compositions?
QUESTION [5 upvotes]: I know it's probably a silly question, but I'm trying to figure out why was matrix multiplication (the standard one) defined the way it was defined.
I know that it was defined like that so we would gain invariance under change of basis: $PAP^{-1}+PBP^{-1}=P(A+B)P^{-1}$ and $(PAP^{-1})(PBP^{-1})=PABP^{-1}$ and that ofcourse the case.
But another explanation that was suggested is: "We defined matrix multiplication this way so that if $A$ is the matrix of a linear transformation $T_1$ with respect to some basis $s$ and $B$ is the matrix of a linear transformation $T_2$ with respect to the same basis $s$ then $AB$ is the matrix of $T_1$ composition with $T_2$ (I don't know the command for composition operator) with respect to basis $s$.
Again, this is a completely legitimate aspiration, but I fail to see why it follows. Why is linear transformation composition equivalent to matrix multiplication?

REPLY [3 votes]: Hint:
test that:
$$
A(B\vec x)=(AB) \vec x
$$
Using for $\vec x$ the canonical basis. 
It is easy for transformations in a $2$ dimensional space and requaire a bit more work for an $n-$ dimensionale space.

Given
$$
A=\begin{bmatrix}
a_{11}&a_{12}\\
a_{21}&a_{22}
\end{bmatrix}
\qquad 
B=\begin{bmatrix}
b_{11}&b_{12}\\
b_{21}&b_{22}
\end{bmatrix}
$$
By row-column multiplication we have:
$$
A(B\vec x)=
\begin{bmatrix}
a_{11}&a_{12}\\
a_{21}&a_{22}
\end{bmatrix}
\left( 
\begin{bmatrix}
b_{11}&b_{12}\\
b_{21}&b_{22}
\end{bmatrix}
\begin{bmatrix}
x\\
y
\end{bmatrix}
\right)=
\begin{bmatrix}
a_{11}&a_{12}\\
a_{21}&a_{22}
\end{bmatrix}
\begin{bmatrix}
b_{11}x+b_{12}y\\
b_{21}x+b_{22}y
\end{bmatrix}=
$$
$$
=
\begin{bmatrix}
a_{11}(b_{11}x+b_{12}y)+a_{12}(b_{21}x+b_{22}y)\\
a_{21}(b_{11}x+b_{12}y)+a_{22}(b_{21}x+b_{22}y)
\end{bmatrix}
$$
That, reordering becomes:
$$
\begin{bmatrix}
(a_{11}b_{11}+a_{12}b_{21})x+(a_{11}b_{12}+a_{12}b_{22})y\\
(a_{21}b_{11}+a_{22}b_{21})x+(a_{21}b_{12}+a_{22}b_{22})y
\end{bmatrix}=(AB)\vec x
$$