1. Calculate total ingredients to fulfill dish orders
| Ingredient | Pizza | Pasta | Salad | Orders |
| Flour | 2 | 1 | 0 | 50 |
| Tomato | 1 | 1 | 1 | 30 |
| Cheese | 0.5 | 0.3 | 0.2 | 20 |
| Oil | 0.1 | 0.1 | 0.05 | |
| Salt | 0.02 | 0.02 | 0.01 | |
=MMULT({2,1,0;1,1,1;0.5,0.3,0.2;0.1,0.1,0.05;0.02,0.02,0.01},{50;30;20})
Result: [[130], [75], [38], [9], [1.8]]
The recipe matrix (5 ingredients × 3 dishes) multiplies by order quantities (3 dishes × 1) to produce total amounts needed. Each ingredient's total is the sum of (amount per dish × orders): Flour = 2×50 + 1×30 + 0×20 = 130 kg.
2. Calculate total inventory value
| Ingredient | Qty on Hand | Unit Cost ($) |
| Flour | 50 | 2 |
| Tomato | 30 | 1.5 |
| Cheese | 25 | 4 |
| Oil | 40 | 1.2 |
| Salt | 10 | 0.5 |
=MMULT({50,30,25,40,10},{2;1.5;4;1.2;0.5})
Result: 298
Multiplying the quantity row vector (1 × 5) by the unit cost column vector (5 × 1) yields a single scalar (1 × 1). Total inventory value = 50×2 + 30×1.5 + 25×4 + 40×1.2 + 10×0.5 = $298.
3. Allocate supply costs by vendor
| Supplier | Flour | Tomato | Cheese | Oil | Salt |
| Baker Co | 40 | 0 | 0 | 0 | 0 |
| Fresh Produce | 10 | 30 | 0 | 10 | 0 |
| Dairy Inc | 0 | 0 | 25 | 0 | 10 |
=MMULT({40,0,0,0,0;10,30,0,10,0;0,0,25,0,10},{2;1.5;4;1.2;0.5})
Result: [[80], [77], [105]]
The supplier matrix (3 suppliers × 5 ingredients) multiplied by unit costs (5 × 1) gives the cost owed to each vendor. Baker Co: $80 (flour only), Fresh Produce: $77 (flour + tomato + oil), Dairy Inc: $105 (cheese + salt).