Function Notation
We already met the idea of a function
— a rule that turns each input into exactly one output. Now we need a tidy way to
write that rule down. That shorthand is called function notation.
Instead of saying "the rule that doubles a number and adds one", we give the rule a name,
usually f, and write:
f(x) = 2x + 1
Read this out loud as "f of x equals two x plus one". The
x in the brackets is the input, and the whole
expression f(x) stands for the output the rule
produces.
The brackets are not multiplication
This is the one trap to watch. f(x) does not mean
f times x. The brackets are a kind of
slot: whatever you put inside them is fed into the rule.
So f(3) means "run the rule with x = 3".
We take the formula, replace every x with 3,
and simplify:
f(3) = 2(3) + 1 = 6 + 1 = 7
Use the machine below: pick an input on the slider and watch the rule
f(x) = 2x + 1 substitute it in and report the output
f(x).
Inputs and outputs on a graph
Each evaluation f(a) = b is also a point on the
graph of the function: the input a runs along the bottom, and the
output b is the height of the curve there. Drag the input below
and watch the point (x,\,f(x)) ride along the line.
The name is just a label
The letter f is only a label — we can use any name we like, and
often the name hints at what the function describes. A height function might be
h(t), a cost function C(n). They all
work the same way: feed the input inside the brackets, run the rule, read the output.
g(x) = x^2 - 4 \qquad\Rightarrow\qquad g(5) = 5^2 - 4 = 21
Khan Academy works through evaluating with function notation here: