Suppose I have a table of matrices, $[A,B,C,D,...,Z]$ and a vector $v$. I would like to efficiently compute both $ABCD...Zv$ and the table $[A,AB,ABC,ABCD,...,ABCD....Z]$.
I know that to compute the product of the entire table I can do something like
But how can I efficiently find the products of different length? I would like to avoid loops and explicitly limiting lengths in a table if possible, for speed.
The matrices themselves will be quite large, $\sim400 \times 400$, always square, and have complex values inside them.