A function turns inputs into outputs. Often you need to run it backward: given a temperature in Fahrenheit, what was it in Celsius? Given the balance in an account, how long has it been growing? The function that reverses another is its inverse. Inverses are the reason logarithms and inverse trigonometric functions exist, so it pays to understand them well now.
Undoing a function
Definition
Inverse function
Functions f and g are inverses of each other if
f(g(x))=x for every x in the domain of gandg(f(x))=x for every x in the domain of f
The inverse of f is written f−1 (read "f inverse").
In words: if f sends a to b, then f−1 sends b back to a.
f(a)=b⟺f−1(b)=a
So every point (a,b) on the graph of f becomes the point (b,a) on the graph of f−1. Inputs and outputs trade places, which means
domain of f−1=range of f,range of f−1=domain of f
Common mistake
The −1 in f−1 is not an exponent. f−1(x) means the inverse function, not f(x)1. For f(x)=2x, the inverse is f−1(x)=2x, but f(x)1=2x1.
Which functions have inverses?
Running a function backward only works if every output came from just one input. If f(3)=9 and f(−3)=9, the inverse wouldn't know whether to send 9 back to 3 or to −3.
Definition
One-to-one
A function is one-to-one if different inputs always give different outputs: f(a)=f(b) only when a=b. A function has an inverse function exactly when it is one-to-one.
On a graph, this is the horizontal line test: f is one-to-one if no horizontal line crosses its graph more than once. A function that is always increasing, or always decreasing, passes automatically.
The line y = 2 crosses x³ + 1 once but crosses x² − 2 twice, so only the cubic is one-to-one.Open in grapher →
Finding an inverse algebraically
Finding a formula for f⁻¹
Check that f is one-to-one.
Write y=f(x).
Swapx and y.
Solve the new equation for y. The result is f−1(x).
State the domain of f−1: it is the range of f.
Swapping x and y is the algebra version of trading every (a,b) for (b,a).
Worked example: Inverting a rational function
Find the inverse of f(x)=x−32x+1, and verify it with one value.
Write y=x−32x+1 and swap: x=y−32y+1. Now solve for y. Clear the fraction, then gather the y-terms on one side and factor out y:
So f−1(x)=x−23x+1. The domain of f is x=3 and the domain of f−1 is x=2, so the range of f is y=2.
Check:f(0)=−31=−31, and f−1(−31)=−31−2−1+1=0. It sends −31 back to 0.
The graph of an inverse
Since (a,b) on f becomes (b,a) on f−1, the graph of f−1 is the reflection of the graph of f across the line y=x.
Worked example: A square root and its inverse
Find the inverse of f(x)=x−2+1 and graph both.
The domain of f is x≥2 and its range is y≥1. Write y=x−2+1 and swap:
xx−1(x−1)2y=y−2+1=y−2=y−2=(x−1)2+2
The formula (x−1)2+2 describes a whole parabola, but f−1 must have domain equal to the range of f. So
f−1(x)=(x−1)2+2,x≥1
That is only the right half of the parabola.
f(x) = √(x − 2) + 1 and its inverse, the half-parabola (x − 1)² + 2 for x ≥ 1, are mirror images across y = x.Open in grapher →
The points (2,1) and (6,3) on f reflect to (1,2) and (3,6) on f−1.
Restricting the domain
A function that fails the horizontal line test can still get an inverse if you restrict its domain to a piece where it is one-to-one. You'll use exactly this idea to define sin−1 and cos−1 later in the course.
Worked example: Choosing half of a parabola
The function f(x)=(x−3)2 is not one-to-one. Restrict it to x≥3 and find the inverse.
On x≥3 the parabola is increasing, so it is one-to-one, and its range is y≥0. Swap and solve:
x=(y−3)2⟹y−3=±x
The inverse must return values y≥3 (the restricted domain of f), so take the plus sign:
f−1(x)=3+x,x≥0
If you had restricted to x≤3 instead, the minus sign would be correct: f−1(x)=3−x.
Tip
To verify an inverse, compose. For f(x)=(x−3)2 with x≥3 and f−1(x)=3+x: f(f−1(x))=(x)2=x and f−1(f(x))=3+(x−3)2=3+(x−3)=x, using x−3≥0.
Practice
Practice 1
The point (2,−5) is on the graph of a one-to-one function f. What point must be on the graph of f−1?
Enter a point like (2, -3)
Practice 2
Find f−1(x) for f(x)=5x−3.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 3
Which function is one-to-one?
Practice 4
A one-to-one function f has f(1)=4 and f(4)=9. Find f−1(f−1(9)).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 5
Find f−1(x) for f(x)=2x3−1.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 6
Let f(x)=x+5−2. What is the domain of f−1? Write it as an inequality in x.
Enter an inequality, e.g. x >= 4, -2 < x <= 3, or x < 1 or x > 5