Inverse Functions
The three-step routine, and where it goes wrong
Every inverse problem in this chapter runs through the same three moves. Write y in place of f(x), solve that equation for x in terms of y, and then swap the two letters to obtain f⁻¹. The first move never causes trouble, the third move is a relabelling, and the entire difficulty sits in the second. Solving for x means isolating it across a single appearance, so scan the equation first and decide whether x hides inside a product, inside a fraction, or inside a power. For a linear function you clear the fraction and the shift in two lines. For a rational function you collect every term containing x on one side and factor x out, which is the step students most often skip and then get stuck on. Write the restriction that made the solve legal, because the answer is incomplete without it.
Example 1: Finding Inverse of Linear Function
Problem: Find the inverse of f(x) = 3x - 5.
Solution: Let y = 3x - 5
Solve for x: y + 5 = 3x x = (y + 5)/3
Interchange x and y: f⁻¹(x) = (x + 5)/3
Verify: f(f⁻¹(x)) = 3((x + 5)/3) - 5 = x + 5 - 5 = x ✓
Domain and range swap with the answer
The domain of the inverse is the range of the original function, and the range of the inverse is the domain of the original. That swap is not a remark to remember after the fact; it is part of the answer. Take f(x) = x squared restricted to x ≥ 0, whose range is y ≥ 0. Its inverse is the square root of x, and the square root is indeed only defined for x ≥ 0, which is exactly the range you computed. When the original function is a polynomial on a restricted interval, the inverse inherits that interval as its output bound, and stating both sets in the answer is what separates a complete solution from a partial one. If you skip the swap you will produce an inverse formula that looks right and evaluates outside its legal input.
Example 2: Inverse of Quadratic Function
Problem: Find the inverse of f(x) = x² + 1 where x ≥ 0.
Solution: Let y = x² + 1
Solve for x: y - 1 = x² x = √(y - 1) (since x ≥ 0)
Interchange x and y: f⁻¹(x) = √(x - 1)
Domain of f⁻¹: x ≥ 1 (range of f) Range of f⁻¹: x ≥ 0 (domain of f)
The horizontal line test, and what a failure means
A function has an inverse exactly when it is one-one, and the geometric reading of one-one is the horizontal line test: no horizontal line should cut the graph more than once. The unrestricted parabola fails immediately, because the line y = 5 meets it at both the positive and the negative square root of four. The failure is not a defect of the parabola; it is information that two different inputs share one output, so no single output can be sent back to a unique input. The standard repair is to restrict the domain until the test passes, which is why the quadratic example above carries the condition x ≥ 0. On the surviving branch the function is strictly increasing, the horizontal lines meet once at most, and the inverse exists and is unique.
Checking both compositions, not just one
Two identities travel with every inverse, and they live on different sets. The identity f⁻¹(f(x)) = x holds for every x in the domain of f, while f(f⁻¹(y)) = y holds only for y in the range of f. For f(x) = e to the x with inverse the natural logarithm, the first identity gives ln(e to the minus two) = minus two, which is perfectly legal. The second identity at minus two asks for e raised to ln(minus two), and the logarithm of a negative number is not a real number, so the expression is undefined rather than wrong. In exam questions this distinction shows up whenever the original function is not onto the reals, and quoting the correct domain for each identity is what earns the marks.
Example 3: Verifying Inverse
Problem: Verify that f(x) = (2x + 3)/(x - 1) and g(x) = (x + 3)/(x - 2) are inverses.
Solution: Check f(g(x)): f(g(x)) = f((x + 3)/(x - 2)) = [2((x + 3)/(x - 2)) + 3] / [((x + 3)/(x - 2)) - 1]
Numerator: (2x + 6)/(x - 2) + 3 = (2x + 6 + 3x - 6)/(x - 2) = (5x)/(x - 2)
Denominator: (x + 3)/(x - 2) - 1 = (x + 3 - x + 2)/(x - 2) = 5/(x - 2)
Therefore: f(g(x)) = (5x)/(x - 2) × (x - 2)/5 = x ✓
The pole of each function has to be excluded from the working, and those exclusions travel with the answer. The first function cannot be evaluated at x = 1, so the identity f(g(x)) = x is asserted only where g(x) is defined and the composition makes sense. Stating the exclusions x ≠ 1 and x ≠ 2 alongside the verification is a small line that carries real weight.
Recovering a formula from a pair of tables
When a question hands you a finite table instead of a formula, invert the table by reading it backwards. Each row a maps to b under f, so the inverse sends b back to a, and the domain of the inverse is the list of b values rather than the list of a values. Two quick checks confirm the result. First, the number of rows must not change: a one-one function of a finite set has an inverse with exactly as many entries. Second, every b value must appear exactly once, because a repeated output means the original was not one-one and no inverse exists on that table.
| x under f | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| f(x) | 5 | 3 | 8 | 1 |
| x under f inverse | 5 | 3 | 8 | 1 |
| f inverse of that value | 1 | 2 | 3 | 4 |
Reading the last two rows together shows the round trip returning the original input, which is the operational meaning of an inverse.
Example 4: Inverse with Restricted Domain
Problem: Find the inverse of f(x) = 4 - x² where x ≥ 0.
Solution: Let y = 4 - x²
Solve for x: 4 - y = x² x = √(4 - y) (since x ≥ 0)
Interchange x and y: f⁻¹(x) = √(4 - x)
Domain of f⁻¹: x ≤ 4 (range of f) Range of f⁻¹: x ≥ 0 (domain of f)
Verify: f(f⁻¹(x)) = 4 - (√(4 - x))² = 4 - (4 - x) = x ✓
Round trips and rejected inputs in Python
A composition check in exact arithmetic settles the algebra, while a round-trip loop over real sample points exposes a missing restriction faster than any amount of staring at the formula.
from sympy import symbols, simplify
x = symbols('x', real=True)
f = lambda t: 3 * t - 5
g = lambda t: (t + 5) / 3
print(simplify(f(g(x)))) # x
print(simplify(g(f(x)))) # x
p = lambda t: (2 * t + 3) / (t - 1)
q = lambda t: (t + 3) / (t - 2)
print(simplify(p(q(x)))) # x
print(simplify(q(p(x)))) # x
import math
f = lambda t: t**2 + 1 # restricted to x >= 0 so that it is one-one
inv = lambda s: math.sqrt(s - 1)
for x in [0, 0.5, 1, 2, 3, 4]:
print(x, f(x), inv(f(x))) # the round trip returns x every time
try:
inv(-3)
except ValueError as err:
print("rejected:", err) # -3 lies outside the range of f
The rejected input in the second script is the practical face of the domain swap: the inverse refuses exactly those values that the original function never produced, which is precisely what the theory predicts.
Common Mistakes
Leaving the domain restriction off a quadratic or absolute value inverse.
Fix: State the surviving branch explicitly, because the unrestricted original is not one-one and therefore has no inverse at all.
Checking only one of the two composition identities.
Fix: Verify f inverse of f of x equals x on the domain of f, and f of f inverse of y equals y on the range of f; each identity covers a different set.
Forgetting to swap the domain and the range when writing the final answer.
Fix: Write the domain of the inverse as the range of the original and the range of the inverse as the domain of the original, as two separate lines of the answer.
Key Takeaways
- An inverse exists exactly for bijections, so the one-one and onto conditions must both hold before any formula is written down.
- The solving step is the hard part of the three-step routine, and the domain restriction that makes the solve legal travels with the answer.
- The domain of the inverse is the range of the original and vice versa, and stating that swap is part of a complete solution.
- The two composition identities live on different sets, and each only claims what its own set of inputs allows.