Given matrices with having dimensions such that (so that we can multiply them) find the product, .
optimal cost of finding