A snack shop has a sales table for two branches and a price sheet per menu item. Could you multiply the two tables — whole?
A matrix is a box that carries many numbers and moves them as one body. Lay a row flat, stand a column up, multiply and add — and boxes themselves can be multiplied.
Experiment
Hands-on experiment
🍢 Yesterday's sales
| Tteokbokki | Gimbap | |
|---|---|---|
| Branch A | 30 | 20 |
| Branch B | 20 | 40 |
💰 Price sheet per menu item
| Price | Cost | |
|---|---|---|
| Tteokbokki | 3,000 | 1,000 |
| Gimbap | 2,500 | 1,500 |
🤔 How would you find Branch A's revenue?
📖 Read more — why it exists · insights · common mistakes · formulasExpand ▾
Why
Why does this exist?
Two thousand years ago, the Chinese text Nine Chapters on the Mathematical Art solved simultaneous equations by erasing the unknowns' names and writing only the coefficients in a rectangular table. With just the numbers left, solving becomes a game of moving aligned rows.
In the 19th century, the mathematician Arthur Cayley went one step further. Instead of leaving the tables alone, he invented rules for adding and multiplying the tables themselves. At that moment a table became something you could calculate with — the box that moves many numbers as one was born.
Today this box is the busiest piece of mathematics in the world. Every rotation and zoom on a game screen, every layer of a neural network, is a matrix product. The GPU is, in effect, a chip born to do this multiply-and-add.
Insight
Insights from the video
“A matrix is not a box of numbers — it is a box holding a motion.”
The four numbers [[0,−1],[1,0]] look like a plain table. But multiply them against a shape and they become the action 'rotate 90°'. Because what's written down is an action, not a quantity, the order of multiplication starts to matter.
“Most of an AI's 'thinking' is multiply-and-add.”
One layer of a neural network is the product of a weight box and an input. It is the same multiply-and-add as the snack shop's revenue, repeated billions of times. That is why the GPU, the machine best at this product, became the heart of the AI era.
Misconception
Common misconceptions
Like numbers, matrices satisfy AB = BA.
Swapping the order of a matrix product can change the result. In stage 2, rotate-first and stretch-first arrive at different shapes. A matrix is a box holding a motion, and motions care about order.
A matrix is just a table of numbers, not something you calculate with.
The power of a matrix is that boxes can be multiplied. The moment you multiply, a table becomes a revenue calculator, a machine that moves shapes, a layer of a neural network. Once multiplication is defined, a matrix is not a table — it is an extension of number itself.
Formula
Writing it as math
Written in the language of mathematics, the move you practiced — lay the row flat, stand the column up, multiply and add — looks like this.
🔬 The birth of one cell of a matrix product — paired with the snack shop tables
=
Definition of the matrix product
The cell in row i, column j of the result is the i-th row of the first matrix laid flat against the j-th column of the second, multiplied pairwise and added. That is exactly what each tap did in stage 1.
Compressing simultaneous equations
The two lines 2x+y=5 and x+3y=10 become the single line Ax=b. With a million unknowns, the notation stays exactly the same.
The 90° rotation box
Column 1, (0, 1), is where î=(1,0) lands; column 2, (−1, 0), is where ĵ=(0,1) lands. Read the columns and the box tells you what motion it is.
The law of order
Matrix multiplication generally cannot be reordered. This is why rotate-first and stretch-first produced different shapes in stage 2.
In Real Life
Where you meet it in real life
Game and movie graphics
Every scene where a character turns, grows, or tilts is coordinates multiplied by a matrix. A 3D game performs this product hundreds of millions of times per second.
One layer of a neural network
A single layer of an AI is a weight matrix times an input. The sentence you send to a chatbot also becomes a box of numbers and passes through this product.
A photo is a matrix of numbers
A digital photo is a huge matrix of pixel brightnesses. Blur, sharpen, and every other filter are calculations done on that matrix.
GPU — the matrix multiplication machine
The GPU, once a chip for game graphics, became the key part of the AI era for one reason: graphics and neural networks both spend their time on giant matrix products.
Practice
Practice — conquer the types
One cell of a matrix product: lay the row (2, 3) flat, stand the column (5, 1) up, multiply and add. What do you get?
For two matrices A and B, the products AB and BA are…
Where does the 90° rotation box [[0, −1], [1, 0]] send the point (1, 0)?
Writing 2x+y=5, x+3y=10 as Ax=b, what is the box A?
Watch
Related video
Connection
Concepts connect
Previous concept
Simultaneous Equations
The moment people wanted to compress many equations into one line, the matrix was born.
← Simultaneous Equations labLeads to next
Neural Network
One layer of a neural network is one matrix product — onward to the heart of AI.
Go to the Neural Network lab →Related
Labs worth exploring together
Related lab
Vector
A matrix's columns are vectors — the eye that reads where the basis arrows go.
Go to the Vector lab →Related lab
Gradient Descent
How an AI studies: repeating this matrix computation tens of thousands of times.
Go to the Gradient Descent lab →