Inverse Functions

Inverse functions undo each other. If f turns 2 into 4, then its inverse f^{-1} turns 4 back into 2. To find an inverse, swap x and y and solve for y. Two functions are inverses when f(f^{-1}(x)) = x and f^{-1}(f(x)) = x.

Before this lesson: You should know Composition of Functions, Literal Equations and Reflections.

What an Inverse Does

A function takes an input and gives an output. Its inverse goes backward: it takes that output and returns the original input. Every input-output pair (a, b) of f becomes the pair (b, a) of f^{-1}.

The notation f^{-1}(x) is read “f inverse of x.” The −1 is not an exponent here. It does not mean \frac{1}{f(x)}.

The Graph of an Inverse

Swapping x and y reflects a point across the line y = x. So the graph of f^{-1} is the mirror image of the graph of f across y = x.

Coordinate grid with f(x) = x squared for x ≥ 0 in blue, its inverse f inverse of x = square root of x in orange, and the dashed green line y = x. The point (2, 4) on f matches the point (4, 2) on the inverse; the two graphs are mirror images across y = x.
The point (2, 4) on f becomes (4, 2) on the inverse. The graphs mirror each other across y = x.

When Does an Inverse Exist?

An inverse is a function only if f is one-to-one: each output comes from exactly one input. Use the horizontal line test. If any horizontal line crosses the graph of f more than once, f has no inverse function.

For example, f(x) = x^2 fails the test, because f(3) = 9 and f(-3) = 9. If you restrict the domain to x \ge 0, the function becomes one-to-one, and its inverse is \sqrt{x}.

How to Find an Inverse

  1. Replace f(x) with y.
  2. Swap x and y.
  3. Solve the new equation for y (see literal equations).
  4. Replace y with f^{-1}(x).
  5. Check: f(f^{-1}(x)) and f^{-1}(f(x)) should both simplify to x.

Worked Examples

Example 1: A linear function

Find the inverse of f(x) = 3x - 5.

y = 3x - 5

Replace f(x) with y.

x = 3y - 5

Swap x and y.

x + 5 = 3y

Add 5 to both sides.

y = \frac{x + 5}{3}

Divide both sides by 3.

f^{-1}(x) = \frac{x + 5}{3}

Write the inverse.

Check: f(f^{-1}(x)) = 3 \cdot \frac{x + 5}{3} - 5 = x + 5 - 5 = x

Answer: f^{-1}(x) = \frac{x + 5}{3}

Example 2: A cubic function

Find the inverse of f(x) = x^3 + 1.

y = x^3 + 1

Replace f(x) with y.

x = y^3 + 1

Swap x and y.

x - 1 = y^3

Subtract 1 from both sides.

y = \sqrt[3]{x - 1}

Take the cube root of both sides (see cube roots)

f^{-1}(x) = \sqrt[3]{x - 1}

Write the inverse.

Answer: f^{-1}(x) = \sqrt[3]{x - 1}. Check with a number: f(2) = 9, and f^{-1}(9) = \sqrt[3]{8} = 2.

Example 3: Verify two inverses

Show that f(x) = 2x + 6 and g(x) = \tfrac{1}{2}x - 3 are inverses.

2\left(\tfrac{1}{2}x - 3\right) + 6

Find f(g(x)).

x - 6 + 6

Distribute.

f(g(x)) = x

Simplify.

\tfrac{1}{2}(2x + 6) - 3

Find g(f(x)).

x + 3 - 3

Distribute.

g(f(x)) = x

Simplify.

Answer: Both compositions equal x, so f and g are inverses.

Example 4: Restrict the domain

Explain why f(x) = x^2 has no inverse function on all real numbers, then find an inverse for f(x) = x^2 with x \ge 0.

Test with numbers: f(3) = 9 and f(-3) = 9. The horizontal line y = 9 crosses the graph twice, so f is not one-to-one.

x = y^2

Restrict to x \ge 0. Now write y = x^2 and swap.

y = \sqrt{x}

Take the square root. Since y \ge 0, use the positive root.

Write the inverse: f^{-1}(x) = \sqrt{x}, with domain [0, \infty)

Answer: On x \ge 0, the inverse is f^{-1}(x) = \sqrt{x}. This is the pair in the graph above.

Example 5: Word problem with temperature

The formula F(C) = \tfrac{9}{5}C + 32 turns Celsius into Fahrenheit. Find the inverse, which turns Fahrenheit into Celsius, and convert 77°F.

F = \tfrac{9}{5}C + 32

Write the formula with F as the output.

F - 32 = \tfrac{9}{5}C

Subtract 32 from both sides.

C = \tfrac{5}{9}(F - 32)

Multiply both sides by \tfrac{5}{9}.

C = \tfrac{5}{9}(77 - 32)

Substitute 77.

C = \tfrac{5}{9}(45)

Subtract.

C = 25

Multiply.

