For example,
*A*_{1} *A*_{2} *A*_{3} can be rewritten as

(*A*_{1} *A*_{2}) *A*_{3} or
*A*_{1} (*A*_{2} *A*_{3}).

**Example**

Suppose *A*_{1} is 10x100, *A*_{2} is 100x5, and *A*_{3} is 5x50.

Then
*A*_{1} (*A*_{2} *A*_{3})
100*5*50 + 10*100*50 = 25,000 + 50,000
= 75,000 scalar multiplications (*A*_{2} *A*_{3} is a 100x50 matrix).

(*A*_{1} *A*_{2}) *A*_{3}
10*100*5 + 10*5*50 = 5,000 + 2,500 =
7,500 scalar multiplications (*A*_{1} *A*_{2} is a 10x5 matrix).