How it works
A function is a rule that turns each input into exactly one output. f(x) = 2x + 3 is read "f of x equals 2x plus 3".
f(4) means "put 4 in for x": f(4) = 2(4) + 3 = 11. It does not mean f times 4.
Working backwards: if f(x) = 2x + 3 and f(k) = 19, solve 2k + 3 = 19 to get k = 8.
A function of a function: f(g(2)) means work out g(2) first, then put that answer into f.
With negative inputs, use parentheses: if x = −3, then x2 = (−3)2 = 9.
Worked example
g(x) = 2x2 + x − 3. What is g(−2)?
- Replace every x with (−2).
- (−2)2 = 4, so 2 × 4 = 8.
- 1 × (−2) = −2.
- Add: 8 + (−2) + (−3) = 3.
Answer: 3
Common mistakes
- Adding the input instead of multiplying. For f(x) = 2x + 5, f(−3) = 2(−3) + 5 = −6 + 5 = −1, not 2 + (−3) + 5 = 4.
- Losing the sign when squaring a negative input. For g(x) = x² + 3x, g(−2) = (−2)² + 3(−2) = 4 − 6 = −2, not −4 − 6 = −10.
- Working a composition from the outside. f(g(5)) means find g(5) first. With f(x) = 2x + 1 and g(x) = x − 3: g(5) = 2, then f(2) = 5. It is not f(5) × g(5).
- Plugging in the output instead of solving. If f(x) = 3x − 4 and f(k) = 11, solve 3k − 4 = 11, so k = 5. Putting 11 in for x gives 29, which answers a different question.