Unit content
Matrix multiplication
Matrix multiplication is designed so that matrices can represent successive linear actions. The product $AB$ is defined when the number of columns of $A$ equals the number of rows of $B$.
If $A$ is $m\times n$ and $B$ is $n\times p$, then $AB$ is $m\times p$.
Row-by-column rule
Each entry of the product is obtained by multiplying a row of $A$ with a column of $B$ and adding the results:
$$(AB){ij}=\sum{k=1}^{n}A_{ik}B_{kj}.$$
For example,
$$\begin{pmatrix}1&2\3&4\end{pmatrix} \begin{pmatrix}5\6\end{pmatrix}
\begin{pmatrix}17\39\end{pmatrix}.$$
The first entry is $1\cdot5+2\cdot6=17$.
Order matters
Matrix multiplication is generally not commutative:
$$AB\ne BA$$
in general, and one of the two products may not even be defined.
It is, however, associative whenever the products make sense:
$$(AB)C=A(BC).$$
Matrices acting on vectors
When a matrix multiplies a column vector, each output component is a linear combination of the input components. This is the basic mechanism by which matrices represent linear systems and, later, linear transformations.