Sub topic 12
Inverse functions and one-to-one checks
Prerequisites
This chapter assumes you can do the following:
- Evaluate f(x) and read domain and range.
- Compose functions as f(g(x)).
- Rearrange equations to isolate a variable.
- Read the basic graphs: linear, quadratic, modulus, exponential and logarithmic.
What an inverse does
A function f takes an input x and produces an output y. The inverse function, written f⁻¹, takes y and returns the original x. It undoes f.
In symbols: if f(a) = b, then f⁻¹(b) = a. Composing the two in either order gives back what you started with:
- f⁻¹(f(x)) = x for every x in the domain of f.
- f(f⁻¹(y)) = y for every y in the range of f.
The notation is a trap. f⁻¹(x) does not mean 1/f(x). The reciprocal is a different function.
When an inverse exists: the one-to-one condition
An inverse exists only if f is one-to-one. A one-to-one function never gives the same output for two different inputs. If two inputs gave the same output, f⁻¹ could not decide which one to return.
There are two checks.
- Horizontal line test (graph). Draw any horizontal line. If some horizontal line crosses the graph twice or more, f is not one-to-one.
- Algebraic test. Assume f(p) = f(q) and try to prove p = q. If you can, f is one-to-one.
Examples:
| Function | One-to-one? | Reason | Column | Column |
|---|---|---|---|---|
| f(x) = 2x + 3 | Yes | Strictly increasing line | ||
| f(x) = x² | No | f(2) = f(−2) = 4 | ||
| f(x) = \ | x − 2\ | No | f(1) = f(3) = 1 | |
| f(x) = 2ˣ | Yes | Strictly increasing | ||
| f(x) = x³ | Yes | Strictly increasing |
Any function that is strictly increasing or strictly decreasing on its whole domain is one-to-one. This gives a quick check for exam questions.
Finding an inverse in four steps
- Write y = f(x).
- Solve for x in terms of y.
- Swap the names: write the result as f⁻¹(x).
- State the domain and range, and check by composition.
Worked example. Let f(x) = (2x + 3)/(x − 1), with x ≠ 1.
Start with y = (2x + 3)/(x − 1). Multiply out: y(x − 1) = 2x + 3. Expand: yx − y = 2x + 3. Collect the x terms: x(y − 2) = y + 3. So x = (y + 3)/(y − 2).
Therefore f⁻¹(x) = (x + 3)/(x − 2), with x ≠ 2.
Notice what happened to the restrictions:
- f cannot take x = 1, and its output can never equal 2.
- f⁻¹ cannot take x = 2, and its output can never equal 1.
Domain and range swap
The domain of f⁻¹ is the range of f. The range of f⁻¹ is the domain of f. This is the quickest way to find the range of a function that is hard to attack directly. Find the inverse, then read its domain.
For the example above, the domain of f⁻¹ is all x ≠ 2. So the range of f is all y ≠ 2, which you can confirm from the equation y = 2 + 5/(x − 1).
The graph: reflection in y = x
If (a, b) is on the graph of f, then (b, a) is on the graph of f⁻¹. Swapping coordinates reflects the graph across the line y = x.
Two consequences are useful in CAT:
- The graphs of 2ˣ and log₂ x are mirror images across y = x. Exponential and logarithm are inverses of each other.
- If f is increasing, the graphs of f and f⁻¹ meet only on the line y = x. To find where they cross, solve f(x) = x. For f(x) = 2x + 3, solve 2x + 3 = x to get x = −3. The point (−3, −3) lies on both graphs.
Restricting the domain
A function that fails the horizontal line test can still get an inverse if you cut its domain to a piece where it is one-to-one.
Take f(x) = x² − 6x + 5. Completing the square gives f(x) = (x − 3)² − 4. The vertex is at x = 3, so the parabola is not one-to-one over all real numbers. Restrict to x ≥ 3, where f is increasing.
Solve y = (x − 3)² − 4. Then (x − 3)² = y + 4. Because x ≥ 3, take the positive root: x − 3 = √(y + 4). So
f⁻¹(x) = 3 + √(x + 4), with domain x ≥ −4.
The domain of f⁻¹ is x ≥ −4 because the range of f on [3, ∞) starts at the minimum value −4. If you had restricted to x ≤ 3 instead, you would take the negative root and get f⁻¹(x) = 3 − √(x + 4). The choice of branch depends on the restriction, and CAT problems usually state it.
Checking your answer
Compose in both directions. The code below checks the worked example numerically.
def f(x):
return (2 * x + 3) / (x - 1)
def f_inv(x):
return (x + 3) / (x - 2)
for x in [0, 2, 5, -3]:
print(x, round(f_inv(f(x)), 9), round(f(f_inv(f(x))), 9), round(f(x), 9))Each line prints x again as the second value, and f(x) as both the third and fourth values. This shows that f⁻¹(f(x)) = x and f(f⁻¹(y)) = y at the sampled points. A numeric check does not prove the formula, but it catches algebra slips quickly.
Shortcuts for exam problems
- Evaluate without finding the formula. To compute f⁻¹(8) for f(x) = 5x − 7, solve f(x) = 8. Then 5x = 15, so f⁻¹(8) = 3. This is faster than deriving the whole inverse.
- Linear functions. If f(x) = ax + b with a ≠ 0, then f⁻¹(x) = (x − b)/a.
- Self-inverse functions. If f⁻¹ = f, then f(f(x)) = x. Functions of the form (ax + b)/(cx − a) behave this way. For example, f(x) = (3x + 2)/(x − 3) has the inverse (3x + 2)/(x − 3), the same expression. Spotting this saves time when a question asks for f(f(x)).
- Inverse of a composition. The inverse of f(g(x)) is g⁻¹(f⁻¹(x)). The order reverses, like taking off shoes and socks.
Common errors
- Declaring an inverse for x² or |x| without restricting the domain.
- Swapping x and y but forgetting to solve for y afterward.
- Taking the wrong square-root sign after restricting the domain.
- Reporting the domain of f⁻¹ as the domain of f.
- Reversing the order when inverting a composition.
Exercise
Let f(x) = x² + 4x for x ≥ −2. Find f⁻¹(12).
Show answer
Solve f(x) = 12 with x ≥ −2. Then x² + 4x − 12 = 0, so (x + 6)(x − 2) = 0. The roots are x = −6 and x = 2. Only x = 2 satisfies x ≥ −2, so f⁻¹(12) = 2.
Exercise
Is f(x) = |x − 2| one-to-one on all real numbers? If not, give a restriction that makes it one-to-one and find the inverse on it.
Show answer
No, because f(1) = f(3) = 1, so a horizontal line crosses the graph twice. Restrict to x ≥ 2, where f(x) = x − 2. Then y = x − 2 gives x = y + 2, so f⁻¹(x) = x + 2 with domain x ≥ 0.
Exercise
For f(x) = 2x + 3, find the point where the graphs of f and f⁻¹ intersect.
Show answer
Since f is increasing, the graphs meet on y = x. Solve 2x + 3 = x to get x = −3. The point is (−3, −3).