How to Find an Inverse Function, and How to Know You Got It Right

A function takes an input and gives an output. Its inverse runs the trip backward. If f(x) = 2x + 3 sends 4 to 11, then the inverse sends 11 back to 4.

The notation is f−1(x), read “f inverse of x.” The −1 is not an exponent here. f−1(x) does not mean 1/f(x). The fraction 1/f(x) is a reciprocal, and that is a different thing.

Undoing the steps

The plainest way to see an inverse is to list what f does, then undo it in reverse order, the way you take off shoes before socks.

f(x) = 2x + 3 does two things to x: multiply by 2, then add 3. To undo that, subtract 3 first, then divide by 2:

f−1(x) = (x − 3)/2

Check it with the numbers from before: (11 − 3)/2 = 4.

This works well for short chains of steps. For anything with x in more than one place, use the swap method.

The swap method

  1. Write y in place of f(x).
  2. Swap x and y.
  3. Solve for y.
  4. Write f−1(x) in place of y.

Example Find the inverse of f(x) = x³ − 5

  1. y = x³ − 5
  2. Swap: x = y³ − 5
  3. Add 5: x + 5 = y³. Take the cube root: y = ∛(x + 5)
  4. f−1(x) = ∛(x + 5)

Example Find the inverse of f(x) = (x + 1)/(x − 2)

  1. Swap: x = (y + 1)/(y − 2)
  2. Multiply both sides by (y − 2): xy − 2x = y + 1
  3. Get every y on one side: xy − y = 2x + 1
  4. Factor out y: y(x − 1) = 2x + 1
  5. f−1(x) = (2x + 1)/(x − 1)

The fraction one is where people get stuck. The move that unlocks it is step 4: once all the y terms are on one side, factor y out and divide. The same trick shows up in rational expressions.

Checking with composition

Two functions are inverses when each one undoes the other:

  • f(f−1(x)) = x
  • f−1(f(x)) = x

Both have to hold. You can check with algebra or with one number.

Example Check that f(x) = 4x − 1 and g(x) = (x + 1)/4 are inverses

  1. f(g(x)) = 4 · (x + 1)/4 − 1 = x + 1 − 1 = x
  2. g(f(x)) = ((4x − 1) + 1)/4 = 4x/4 = x
  3. Both give x, so they are inverses.

A quick number check catches most mistakes before you hand anything in. For the fraction example above, f−1(3) = 7/2, and f(7/2) = (9/2)/(3/2) = 3. It comes back to 3, so the inverse is right.

What the graph looks like

Swapping x and y swaps the coordinates of every point. If (2, 7) is on f, then (7, 2) is on f−1. On a graph, that is a reflection across the line y = x.

y = x
f(x) = 2x + 3 (blue) and its inverse (orange), mirror images across y = x (dashed)

This also tells you what happens to domain and range. The inputs of f−1 are the outputs of f, so:

  • domain of f−1 = range of f
  • range of f−1 = domain of f

For f(x) = (x + 1)/(x − 2), the domain is every x except 2, and the range is every y except 1. Its inverse (2x + 1)/(x − 1) has every x except 1 as its domain, which matches.

When there is no inverse

An inverse only exists if every output comes from exactly one input. Such a function is called one-to-one.

f(x) = x² fails this. f(3) = 9 and f(−3) = 9, so f−1(9) would have to be both 3 and −3, and a function can’t give two answers.

On a graph, use the horizontal line test: if any horizontal line hits the graph more than once, the function has no inverse. A parabola fails. Any line that isn’t flat passes.

Restricting the domain

You can still make an inverse by keeping only one side of the graph. Keep x ≥ 0 for x², and the inverse is √x. This is exactly why √9 means 3 and not −3.

Example Find the inverse of f(x) = (x − 3)² for x ≥ 3

  1. Swap: x = (y − 3)²
  2. Take the square root: √x = y − 3. Only the positive root, because the original inputs were all at least 3.
  3. f−1(x) = 3 + √x, with domain x ≥ 0.

Reading inverses from a table

You don’t always need a formula. If a table shows f(1) = 4, f(2) = 7 and f(3) = 10, then f−1(7) = 2. Find 7 in the output column and read across to the input.

x123
f(x)4710

Test questions often ask for something like f(f−1(10)). You don’t have to find anything. A function and its inverse cancel, so the answer is 10.

Where inverses show up

  • Unit conversions. F = (9/5)C + 32 turns Celsius into Fahrenheit. Its inverse, C = (5/9)(F − 32), goes back.
  • Logarithms. log₂x is the inverse of 2x. That’s the whole reason logs exist, covered in the logarithms guide.
  • Square roots and cube roots undo squaring (with x ≥ 0) and cubing.

Writing 1/f(x) for the inverse

For f(x) = 2x + 3, 1/(2x + 3) is the reciprocal. Test it: at x = 11 it gives 1/25, not 4. If a composition check doesn’t give you back x, it’s not the inverse.

Swapping x and y and stopping there

x = 2y + 3 is a correct step, but it isn’t the answer. Solve for y before you write f−1(x).

Practice problems

  1. Find the inverse of f(x) = 5x − 2.

    Show answer

    f−1(x) = (x + 2)/5.

  2. Find the inverse of f(x) = x/3 + 4.

    Show answer

    f−1(x) = 3(x − 4) = 3x − 12.

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

    Show answer

    f−1(x) = ∛((x − 1)/2).

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

    Show answer

    Swap: x = 3/(y + 1), so y + 1 = 3/x and f−1(x) = 3/x − 1.

  5. Find the inverse of f(x) = (2x − 1)/(x + 3).

    Show answer

    x(y + 3) = 2y − 1 gives xy − 2y = −3x − 1, so f−1(x) = (3x + 1)/(2 − x). Check: f(0) = −1/3 and f−1(−1/3) = 0.

  6. f(4) = 9. What point must be on the graph of f−1?

    Show answer

    (9, 4).

  7. Does f(x) = x² + 1 have an inverse? If not, restrict it so that it does.

    Show answer

    No, because f(2) = f(−2) = 5. With x ≥ 0, the inverse is f−1(x) = √(x − 1).

  8. Are f(x) = 6 − 2x and g(x) = 3 − x/2 inverses?

    Show answer

    Yes. f(g(x)) = 6 − 2(3 − x/2) = x, and g(f(x)) = 3 − (6 − 2x)/2 = x.

Keep studying

Drafted with help from AI tools. Every example is worked through step by step so you can check it.