Functions — Notation, Domain, Transformations, and Inverses
Functions are a compact way to describe an input-output rule. They show up in algebra, modelling, graphs, and later calculus. The main job is to keep track of which inputs are allowed, what each input produces, and how a change to a formula changes its graph.
Relations and Functions
A relation is any set of ordered pairs. A function is a relation in which every input is paired with exactly one output. Different inputs may have the same output; the rule only forbids one input from producing two different outputs.
| Relation | Function? | Reason |
|---|---|---|
| {(1, 4), (2, 4), (3, 9)} | Yes | Each first coordinate appears once. |
| {(1, 4), (1, 5), (2, 7)} | No | Input 1 is assigned both 4 and 5. |
On a graph, use the vertical line test: if any vertical line meets the graph more than once, the relation is not a function of x. A circle fails this test because some x-values have an upper and a lower y-value.
Function Notation and Evaluation
Write f(x) for “the output of function f at input x.” It is not multiplication. For example, if f(x) = 3x − 2, then f(5) means substitute 5 for every x.
Worked example: evaluate a function
Given f(x) = 3x − 2, find f(−4).
f(−4) = 3(−4) − 2
= −12 − 2
= −14
Therefore, f(−4) = −14. For an expression such as f(a + 1), substitute the whole expression: f(a + 1) = 3(a + 1) − 2 = 3a + 1.
Domain and Range
The domain is the set of allowed inputs. The range is the set of outputs that actually occur. Unless a context gives a restriction, begin with all real numbers and remove inputs that make the expression undefined.
| Rule | Domain restriction | Domain |
|---|---|---|
| f(x) = 1/(x − 3) | Denominator cannot be 0, so x ≠ 3. | All real x except 3 |
| g(x) = √(x + 2) | For real outputs, x + 2 ≥ 0. | x ≥ −2 |
Worked example: state domain and range
Find the domain and range of h(x) = √(x − 1) + 4.
For the square root to be real:
x − 1 ≥ 0
x ≥ 1
The smallest square-root value is 0.
h(x) = √(x − 1) + 4 ≥ 0 + 4
h(x) ≥ 4
The domain is x ≥ 1, and the range is h(x) ≥ 4. In interval notation these are [1, ∞) and [4, ∞).
Graph Transformations
Start with a parent function f(x). In g(x) = af(x − h) + k, the changes are predictable:
- f(x − h): shift right h units; f(x + h) shifts left.
- + k outside the function: shift up k units; a negative k shifts down.
- |a| > 1: vertical stretch; 0 < |a| < 1: vertical compression.
- a < 0: reflect in the x-axis.
Notice that horizontal changes happen inside the brackets, so their direction can feel backwards. Read the expression x − h as “move right h.”
Worked example: describe a transformation
Describe the changes from f(x) = x2 to g(x) = −2(x − 3)2 + 5.
g(x) = −2(x − 3)² + 5
x − 3 → shift right 3
−2 outside the square → reflect in the x-axis and stretch vertically by factor 2
+5 → shift up 5
Parent vertex: (0, 0)
New vertex: (3, 5)
Composition of Functions
Composition feeds the output of one function into another. The notation (f ∘ g)(x) means f(g(x)), so do g first. Order matters in general: (f ∘ g)(x) is usually not the same as (g ∘ f)(x).
Worked example: compose two rules
Let f(x) = 2x + 1 and g(x) = x2 − 4. Find (f ∘ g)(x).
(f ∘ g)(x) = f(g(x))
= f(x² − 4)
= 2(x² − 4) + 1
= 2x² − 8 + 1
= 2x² − 7
Inverse Functions and Restrictions
An inverse function reverses the original rule. If f sends a to b, then f−1 sends b to a. The exponent −1 means inverse here, not reciprocal: f−1(x) is not 1/f(x).
A function has an inverse function only when it is one-to-one: every output comes from exactly one input. On a graph, it must pass the horizontal line test. The inverse graph is the reflection of the original graph in the line y = x.
Worked example: find and check an inverse
Find the inverse of f(x) = 3x − 6.
1. Write y = 3x − 6.
2. Swap x and y: x = 3y − 6.
3. Solve for y:
x + 6 = 3y
(x + 6)/3 = y
4. Rename y:
f⁻¹(x) = (x + 6)/3
Check:
f(f⁻¹(x)) = 3((x + 6)/3) − 6
= x + 6 − 6
= x
The quadratic q(x) = x2 is not one-to-one over all real numbers because q(−2) = q(2) = 4. Restrict its domain to x ≥ 0 before finding an inverse.
y = x², with x ≥ 0
x = y²
y = √x (choose the non-negative root because y is in the restricted domain)
q⁻¹(x) = √x, with domain x ≥ 0
Common Mistakes
- Calling every relation a function: check whether an input repeats with different outputs.
- Ignoring a domain restriction: never allow division by zero or an even root of a negative number when working over the reals.
- Reversing a horizontal shift: (x − 3) moves right 3, not left 3.
- Doing composition in the wrong order: in f(g(x)), calculate g first.
- Forgetting to restrict a quadratic: without a one-to-one domain restriction, its inverse is not a function.
Practice Set
- For p(x) = 4x2 − 1, find p(−2).
- State the domain of r(x) = 5/(x + 4).
- Describe the transformation from y = |x| to y = |x + 2| − 3.
- Let f(x) = x + 5 and g(x) = 2x. Find (g ∘ f)(x).
- Find the inverse of m(x) = (x − 4)/2.
Answers
- p(−2) = 4(−2)2 − 1 = 4(4) − 1 = 15.
- x + 4 ≠ 0, so x ≠ −4.
- Shift 2 units left and 3 units down.
- (g ∘ f)(x) = g(x + 5) = 2(x + 5) = 2x + 10.
- y = (x − 4)/2; swap to get x = (y − 4)/2; then 2x = y − 4 and m−1(x) = 2x + 4.
dispelled