We have a finite number of matrices that we wish to compute the product of . Say we wish to compute a product of n
matrices and we have the subroutine to compute a pair of matrices . We also know that matrix products are associative ie :
$\left({\mathbf A \mathbf B}\right) \mathbf C$ and $\mathbf A \left({\mathbf B \mathbf C}\right)$ are same .
$A_1A_2A_3...A_n$
So what are the number of ways in which we can parenthesize the product ?