Number of ways to multiply n matrices?

864 Views Asked by At

I keep thinking about this problem in terms of factorials. That is at first you can choose between n matrices, then n-1, then n-2 and so forth.

Which gives you $n*(n-1)*(n-2) *... *1 = n!$ ways to multiply.

This is incorrect.

Ive seen that the correct way to set up this problem is to have $P(n)$ which defines the number of ways to multiply n matrices. Then we get

$$P(n) = P(1)P(n-1) + P(2)P(n-2) + ... + P(n-1)P(1)$$

Can someone please explain to me why it wont work here to think in terms of factorials, which is what I would do in simpler combinatorial problems. And also explain why the latter approach works.

I cannot wrap my head around this and distingush between the two.