You have matrices to multiply: A₁ A₂ ... . Matrix multiplication is associative, so you can parenthesize in any order. Different orders have different costs. Multiplying an (a×b) matrix by a (b×c) matrix costs a×b×c operations.
Your goal: find the parenthesization that minimizes total operations. This is THE classic interval DP problem. The key: choosing where to split the chain determines which two subchains you multiply first.