Let Ξ±β{1,β¦,m} and Ξ²β{1,β¦,q} be arbitrary indices.
By the matrix product definition, applied twice,
((AB)C)Ξ±Ξ²β=k=1βpβ(AB)Ξ±kβCkΞ²β=k=1βpβ(i=1βnβAΞ±iβBikβ)CkΞ²β.
Since the real numbers R form an ordered field and hence a field, the distributive law (axiom 9 of Field) gives (βi=1nβxiβ)y=βi=1nβ(xiβy) for finite sums, so
((AB)C)Ξ±Ξ²β=k=1βpβi=1βnβ(AΞ±iβBikβ)CkΞ²β.
Associativity of multiplication in R (axiom 5 of Field) gives (AΞ±iβBikβ)CkΞ²β=AΞ±iβ(BikβCkΞ²β).
Exchanging the order of the finite double sum using commutativity and associativity of addition (axioms 4 and 1 of Field), and then factoring AΞ±iβ from the inner sum by the distributive law again,
((AB)C)Ξ±Ξ²β=i=1βnβk=1βpβAΞ±iβ(BikβCkΞ²β)=i=1βnβAΞ±iβ(k=1βpβBikβCkΞ²β)=i=1βnβAΞ±iβ(BC)iΞ²β=(A(BC))Ξ±Ξ²β,
where the penultimate step applies the matrix product definition to BC.
Since Ξ± and Ξ² are arbitrary, (AB)C=A(BC).