What a function is
A function is a rule that gives exactly one output for every allowed input. We write f(x) and read it "f of x". The letter f names the rule; x is the input. Writing f(3) means "run the rule on the input 3".
On a graph, the vertical line test checks this: if any vertical line crosses the curve twice, one input has two outputs, so the graph is not a function.
Domain and range
The domain is the set of inputs that make sense; the range is the set of outputs you actually get. Two things restrict a domain in this course:
- You cannot divide by zero.
- You cannot take an even root (such as a square root) of a negative number and stay in the real numbers.
Everything else is allowed unless the problem says otherwise.
Evaluating and composing
To evaluate, replace every x with the input in brackets. For f(x) = 2x² − 3x + 1, we get f(3) = 2(9) − 9 + 1 = 10. Take care with a negative input: f(−1) = 2(1) + 3 + 1 = 6, because (−1)² is positive and −3 times −1 is positive.
Composition feeds one function into another. (f∘g)(x) means f(g(x)): do g first, then f on the result. Order matters; f(g(x)) and g(f(x)) are usually different.
Inverse functions
The inverse f⁻¹ undoes f. To find it for a one-to-one function: write y = f(x), swap x and y, then solve for y. For f(x) = 2x + 6, swap to x = 2y + 6, so y = (x − 6)/2. Check: f(4) = 14 and the inverse gives (14 − 6)/2 = 4, back to the start.
Worked example
Let g(x) = √(x − 4) / (x − 7). Find its domain.
- The square root needs x − 4 ≥ 0, so x ≥ 4.
- The denominator cannot be zero, so x ≠ 7.
- Combine: the domain is all x with x ≥ 4 except x = 7. In interval notation that is [4, 7) ∪ (7, ∞).
Now evaluate g(8): the top is √4 = 2 and the bottom is 1, so g(8) = 2.
Average rate of change
The average rate of change of f between x = a and x = b is (f(b) − f(a)) / (b − a). It is the slope of the straight line joining the two points on the graph. For f(x) = x² from 1 to 3 it is (9 − 1)/2 = 4.
Even and odd
A function is even if f(−x) = f(x) (its graph is mirror-symmetric about the y-axis) and odd if f(−x) = −f(x) (symmetric through the origin).
Common mistakes
- Treating f(x + 2) as f(x) + 2. They are different.
- Forgetting to swap x and y before solving when finding an inverse.
- Forgetting a domain restriction that arises from a denominator inside a square root.