Answer: The inverse is C(F) = \tfrac{5}{9}(F - 32), and 77°F is 25°C. In real-world inverses, we keep the letters F and C instead of swapping them.

Common Mistakes

MistakeExample of the errorFix
Reading −1 as an exponentf^{-1}(x) = \frac{1}{3x - 5}f^{-1} means the inverse function, not the reciprocal.
Undoing steps in the wrong orderFor 3x - 5, dividing by 3 before adding 5Undo in reverse order: add 5 first, then divide by 3.
Checking only one compositionShowing f(g(x)) = x onlyCheck both f(g(x)) and g(f(x)).
Forgetting to restrict the domainSaying the inverse of x^2 is \pm\sqrt{x}Restrict to x \ge 0; then the inverse is \sqrt{x}.
Not swapping x and ySolving y = 3x - 5 for x and stoppingSwap first, or rename the variables at the end.

Trigonometry uses this idea with expressions like \sin(\arcsin x); see Compositions of Inverse Trig Functions.

Practice Problems

  1. Find the inverse of f(x) = x + 7.
  2. Find the inverse of f(x) = 5x.
  3. Find the inverse of f(x) = 4x - 1.
  4. Find the inverse of f(x) = \frac{x}{2} + 3.
  5. Find the inverse of f(x) = x^3 - 8.
  6. Show that f(x) = 3x + 4 and g(x) = \frac{x - 4}{3} are inverses.
  7. A function has the table f(1) = 5, f(2) = 7, f(3) = 9. Write the table for f^{-1} and find f^{-1}(7).
  8. Is f(x) = x^2 one-to-one on all real numbers? How can you restrict it to get an inverse?
  9. The point (2, −6) is on the graph of f. Which point must be on the graph of f^{-1}?
  10. A taxi ride costs C(m) = 2.5m + 3 dollars for m miles. Find the inverse and use it to find how far you can ride for $18.
Show answers

1.

x = y + 7

Swap.

y = x - 7

Subtract 7 from both sides.

f^{-1}(x) = x - 7

Write y as the inverse function.

2.

x = 5y

Swap.

y = \frac{x}{5}

Divide both sides by 5.

f^{-1}(x) = \frac{x}{5}

Write y as the inverse function.

3.

x = 4y - 1

Swap.

x + 1 = 4y

Add 1 to both sides.

f^{-1}(x) = \frac{x + 1}{4}

Divide both sides by 4.

4.

x = \frac{y}{2} + 3

Swap.

x - 3 = \frac{y}{2}

Subtract 3 from both sides.

y = 2(x - 3)

Multiply both sides by 2.

f^{-1}(x) = 2x - 6

Distribute.

5.

x = y^3 - 8

Swap.

x + 8 = y^3

Add 8 to both sides.

f^{-1}(x) = \sqrt[3]{x + 8}

Take the cube root.

6.

f(g(x)) = 3 \cdot \frac{x - 4}{3} + 4 = x - 4 + 4 = x

Check: find f of g of x.

g(f(x)) = \frac{(3x + 4) - 4}{3} = \frac{3x}{3} = x

Check: find g of f of x.

Both equal x, so they are inverses.

7.

Swap each pair: f^{-1}(5) = 1, f^{-1}(7) = 2, f^{-1}(9) = 3
So f^{-1}(7) = 2

8.

No. f(2) = 4 and f(-2) = 4, so a horizontal line crosses the graph twice. Restrict the domain to x \ge 0 (or to x \le 0).

9.

Swap the coordinates: (−6, 2)

10.

C - 3 = 2.5m

Write C = 2.5m + 3 and solve for m. Subtract 3 from both sides.

m = \frac{C - 3}{2.5}

Divide both sides by 2.5.

m = \frac{18 - 3}{2.5} = \frac{15}{2.5} = 6

Substitute 18.

You can ride 6 miles.

Want more practice? The Algebra 2 Unit 1 Practice Pack (Part 2) has 29 pages of problems on this and the other lessons in the unit, with step-by-step answers and a cheat sheet.

FAQ

How do you find the inverse of a function?

Write y = f(x), swap x and y, and solve for y. The result is f^{-1}(x).

How do you check if two functions are inverses?

Compose them both ways. If f(g(x)) = x and g(f(x)) = x, they are inverses.

What does the graph of an inverse look like?

It is the reflection of the original graph across the line y = x. Every point (a, b) becomes (b, a).

Does every function have an inverse?

No. Only one-to-one functions have inverse functions. A function that fails the horizontal line test needs a restricted domain first.

Summary

  • An inverse function undoes the original: (a, b) on f means (b, a) on f^{-1}.
  • To find it, swap x and y, then solve for y.
  • Check that f(f^{-1}(x)) = x and f^{-1}(f(x)) = x.
  • The graphs are reflections across y = x.
  • Only one-to-one functions (horizontal line test) have inverses. Restrict the domain when needed.

Previous lesson: Composition of Functions

Next lesson: Systems of Equations in Three Variables

Back to the Algebra 2 Index