The vending machine rule
A vending machine takes a code (input) and returns exactly one snack (output) — press B4 and you always get the same thing. A function is that reliable machine; its domain is the codes it accepts and its range is the snacks it can dispense.
A machine with one output per input
A function assigns exactly one output to each input. The domain is the set of allowed inputs; the range is the set of outputs produced. We write f(x) to mean 'the output of f at x'.
f(x) = x² f(3) = 9 · domain: all real numbers · range: y ≥ 0
Lab · Allowed inputs
- Consider f(x) = 1/x.
- Ask which input is not allowed.
- State the domain.
What you should see: x = 0 is not allowed (division by zero), so the domain is all reals except 0.