i don't really understand matrix multiplication. can you explain it to me with a very concrete, real word example?
GPT-3.5
GPT-6 Astra
Sure—imagine you run a bakery. Matrix multiplication can turn “how many things people ordered” into “how much of each ingredient you need.”
1. Start with the orders
Two customers order cookies and muffins:
| Customer | Cookies | Muffins |
|---|---|---|
| Alice | 3 | 2 |
| Ben | 1 | 4 |
A matrix is just that table of numbers:
Each row is a customer. The columns are cookies, then muffins.
2. Add the recipes
Suppose each item needs these amounts of flour and sugar. We’ll ignore other ingredients:
| Item | Flour | Sugar |
|---|---|---|
| Cookie | 20 g | 10 g |
| Muffin | 50 g | 20 g |
That gives us another matrix:
Each row is an item. The columns are flour, then sugar.
3. Work out one answer normally
How much flour does Alice’s order need?
She ordered 3 cookies and 2 muffins:
That calculation is the basic move in matrix multiplication:
Take a row from the first matrix and a column from the second. Multiply matching entries, then add.
Here, we used Alice’s row, , and the flour column, .
4. Do the same for every customer and ingredient
The result means:
| Customer | Flour needed | Sugar needed |
|---|---|---|
| Alice | 160 g | 70 g |
| Ben | 220 g | 90 g |
Why rows and columns?
Because we’re connecting two tables through something they share:
Customers → baked goods → ingredients
The first matrix tells us how many of each baked good. The second tells us how much ingredient per baked good. Multiplication combines those facts.
That’s also why the first matrix must have as many columns as the second has rows: the baked goods have to line up—cookies with cookies, muffins with muffins.
The key idea: matrix multiplication isn’t multiplying numbers in the same positions. It’s calculating totals by repeatedly doing “multiply corresponding pairs, then add.”
ShowHide Astra's reasoning 385 words
Breaking down bakery orders
I'm looking at bakery box orders for cookies and muffins, using recipes that specify ingredients like flour and sugar. I think about two orders: one has three cookies and two muffins, while the other features one cookie and four muffins. I also want to explain how grocery orders work in the real world, factoring in different ingredients for sandwiches and salads, including tomatoes and cheese. I need to present this in a clear, concise manner, possibly with a matrix index for comparison. Aim for around 400 words.
What changed
GPT-3.5’s example collapses under its own numbers. It multiplies a 2x3 stock matrix by a 1x3 price matrix, a pairing that matrix multiplication doesn’t allow. It promises “a 1x3 matrix” and then produces a 2x3 one. The entries make no sense: 2 books at $10 somehow become “$100 worth of books.” What it seems to be reaching for is multiplying matching positions, which is exactly the misconception a confused learner needs cleared up. It also gives no rule a reader could reuse.
Astra’s bakery example is correct throughout, and every figure checks out (3×20 + 2×50 = 160 g of flour). It works one entry by hand before stating the rule “multiply matching entries, then add,” which is the right order for a beginner. It explains why the columns of the first matrix must match the rows of the second: “cookies with cookies, muffins with muffins.” Its closing line, that multiplication “isn’t multiplying numbers in the same positions,” directly corrects the mistake GPT-3.5 made. The answer is long, but each step earns its place.