Part 30 of 36 · TransformationsSee the whole course
Inverse functions: how to find and graph them
The inverse of a function f, written f⁻¹, undoes f: if f turns 3 into 7, then f⁻¹ turns 7 back into 3. To find it, write y = f(x), swap x and y, then solve for y. The graph of f⁻¹ is the mirror image of the graph of f across the line y = x.
What “undo” means
A function is a machine: you put a number in and a number comes out. (See what is a function if that is new.) Take f(x) = 2x + 1. Put in 3 and you get f(3) = 7.
The inverse is the machine that runs backwards. Put 7 in, and out comes 3. The steps of f were “double, then add 1”. To undo them, work in reverse order and flip each step: “subtract 1, then halve”. So f⁻¹(x) = (x − 1) ÷ 2, and f⁻¹(7) = (7 − 1) ÷ 2 = 3 ✓. This is the same backwards thinking as in solving a linear equation.
Careful: the small −1 in f⁻¹ is a name, not an exponent. f⁻¹(x) does not mean 1 ÷ f(x).
The three steps
- Write y = f(x).
- Swap x and y. This is the “undo”: the old output becomes the new input.
- Solve for y. What you get is f⁻¹(x).
Try it. Change a and b, then move the point P along the blue graph and watch its mirror image Q move along the orange one.
- y = 2x + 1
- swap x and y: x = 2y + 1
- solve for y: f⁻¹(x) = (1/2)x − 1/2
Why the graph is a mirror image
Swapping x and y swaps the two numbers in every point: (3, 7) on f becomes (7, 3) on f⁻¹. Swapping the two numbers of a point is exactly a reflection across the line y = x, the diagonal that runs through (1, 1), (2, 2), (3, 3). So fold the picture along that diagonal, and the graph of f lands on the graph of f⁻¹. (Reflections are covered in reflecting a graph over the axes. This one uses a slanted mirror.)
Example 1: f(x) = 2x + 1
Write: y = 2x + 1
Swap: x = 2y + 1
Solve for y: x − 1 = 2y, so y = (x − 1) ÷ 2
So f⁻¹(x) = (x − 1) ÷ 2
Check: f(3) = 7, and f⁻¹(7) = (7 − 1) ÷ 2 = 3 ✓
Example 2: f(x) = 3x − 6
Swap: x = 3y − 6
Add 6: x + 6 = 3y
Divide by 3: f⁻¹(x) = (x + 6) ÷ 3, which is x ÷ 3 + 2
Check: f(2) = 0, and f⁻¹(0) = 6 ÷ 3 = 2 ✓
Example 3: a function that is its own inverse, f(x) = 4 − x
Swap: x = 4 − y
Solve for y: y = 4 − x
The inverse is the same function. Its graph has slope −1, and a line with slope −1 is already symmetric about y = x. Put 1 in: f(1) = 3, and f(3) = 1 takes it back.
Which functions have an inverse?
An inverse must give one answer for each input, because it is a function too. That only works if f never gives the same output twice. Look at the graph: if a horizontal line can cut it in two places, there is no inverse. This is the horizontal line test.
- y = 2x + 1 passes: every horizontal line cuts it once.
- A flat line like y = 5 (set a = 0 above) fails: every input gives 5, so you could not tell which input a 5 came from.
- y = x² fails: f(2) = 4 and f(−2) = 4, so an inverse could not choose between 2 and −2. If you only use x ≥ 0, it passes, and the inverse is the square root: f⁻¹(x) = √x. The two graphs are mirror images across y = x.
Domain and range swap too: the inputs of f are the outputs of f⁻¹ (see domain and range).
Watch it explained in under a minute
Read the video transcript
This function turns 3 into 7. f(3) = 7. Its inverse undoes it: 7 goes back to 3.
The two points are mirror images. The mirror is the line y = x. Flip the whole graph over it, and you get the inverse.
To find its formula, swap x and y. x = 2y + 1. Now solve for y. y = (x − 1) over 2.
Check it. Put 7 in. (7 − 1) over 2, is 3. It works.
Want practice questions and more examples? Full guide: pipmath.app/blog
The five mistakes to avoid
- Reading f⁻¹ as 1 ÷ f. The −1 means “inverse”, not “reciprocal”.
- Forgetting to swap x and y before solving.
- Undoing the steps in the wrong order. Work backwards: last step first.
- Reflecting over the x-axis or y-axis. An inverse reflects over the line y = x.
- Skipping the check. Put a number through f and then through f⁻¹. You should get the same number back.
Try it yourself
Find the inverse of each function. Tap a question to see the answer.
1. f(x) = x + 5
Swap: x = y + 5, so y = x − 5. f⁻¹(x) = x − 5. Check: f(2) = 7, and f⁻¹(7) = 2 ✓.
2. f(x) = 4x − 8
Swap: x = 4y − 8. Add 8: x + 8 = 4y. Divide by 4: f⁻¹(x) = (x + 8) ÷ 4, which is x ÷ 4 + 2. Check: f(3) = 4, and f⁻¹(4) = 12 ÷ 4 = 3 ✓.
3. f(x) = (x − 2) ÷ 3
Swap: x = (y − 2) ÷ 3. Multiply by 3: 3x = y − 2. Add 2: f⁻¹(x) = 3x + 2. Check: f(5) = 1, and f⁻¹(1) = 5 ✓.
Where this fits in
That finishes the transformations part of the course: shifts, flips, stretches and now the mirror over y = x. Next comes a new family of functions, the parabola, starting with what a quadratic function is. You will meet the inverse idea again there, because undoing a square is a square root.