Let \(L_A:\mathbb{R}^n\longrightarrow \mathbb{R}^m\) and \(L_B:\mathbb{R}^p\longrightarrow \mathbb{R}^n\) be matrix transformations, determined by the \(m\times n\) matrix \(A\) and \(n\times p\) matrix \(B\). Consider a vector \(\vec{v}\in\mathbb{R}^p\). We first apply \(L_B\) and get the vector \(L_B(\vec{v})\in \mathbb{R}^n\). On this vector we can apply \(L_A\) and get the vector \(L_A\bigl(L_B(\vec{v})\bigr)\). In this way we have the composite mapping \(L_A\circ L_B\).
Let \(L_A:\mathbb{R}^n\longrightarrow \mathbb{R}^m\) and \(L_B:\mathbb{R}^p\longrightarrow \mathbb{R}^n\) be matrix transformations, determined by the \(m\times n\) matrix \(A\) and \(n\times p\) matrix \(B\). Then, the composition \(L_A\circ L_B\) is a mapping from \(\mathbb{R}^p\) into \(\mathbb{R}^m\) that is also a matrix transformation, and the corresponding matrix is equal to the matrix product \(A\cdot B\).
In formula language: \[L_A\circ L_B = L_{A\,B}\]
Multiplication of matrices is precisely defined such that this statement is true.
For any vector #\vec{x}\in\mathbb{R}^p#, the image #L_B(\vec{x})# is equal to the matrix product #B\vec{x}\in\mathbb{R}^n#, and for any vector #\vec{y}\in\mathbb{R}^n# is the image #L_A(\vec{y})# equal to the matrix product #A\vec{y}\in\mathbb{R}^m#. For the composite mapping #L_ A L_B :\mathbb{R}^p \rightarrow\mathbb{R}^m# we have therefore \[\begin{array}{rcl} (L_A\circ L_B )(\vec{x}) &=& L_A \bigl(L_B(\vec{x}) \bigr)\\&&\phantom{xx}\blue{\text{definition of the composition}}\\&=& L_A (B\vec{x})\\&&\phantom{xx}\blue{\text{definition of }L_B}\\ &=& A(B\vec{x}) \\&&\phantom{xx}\blue{\text{definition of }L_A}\\ &=&(AB)\vec{x}\\ &&\phantom{xx}\blue{\text{definition of the matrix product}}\\&=&L_{AB}(\vec{x})\\ &&\phantom{xx}\blue{\text{definition of }L_{AB}}\end{array} \] We conclude that the linear mapping #L_A\circ L_B# coincides with the linear mapping determined by the matrix #AB#.
In the Euclidean plane \(\mathbb{R}^2\), the rotation about the origin through 90 degrees is a matrix mapping determined by the matrix \(\matrix{0 & -1\\1 & 0}\), and the rotation about the origin through 180 degrees is a matrix mapping determined by the matrix \(\matrix{-1 & 0\\0 & -1}\). The composition of these two rotations is equivalent to a rotation of 270 degrees about the origin and is a matrix mapping determined by the matrix \[\matrix{0 & -1\\1 & 0} \matrix{-1 & 0\\0 & -1} = \matrix{0 & 1\\-1 & 0}\]