Read this lesson as text
The Vending Machine Model
Algebra 1 · Axiom Academy
How a simple snack machine holds the key to one of the most important ideas in all of math: the function. You walk up to a vending machine, press a button, and a snack drops into the tray. You don't think twice about it — but that everyday action is exactly the idea that powers all of algebra. Something goes in , a fixed rule acts on it, and one thing comes out . Watch a press of button A1 travel through the machine: it drops in as the input , the machine's rule decides what it maps to, and a single snack — the output — lands in the tray. Input goes in, the rule acts, exactly one output comes out — that pipeline is the whole idea of a function. Press the buttons yourself, and press the same one a few times. The machine follows a strict rule: every press of A1 drops chips — every single time . The output is completely predictable from the input you choose. That reliability is the heart of a function. Same input, same output — every time. A machine that broke that promise wouldn't be a function at all. The one rule that makes it a function Here is the machine's wiring. Drag the loose end of each input's wire onto a snack to set what that button gives. There is exactly one rule a real machine must obey: each input may go to one and only one output . Try to wire a button to two snacks at once and watch the verdict flip — that's a broken machine, and a broken machine is not a function.
This is the written version of the interactive lesson above. See the full Algebra 1 course.