Two Groupings, Two Very Different Costs

Matrix MultiplicationMedium+20 XP+20

Two Groupings, Two Very Different Costs

Three matrices are to be multiplied together in the order AAA, then BBB, then CCC:

A is 4×10,B is 10×3,C is 3×8A \text{ is } 4 \times 10, \qquad B \text{ is } 10 \times 3, \qquad C \text{ is } 3 \times 8A is 4×10,B is 10×3,C is 3×8

Matrix multiplication is associative, so (AB)C(AB)C(AB)C and A(BC)A(BC)A(BC) produce exactly the same 4×84 \times 84×8 matrix. The amount of work need not be the same.

Use this counting rule, which follows directly from how a product is built: multiplying an m×nm \times nm×n matrix by an n×pn \times pn×p matrix produces mpmpmp entries, and each entry is a sum of nnn products — so it costs m⋅n⋅pm \cdot n \cdot pm⋅n⋅p scalar multiplications.

Counting both multiplications in each grouping, what is the total cost of each?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.