Matrix Multiplication is Associative

Theorem
Matrix multiplication (conventional) is associative.

Proof
Let $\mathbf A = \left[{a}\right]_{m n}, \mathbf B = \left[{b}\right]_{n p}, \mathbf C = \left[{c}\right]_{p q}$ be matrices over a ring $\left({R, +, \circ}\right)$.

From inspection of the subscripts, we can see that both $\left({\mathbf A \mathbf B}\right) \mathbf C$ and $\mathbf A \left({\mathbf B \mathbf C}\right)$ are defined:

$\mathbf A$ has $n$ columns and $\mathbf B$ has $n$ rows, while $\mathbf B$ has $p$ columns and $\mathbf C$ has $p$ rows.

Consider $\left({\mathbf A \mathbf B}\right) \mathbf C$.

Let $\mathbf R = \left[{r}\right]_{m p} = \mathbf A \mathbf B, \mathbf S = \left[{s}\right]_{m q} = \left({\mathbf A \mathbf B}\right) \mathbf C$.

Then:

Now consider $\mathbf A \left({\mathbf B \mathbf C}\right)$.

Let $\mathbf R = \left[{r}\right]_{n q} = \mathbf B \mathbf C, \mathbf S = \left[{s}\right]_{m q} = \mathbf A \left({\mathbf B \mathbf C}\right)$.

Then:

Using ring axiom $(M1)$ (associativity of $\circ$):


 * $\displaystyle s_{i j} = \sum_{k \mathop = 1}^p \sum_{l \mathop = 1}^n \left({a_{i l} \circ b_{l k} }\right) \circ c_{k j} = \sum_{l \mathop = 1}^n \sum_{k \mathop = 1}^p a_{i l} \circ \left({b_{l k} \circ c_{k j} }\right) = s'_{i j}$

It is concluded that:
 * $\left({\mathbf A \mathbf B}\right) \mathbf C = \mathbf A \left({\mathbf B \mathbf C}\right)$