In either case, we get the same answer.

We can either multiply the total number of

meals times the portions in each meal to get the total number of

portions we will have to order then we

multiply by the nutrition information for each ingredient.

Or we compute the nutrition information for each meal in total that is the nutrition

for the entire breakfast than in the nutrition for

the entire lunch and then we multiply by the number of breakfasts and number of lunches.

The fact that you get the same answer either way is called the associative rule.

This works because we've arranged it that all the dimensions are compatible.

So the total number of meals is a one by

two matrix that is the 40 breakfasts and 10 lunches.

The nutrition for the portions for each meal is two by four.

We have two meals and four ingredients.

The nutrition information is four by seven.

We have four ingredients and seven pieces of nutrition information.

We can see that the inner dimensions,

the two and the two get summed out and the four and the four get summed out.

The result is a one by seven matrix.

That is at the end the outer dimensions are the ones that survived at the end.