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.

  1. Replace f(x) with y: y = 3x - 5
  2. Swap x and y: x = 3y - 5
  3. Add 5 to both sides: x + 5 = 3y
  4. Divide both sides by 3: y = \frac{x + 5}{3}
  5. Write the inverse: f^{-1}(x) = \frac{x + 5}{3}
  6. 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.

  1. Replace f(x) with y: y = x^3 + 1
  2. Swap x and y: x = y^3 + 1
  3. Subtract 1 from both sides: x - 1 = y^3
  4. Take the cube root of both sides (see cube roots): y = \sqrt[3]{x - 1}
  5. Write the inverse: f^{-1}(x) = \sqrt[3]{x - 1}

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.

  1. Find f(g(x)): 2\left(\tfrac{1}{2}x - 3\right) + 6
  2. Distribute: x - 6 + 6
  3. Simplify: f(g(x)) = x
  4. Find g(f(x)): \tfrac{1}{2}(2x + 6) - 3
  5. Distribute: x + 3 - 3
  6. Simplify: g(f(x)) = x

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.

  1. 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.
  2. Restrict to x \ge 0. Now write y = x^2 and swap: x = y^2
  3. Take the square root. Since y \ge 0, use the positive root: y = \sqrt{x}
  4. 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.

  1. Write the formula with F as the output: F = \tfrac{9}{5}C + 32
  2. Subtract 32 from both sides: F - 32 = \tfrac{9}{5}C
  3. Multiply both sides by \tfrac{5}{9}: C = \tfrac{5}{9}(F - 32)
  4. Substitute 77: C = \tfrac{5}{9}(77 - 32)
  5. Subtract: C = \tfrac{5}{9}(45)
  6. Multiply: C = 25

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.

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. Swap: x = y + 7
    Subtract 7 from both sides: y = x - 7
    f^{-1}(x) = x - 7
  2. Swap: x = 5y
    Divide both sides by 5: y = \frac{x}{5}
    f^{-1}(x) = \frac{x}{5}
  3. Swap: x = 4y - 1
    Add 1 to both sides: x + 1 = 4y
    Divide both sides by 4: f^{-1}(x) = \frac{x + 1}{4}
  4. Swap: x = \frac{y}{2} + 3
    Subtract 3 from both sides: x - 3 = \frac{y}{2}
    Multiply both sides by 2: y = 2(x - 3)
    Distribute: f^{-1}(x) = 2x - 6
  5. Swap: x = y^3 - 8
    Add 8 to both sides: x + 8 = y^3
    Take the cube root: f^{-1}(x) = \sqrt[3]{x + 8}
  6. f(g(x)) = 3 \cdot \frac{x - 4}{3} + 4 = x - 4 + 4 = x
    g(f(x)) = \frac{(3x + 4) - 4}{3} = \frac{3x}{3} = 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. Write C = 2.5m + 3 and solve for m. Subtract 3 from both sides: C - 3 = 2.5m
    Divide both sides by 2.5: m = \frac{C - 3}{2.5}
    Substitute 18: m = \frac{18 - 3}{2.5} = \frac{15}{2.5} = 6
    You can ride 6 miles.

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