🧮 Algebra
🦾Variables & the Function Machine
Letters that stand in for numbers, and a machine that processes them — the gate to algebra.
There is a mysterious machine on the desk: feed it 3, it hands back 7; feed it 5, it hands back 11. What rule is hiding inside? To crack the case you need two tools: letters that stand in for numbers, and functions that process them.
Letters stand in for numbers
Multiplication has an old rule: swap the two numbers and the result stays the same. Written with real numbers, describes exactly one pair. Written with letters:
One short line now covers every pair of numbers in the world. A letter that can hold any number like this is called a variable — an empty seat that any number may take.
Letters also change how multiplication is written: is shorthand for , with the times sign left out.
Common trap
means , not . If , then , not 7.
A function is a number machine
Drop a number into the machine, it applies a fixed rule, and a new number comes out. That is a function. Meet the machine whose rule is "double it, then add 1":
- in 3:
- in 5:
Mathematicians record the whole machine in one line:
Read it as "f of x equals 2x plus 1": names the rule, is the input waiting to go in, and is the output that comes out.
Substitution: give the variable a job
Pick a value for and push it through the rule — that is called evaluating. Take :
- If :
- If :
Multiply first, then add. And notice the real payoff: the formula was written once, yet it handles every input. That is the whole point of variables — one rule covers every case.
The Guess-the-Rule Machine
The machine below is hiding a rule. Feed it inputs, watch the outputs, and hunt for the pattern until you can name . Pulling one rule out of a pile of examples is exactly what algebra does all day.
A secret rule hides inside the machine. Feed it numbers and guess the rule!
Output
—
Check yourself
Quick quiz
1. If f(x) = 2x + 3, what is f(5)?
2. What does 3x mean?
3. A machine turns 2 into 6 and 5 into 15. What is its rule?