Sub topic 15
Common mistakes with inverse notation
This chapter assumes you can already find an inverse algebraically, check it with both compositions, and read the graph of an inverse as a reflection across y = x. It does not teach those skills again. It covers the places where notation misleads people, so that correct work doesn't turn into wrong answers.
The central trap: f⁻¹ is not 1/f
The superscript −1 means two different things depending on what it is attached to.
- Attached to a function name, as in f⁻¹, it means the inverse function. This is a different function that undoes f.
- Attached to a number or expression, as in (f(x))⁻¹ or 5⁻¹, it means the reciprocal, 1 divided by that value.
| Written | Meaning | For f(x) = 2x + 3 at x = 5 |
|---|---|---|
| f⁻¹(13) | Input that f sends to 13 | 5 |
| 1/f(5) | Reciprocal of f(5) | 1/13 |
| (f(5))⁻¹ | Same as 1/f(5) | 1/13 |
| f(5)⁻¹ | Ambiguous, so avoid writing it | (read as 1/13) |
The two meanings give unrelated results. The code below shows both.
def f(x):
return 2 * x + 3
def f_inv(y):
return (y - 3) / 2
x = 5
print(f(x)) # 13
print(round(1 / f(x), 4)) # 0.0769, the reciprocal of f(5)
print(f_inv(f(x))) # 5.0, the inverse undoes f
print(f_inv(13)) # 5.0Reading the code makes the difference clear. 1 / f(x) is arithmetic on an output. f_inv is a separate function that takes the output back to the input.
A related slip is writing f⁻¹(x) = 1/(2x + 3) for this f. The correct inverse is (x − 3)/2. If you catch yourself writing a fraction with 1 in the numerator and f's formula in the denominator, stop and check which meaning you intended.
Trigonometry makes this worse
Trigonometric notation uses the same symbols with a third convention.
- sin⁻¹(x) is the inverse function, also written arcsin(x).
- sin²(x) means (sin x)², an exponent that applies to the output.
- 1/sin(x) is the reciprocal, called cosecant, csc(x).
Exponents of 2 or more sit on the function name, but −1 on the function name means inverse. This inconsistency is a historical accident. If you want to avoid it in your own work, write arcsin or asin.
import math
x = 0.5
print(round(math.asin(0.5), 4)) # 0.5236, sin^-1(0.5)
print(round(1 / math.sin(x), 4)) # 2.0858, 1/sin(0.5)
print(round(math.sin(math.asin(0.5)), 10)) # 0.5, sin(sin^-1(y)) = yMistake: assuming every function has an inverse
Writing f⁻¹ does not make it exist. The symbol is only meaningful when f is one-to-one. A common error is to "solve for x," get two branches, and silently keep one.
For f(x) = x², solving y = x² gives x = ±√y. That is two outputs for one input, so it is not a function. The inverse exists only after you restrict the domain, as covered in the earlier chapter on restricting domains. Always state the restriction and then pick the matching branch. For x ≥ 0 the inverse is √y. For x ≤ 0 it is −√y.
Mistake: forgetting that the domain and range swap
If f maps domain A onto range B, then f⁻¹ maps B back onto A. The formula for f⁻¹ alone is incomplete. You also need its domain, which is the range of f.
Take f(x) = √(x − 1).
- Domain of f: x ≥ 1.
- Range of f: y ≥ 0.
- Algebra gives f⁻¹(x) = x² + 1.
- Domain of f⁻¹: x ≥ 0, not all real numbers.
The formula x² + 1 accepts negative inputs, but f⁻¹ does not. Without the restriction, the formula would give wrong answers.
import math
def f(x):
return math.sqrt(x - 1)
def f_inv(y):
if y < 0:
raise ValueError("f_inv is only defined for y >= 0")
return y ** 2 + 1
print(f_inv(f(10))) # 10.0 (up to rounding), correct
print(f(f_inv(2))) # 2.0, correct
# Ignoring the domain gives a false "inverse":
raw = (-2) ** 2 + 1 # 5, the bare formula applied to -2
print(f(raw)) # 2.0, not -2, so the formula fails hereThe last two lines show the failure. The bare formula returns 5 for −2, but f(5) is 2, not −2. The composition f(f⁻¹(−2)) does not return −2 because −2 is outside the domain of f⁻¹.
Mistake: f⁻¹(f(x)) = x "for every x"
The inverse identities hold only where both sides make sense:
- f⁻¹(f(x)) = x for every x in the domain of f.
- f(f⁻¹(y)) = y for every y in the domain of f⁻¹, which is the range of f.
If f was created by restricting a domain, the first identity fails outside that restriction. With f(x) = x² restricted to x ≥ 0 and f⁻¹(y) = √y, we get f⁻¹(f(−3)) = 3. The point −3 was never in the domain of f, so there is no contradiction. Writing "f⁻¹(f(x)) = x" with no domain statement is incomplete, even if the algebra is fine.
Mistake: the wrong order for the inverse of a composite
The inverse of a composite undoes the steps in reverse order:
(f∘g)⁻¹ = g⁻¹ ∘ f⁻¹
The tempting error is f⁻¹∘g⁻¹, which keeps the same order and does not work in general. Putting on socks and then shoes requires removing shoes first and then socks.
Here is the check in code, with the wrong order included for comparison.
import math
def f(x):
return 2 * x + 3
def g(x):
return x ** 3
def f_inv(y):
return (y - 3) / 2
def g_inv(y):
return math.copysign(abs(y) ** (1 / 3), y) # real cube root
y = f(g(2)) # f(8) = 19
print(y) # 19
print(round(g_inv(f_inv(y)), 10)) # 2.0, correct order
print(round(f_inv(g_inv(y)), 10)) # -0.1654..., wrong orderThe wrong order produces a number that is not 2. You can also tell by looking at the formula. The correct inverse is g⁻¹(f⁻¹(y)) = ∛((y − 3)/2). The wrong version is (∛y − 3)/2.
Mistake: mixing up x and y when finding the inverse
The usual method is to write y = f(x), swap x and y, and solve for y. Two errors appear often.
- Swapping without solving. After swapping, you must solve for y again. Stopping at x = 2y + 3 leaves the answer unfinished.
- Swapping in the middle. If you swap in the middle of an algebra step, you may apply the swap to only part of the equation. Swap everywhere at once, or solve for x first and rename at the end.
An alternative that avoids swapping is to solve y = f(x) for x, which gives x = f⁻¹(y), and then rename the variable. The verification step catches either error, so run it every time: compute both f(f⁻¹(x)) and f⁻¹(f(x)) and confirm both equal x.
Mistake: reading the graph reflection loosely
The graph of f⁻¹ is the reflection of the graph of f across y = x. Common errors:
- Reflecting across the y-axis or the x-axis instead of y = x.
- Reflecting only some points and then joining them with the wrong shape. Every point (a, b) on f becomes (b, a) on f⁻¹.
- Expecting the two graphs to intersect only on y = x. They often cross there, but they can also cross elsewhere. For example, f(x) = −x is its own inverse, and every point on it is paired with another point on the same line.
- Drawing a reflection for a function that fails the horizontal line test. The reflection of a parabola across y = x is a sideways parabola, which fails the vertical line test and is not a function.
A short checklist
Before you write "f⁻¹" in a solution, check these in order.
- Is f one-to-one on the domain you are using? If not, state a restriction.
- Does the superscript sit on the function name (inverse) or on a value (reciprocal)?
- Have you stated the domain of f⁻¹ as the range of f?
- Do both compositions return x on the correct domains?
- For a composite, did you undo the steps in reverse order?
Exercise
Let f(x) = (x + 4)/(x − 1) with x ≠ 1. A student writes f⁻¹(x) = (x − 1)/(x + 4) and says "I found the inverse." Explain the error. Then find the correct inverse and say what value x cannot take in it.
Show answer
The student found the reciprocal of f, which is 1/f(x), not the inverse. The inverse swaps input and output. Write y = (x + 4)/(x − 1), swap to x = (y + 4)/(y − 1), and solve for y: x(y − 1) = y + 4, so xy − x = y + 4, so y(x − 1) = x + 4, giving f⁻¹(x) = (x + 4)/(x − 1). This function is its own inverse. Its domain is x ≠ 1, because the range of f excludes 1 (f(x) = 1 would need x + 4 = x − 1, which is impossible). Check: f(f(x)) = x for x ≠ 1.
Exercise
Let f(x) = 3x − 2 and g(x) = x³ + 1. Find (f∘g)⁻¹(y) and say which order of inverses you applied.
Show answer
(f∘g)(x) = f(g(x)) = 3(x³ + 1) − 2 = 3x³ + 1. Undo the steps in reverse order: apply f⁻¹ first, then g⁻¹. Here f⁻¹(y) = (y + 2)/3 and g⁻¹(y) = ∛(y − 1). So (f∘g)⁻¹(y) = g⁻¹(f⁻¹(y)) = ∛((y + 2)/3 − 1) = ∛((y − 1)/3). Check with y = 4: f(g(1)) = 3(2) − 2 = 4, and ∛((4 − 1)/3) = ∛1 = 1.