Let's take something boring and turn it into math. Your cell plan charges $25 a month for the base fee, plus $0.10 for every minute you go over your data. Total cost depends on how many overage minutes you rack up.
-
Step 1: Identify the parts.
Two ingredients: a fixed piece (the $25 base fee that you pay no matter what) and a variable piece ($0.10 times however many minutes). The minutes are what change, that's our input.
→ x = overage minutes -
Step 2: Translate the words into a rule.
"Total = base fee + (rate × minutes)" becomes:
$$f(x) = \htmlClass{we-k1}{25} + \htmlClass{we-k2}{0.10}\htmlClass{we-k3}{x}$$ -
Step 3: Plug in different inputs.
To "evaluate" a function at a value, we substitute the value for x and simplify.
Input Substitute Output x = 0 25 + 0.10(0) $25.00 x = 50 25 + 0.10(50) $30.00 x = 200 25 + 0.10(200) $45.00 -
Step 4: Read it back in English.
"With 50 overage minutes, the bill is $30." Notice that the function never gives two answers for the same input, 50 minutes always produces $30. That's the "exactly one output" rule in action.
→ that's what makes it a function