AP Precalculus · Topic 2.8 · Reading guide, about 5 min

Undoing a function: inverses

Learn what an inverse function is, when one exists, and how to find it from formulas, tables and graphs.

In one minute

An inverse function undoes what a function does. If ff turns an input of 4 into an output of 7, the inverse turns 7 back into 4. Inputs and outputs trade places.

Not every function can be undone cleanly. This topic shows when an inverse exists, how to build one from a formula, a table or a graph, and how to restrict a domain so a stubborn function becomes invertible.

Key terms

Inverse function
The function f−1f^{-1} that reverses ff: f−1(f(x))=xf^{-1}(f(x))=x and f(f−1(x))=xf(f^{-1}(x))=x wherever both sides are defined.
One-to-one
A function in which each output comes from exactly one input. Only one-to-one functions have inverses.
Horizontal line test
A function is one-to-one exactly when no horizontal line crosses its graph more than once.
Restricted domain
A smaller set of inputs chosen so the function becomes one-to-one and can be inverted.
Line y = x
The diagonal line over which the graph of a function and the graph of its inverse are mirror images.
Swap of domain and range
The domain of ff is the range of f−1f^{-1}, and the range of ff is the domain of f−1f^{-1}.
Notation f^{-1}
The inverse of ff. The −1-1 is not an exponent: f−1(x)f^{-1}(x) does not mean 1/f(x)1/f(x).

When an inverse exists

A function assigns one output to each input. An inverse must do the same going backwards: each output must point to a single input. If two inputs share an output, the inverse would not know where to return, so no inverse function exists.

For f(x)=x2f(x)=x^2, both −3-3 and 33 give 9, so the graph fails the horizontal line test. But if we restrict the domain to x≥0x\ge 0, the function is one-to-one and an inverse exists. Functions that only increase or only decrease on their domain always pass the test.

On a graph, the horizontal line test is quick. Sketch the graph and slide a horizontal ruler up and down. If the ruler ever touches two points at once, two inputs share an output. A line has an inverse unless it is horizontal. A cubic like x3x^3 always rises, so it has an inverse over all real numbers, while x2x^2 and ∣x∣|x| do not unless restricted.

When you restrict a domain, you are free to choose which piece to keep. For x2x^2 you could keep x≥0x\ge 0 or x≤0x\le 0. Both work, and they produce different inverses: x\sqrt{x} for the first and −x-\sqrt{x} for the second. Context in the problem tells you which piece to use.

Finding an inverse from a formula

The recipe is to swap xx and yy and then solve for yy. Write y=f(x)y=f(x), exchange the letters, solve, and name the result f−1f^{-1}.

Worked example. Let f(x)=3x−5f(x)=3x-5. Write y=3x−5y=3x-5, swap to get x=3y−5x=3y-5, add 5 to get x+5=3yx+5=3y, and divide to get y=x+53y=\dfrac{x+5}{3}. So f−1(x)=x+53f^{-1}(x)=\dfrac{x+5}{3}. Check with numbers: f(4)=7f(4)=7, and f−1(7)=123=4f^{-1}(7)=\dfrac{12}{3}=4. The inverse returned the original input.

Now a restricted domain. Let f(x)=(x−2)2+1f(x)=(x-2)^2+1 for x≥2x\ge 2. Swap: x=(y−2)2+1x=(y-2)^2+1, so x−1=(y−2)2x-1=(y-2)^2. Since y≥2y\ge 2, take the positive root: y−2=x−1y-2=\sqrt{x-1}, so f−1(x)=2+x−1f^{-1}(x)=2+\sqrt{x-1}. The range of ff is y≥1y\ge 1, so the domain of f−1f^{-1} is x≥1x\ge 1 and its range is y≥2y\ge 2. Check: f(3)=2f(3)=2 and f−1(2)=2+1=3f^{-1}(2)=2+1=3.

A table and its inverse table: swap the columns
x for ff(x)x for f^{-1}f^{-1}(x)
0110
1331
2552
3773

Inverses from tables and graphs

From a table, swap the two columns. This works only if no output repeats; if it does, the table has no inverse. To find f−1(5)f^{-1}(5), look for 5 in the output column and read the input beside it.

From a graph, reflect each point (a,b)(a,b) to (b,a)(b,a). The whole graph flips over the line y=xy=x. A point where ff crosses y=xy=x stays put. Features swap roles too: an xx-intercept of ff becomes a yy-intercept of f−1f^{-1}, and a horizontal asymptote becomes a vertical one.

Composition is the proof of an inverse. If f(g(x))=xf(g(x))=x and g(f(x))=xg(f(x))=x, then g=f−1g=f^{-1}. This links directly to 2.7.

For a quick check on a graph, pick any point on ff, such as (3,2)(3,2) on the restricted parabola above, and confirm that the swapped point (2,3)(2,3) lies on the inverse. If a few swapped points land on the curve you drew, the sketch is probably right.

How it connects

  • Back to 2.7: an inverse is defined through composition, since composing a function with its inverse gives the identity function.
  • Back to 1.12: a reflection over the yy-axis is a different transformation from the reflection over y=xy=x used for inverses.
  • Forward to 2.10: logarithms are the inverses of exponential functions, so every inverse idea here applies to them.

Common mistakes

  • **Treating f−1(x)f^{-1}(x) as 1/f(x)1/f(x).** The reciprocal and the inverse are different. f(x)=2xf(x)=2x has inverse x/2x/2, not 1/(2x)1/(2x).
  • Forgetting the restriction. A function like x2x^2 needs a restricted domain before an inverse exists, and the choice of restriction decides which root to use.
  • Not swapping the domain and range. The inverse's domain is the original's range. Reporting the old domain is a common slip.
  • Reflecting over the wrong line. The mirror is y=xy=x, not an axis.

How it shows up on the exam

  • Using a table to find an inverse value or to judge whether the inverse exists.
  • Finding a formula for an inverse, sometimes after choosing a domain restriction, and stating its domain.
  • Matching a graph to the graph of its inverse, or checking that two functions are inverses by composing them.

Check yourself

  1. Why does f(x)=x2f(x)=x^2 fail to have an inverse on all real numbers, and how can you repair it?
  2. What is the inverse of f(x)=x4+6f(x)=\dfrac{x}{4}+6?
  3. If the point (2,9)(2,9) is on the graph of ff, what point must be on the graph of f−1f^{-1}?
  4. How can you check that two formulas are inverses of each other without graphing?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.