AP · Precalculus · Composition and Inverse Functions

Inverse Functions

17 min readUpdated November 30, 2026FreeAP Precalculus, Exponential and Logarithmic Functions

An inverse function f−1f^{-1} undoes ff: if f(a)=bf(a) = b, then f−1(b)=af^{-1}(b) = a, so every input-output pair of ff swaps places. A function has an inverse only when it is one-to-one, which you can often arrange by restricting its domain. To find f−1(x)f^{-1}(x), swap xx and yy in y=f(x)y = f(x) and solve for yy; the graph of f−1f^{-1} is the reflection of the graph of ff in the line y=xy = x.

Quick check

  1. If f(x)=2x+1f(x) = 2x + 1 and g(x)=x2g(x) = x^2, what is f(g(3))f(g(3))?Show answerHide answer

    1919. Work from the inside out: g(3)=9g(3) = 9, then f(9)=2(9)+1=19f(9) = 2(9) + 1 = 19.

  2. A function adds 55 to every input. What function undoes it?Show answerHide answer

    The function that subtracts 55: if f(x)=x+5f(x) = x + 5, the inverse is f−1(x)=x−5f^{-1}(x) = x - 5.

  3. Does f(x)=x2f(x) = x^2 have an inverse function on all real numbers?Show answerHide answer

    No. f(2)=f(−2)=4f(2) = f(-2) = 4, so the output 44 cannot be sent back to one single input.

Know these already? Jump to the practice questions

What you'll be able to do

  • Explain what an inverse function does to the input-output pairs of ff.
  • Determine whether a function is one-to-one, and restrict its domain so that it has an inverse.
  • Find f−1(x)f^{-1}(x) from a formula and state its domain.
  • Identify values of f−1f^{-1} from a table or a graph of ff.
  • Justify that two functions are inverses by composing them.

Key terms

Inverse function

The function f−1f^{-1} with f−1(b)=af^{-1}(b) = a exactly when f(a)=bf(a) = b. Its domain is the range of ff, and its range is the domain of ff.

In plain English
The function run backward: put in an output of ff and get back the input that made it.
Don't write
"f−1(x)=1f(x)f^{-1}(x) = \dfrac{1}{f(x)}"; the −1-1 names the inverse, not a power.

One-to-one function

A function in which different inputs always give different outputs, so each output comes from exactly one input.

In plain English
No two inputs share an output, so every output points back to one input.
Don't write
"one-to-one means each xx has one yy"; every function does that.

Restricted domain

A smaller set of inputs chosen for a function, usually so that it is one-to-one on that set.

In plain English
Keep one branch of the graph so that no horizontal line meets it twice.
Don't write
"x\sqrt{x} is the inverse of x2x^2" without the restriction x≥0x \geq 0.

What does an inverse function undo?

If ff sends aa to bb, its inverse sends bb back to aa. Learn this:

f(a)=bexactly whenf−1(b)=af(a) = b \quad \text{exactly when} \quad f^{-1}(b) = a

So every pair of ff appears in f−1f^{-1} with its two numbers swapped. The inputs of f−1f^{-1} are the outputs of ff, so the domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.

xx11223344
f(x)f(x)−3-300551212

To find f−1(5)f^{-1}(5), look for 55 in the output row. It sits under x=3x = 3, so f−1(5)=3f^{-1}(5) = 3. You read a table for f−1f^{-1} backward: from the output row to the input row.

Check yourself

Using the table, find f−1(12)f^{-1}(12) and f−1(−3)f^{-1}(-3).
Show answerHide answer

f−1(12)=4f^{-1}(12) = 4 and f−1(−3)=1f^{-1}(-3) = 1, because f(4)=12f(4) = 12 and f(1)=−3f(1) = -3.

When does a function have an inverse?

Only when it is one-to-one. For f(x)=x2f(x) = x^2, f(−2)=f(2)=4f(-2) = f(2) = 4, so f−1(4)f^{-1}(4) would have to be both −2-2 and 22. A function can't give two outputs, so x2x^2 has no inverse on all real numbers.

Three quick tests:

  • Table: no output value appears twice.
  • Graph: every horizontal line meets the graph at most once.
  • Behavior: a function that is always increasing or always decreasing on its domain is one-to-one.

When a function fails, restrict its domain to a piece where it only increases or only decreases. For x2x^2, the usual choice is x≥0x \geq 0, which gives the inverse x\sqrt{x}. The choice x≤0x \leq 0 works too, and gives −x-\sqrt{x}.

Key idea

A parabola's vertex splits it into an increasing half and a decreasing half, and either half has an inverse.

Check yourself

Give the largest domain of the form x≥cx \geq c on which h(x)=(x+3)2h(x) = (x + 3)^2 is one-to-one.
Show answerHide answer

x≥−3x \geq -3. The vertex is at x=−3x = -3, and hh is increasing for every xx to its right.

How do you find an inverse from a formula?

Learn this method:

  1. Write y=f(x)y = f(x).
  2. Swap xx and yy. This swaps every input with its output.
  3. Solve for yy. The result is f−1(x)f^{-1}(x).
  4. State the domain of f−1f^{-1}: it is the range of ff.

For f(x)=3x−7f(x) = 3x - 7: swapping gives x=3y−7x = 3y - 7, so 3y=x+73y = x + 7 and f−1(x)=x+73f^{-1}(x) = \dfrac{x + 7}{3}.

To confirm, compose the two functions (see the note on Composition of Functions). Learn this: ff and gg are inverses when f(g(x))=xf(g(x)) = x and g(f(x))=xg(f(x)) = x for every xx in the right domains. Here f(x+73)=(x+7)−7=xf\left(\dfrac{x + 7}{3}\right) = (x + 7) - 7 = x. A one-value test is quicker but weaker: f(4)=5f(4) = 5 and f−1(5)=4f^{-1}(5) = 4.

Examiner's eye

Marks are lost when an inverse of a restricted function is given without its domain. The domain of f−1f^{-1} is the range of ff, so state it.

Check yourself

Find f−1(x)f^{-1}(x) for f(x)=x2+4f(x) = \dfrac{x}{2} + 4.
Show answerHide answer

f−1(x)=2x−8f^{-1}(x) = 2x - 8. Swapping gives x=y2+4x = \dfrac{y}{2} + 4, so y2=x−4\dfrac{y}{2} = x - 4 and y=2x−8y = 2x - 8.

Every point (a,b)(a, b) on the graph of ff becomes (b,a)(b, a) on the graph of f−1f^{-1}. Swapping coordinates is a reflection in the line y=xy = x, so the two graphs are mirror images in that line.

The figure "The graph of y = g(x) = (x − 2)² + 1 for x ≥ 2 and its inverse, reflected in the line y = x" shows this. The points (2,1)(2, 1), (3,2)(3, 2) and (4,5)(4, 5) on gg become (1,2)(1, 2), (2,3)(2, 3) and (5,4)(5, 4) on g−1g^{-1}.

Features swap too. An xx-intercept of ff becomes a yy-intercept of f−1f^{-1}, and a horizontal asymptote y=cy = c becomes a vertical asymptote x=cx = c. An increasing ff has an increasing inverse.

To read f−1(b)f^{-1}(b) from the graph of ff, start at bb on the yy-axis, go across to the curve, and read the xx-coordinate there.

Check yourself

The graph of ff passes through (−1,6)(-1, 6) and has the horizontal asymptote y=2y = 2. Give a point on the graph of f−1f^{-1} and its vertical asymptote.
Show answerHide answer

The point (6,−1)(6, -1) is on the graph of f−1f^{-1}, and its vertical asymptote is x=2x = 2.

Which method gives the inverse value?

You're givenTo find f−1(b)f^{-1}(b) or f−1(x)f^{-1}(x)
A table of fffind bb in the output row and read the input
A graph of ffgo across from bb on the yy-axis to the curve, read xx
A formula, one value wantedsolve f(x)=bf(x) = b
A formula, whole inverse wantedswap xx and yy, solve for yy, state the domain

Worked example 1: Inverse values from a table

Question: The function ff is defined only for x=0,1,2,3,4x = 0, 1, 2, 3, 4, with f(0)=3f(0) = 3, f(1)=4f(1) = 4, f(2)=0f(2) = 0, f(3)=−2f(3) = -2 and f(4)=1f(4) = 1. (a) Find f−1(0)f^{-1}(0). (b) Find f−1(f−1(4))f^{-1}(f^{-1}(4)). (c) State the domain of f−1f^{-1}.

xx0011223344
f(x)f(x)334400−2-211

What tells you the method

The function is given as a table, so you read it backward, from outputs to inputs.

  1. Step 1: Confirm ff is one-to-one.

    The outputs 3,4,0,−2,13, 4, 0, -2, 1 are all different.

    Why

    Each output comes from one input, so f−1f^{-1} is a function.

  2. Step 2: Find f−1(0)f^{-1}(0).

    The output 00 sits under x=2x = 2, so f−1(0)=2f^{-1}(0) = 2.

    Why

    f(2)=0f(2) = 0 means f−1(0)=2f^{-1}(0) = 2.

  3. Step 3: Work from the inside out.

    The output 44 sits under x=1x = 1, so f−1(4)=1f^{-1}(4) = 1. Then the output 11 sits under x=4x = 4, so f−1(1)=4f^{-1}(1) = 4.

    Why

    A composition is evaluated innermost first.

  4. Step 4: State the domain.

    The domain of f−1f^{-1} is the range of ff: the values −2,0,1,3,4-2, 0, 1, 3, 4.

    Why

    The inputs of f−1f^{-1} are exactly the outputs of ff.

Check it

f(2)=0f(2) = 0, and f(4)=1f(4) = 1 with f(1)=4f(1) = 4, so each backward reading matches a forward pair.

Answer

(a) f−1(0)=2f^{-1}(0) = 2. (b) f−1(f−1(4))=4f^{-1}(f^{-1}(4)) = 4. (c) The domain of f−1f^{-1} is the set of values −2-2, 00, 11, 33 and 44.

Worked example 2: Inverse of a rational function

Question: Find f−1(x)f^{-1}(x) for f(x)=2x+3x−4f(x) = \dfrac{2x + 3}{x - 4}, x≠4x \neq 4, and state the domain of f−1f^{-1}.

What tells you the method

You need the whole inverse from a formula, so swap xx and yy and solve.

  1. Step 1: Swap xx and yy.

    x=2y+3y−4x = \dfrac{2y + 3}{y - 4}.

    Why

    Swapping exchanges every input with its output.

  2. Step 2: Clear the fraction.

    x(y−4)=2y+3x(y - 4) = 2y + 3, so xy−4x=2y+3xy - 4x = 2y + 3.

    Why

    Multiplying by y−4y - 4 removes the denominator.

  3. Step 3: Collect the yy terms and factor.

    xy−2y=4x+3xy - 2y = 4x + 3, so y(x−2)=4x+3y(x - 2) = 4x + 3.

    Why

    With every yy on one side, you can factor yy out.

  4. Step 4: Divide.

    y=4x+3x−2y = \dfrac{4x + 3}{x - 2}, so the domain of f−1f^{-1} is x≠2x \neq 2.

    Why

    ff never outputs 22, since 2x+3x−4=2\dfrac{2x + 3}{x - 4} = 2 leads to 3=−83 = -8, so 22 is missing from the range of ff.

Check it

f(5)=131=13f(5) = \dfrac{13}{1} = 13 and f−1(13)=5511=5f^{-1}(13) = \dfrac{55}{11} = 5, so the inverse sends 1313 back to 55.

Answer

f−1(x)=4x+3x−2f^{-1}(x) = \dfrac{4x + 3}{x - 2}, with domain x≠2x \neq 2.

Worked example 3: Restricting the domain

Question: Let g(x)=(x−2)2+1g(x) = (x - 2)^2 + 1. (a) Find two different inputs xx with g(x)=2g(x) = 2. (b) With the domain restricted to x≥2x \geq 2, find g−1(x)g^{-1}(x) and state its domain. (c) Find g−1(10)g^{-1}(10).

What tells you the method

A squared expression is not one-to-one, so the restriction decides which square root the inverse keeps.

  1. Step 1: Show gg is not one-to-one.

    g(1)=1+1=2g(1) = 1 + 1 = 2 and g(3)=1+1=2g(3) = 1 + 1 = 2.

    Why

    Two inputs share the output 22, so gg has no inverse on all real numbers.

  2. Step 2: Restrict and find the range.

    For x≥2x \geq 2, gg is increasing from its vertex (2,1)(2, 1), so its range is y≥1y \geq 1.

    Why

    The range of gg becomes the domain of g−1g^{-1}.

  3. Step 3: Swap and solve.

    x=(y−2)2+1x = (y - 2)^2 + 1, so (y−2)2=x−1(y - 2)^2 = x - 1 and y−2=±x−1y - 2 = \pm\sqrt{x - 1}.

    Why

    Undo the +1+1, then the square.

  4. Step 4: Choose the sign.

    The range of g−1g^{-1} is y≥2y \geq 2, so keep the positive root: g−1(x)=2+x−1g^{-1}(x) = 2 + \sqrt{x - 1} for x≥1x \geq 1.

    Why

    An inverse is a function, so it keeps the one branch that matches the restriction.

  5. Step 5: Evaluate.

    g−1(10)=2+9=5g^{-1}(10) = 2 + \sqrt{9} = 5.

    Why

    Substitute into the inverse.

Check it

g(5)=32+1=10g(5) = 3^2 + 1 = 10, so g−1(10)=5g^{-1}(10) = 5 is right. Also g(g−1(x))=(x−1)2+1=xg(g^{-1}(x)) = (\sqrt{x - 1})^2 + 1 = x.

Answer

(a) x=1x = 1 and x=3x = 3. (b) g−1(x)=2+x−1g^{-1}(x) = 2 + \sqrt{x - 1} for x≥1x \geq 1. (c) g−1(10)=5g^{-1}(10) = 5.

Your turn

Question: Find h−1(x)h^{-1}(x) for h(x)=2x3−5h(x) = 2x^3 - 5.

  1. Step 1:

    Write y=2x3−5y = 2x^3 - 5 and swap: x=2y3−5x = 2y^3 - 5.

  2. Step 2:

    Add 55 to both sides: x+5=2y3x + 5 = 2y^3.

  3. Step 3: Your go: divide by 22, take the cube root, and check with h(1)h(1).

Show the full solutionHide the solution

Dividing by 22 gives y3=x+52y^3 = \dfrac{x + 5}{2}, and the cube root gives y=x+523y = \sqrt[3]{\dfrac{x + 5}{2}}. A cube root exists for every real number, and hh is increasing on all real numbers, so no restriction is needed. Check: h(1)=−3h(1) = -3 and h−1(−3)=13=1h^{-1}(-3) = \sqrt[3]{1} = 1.

Answer: h−1(x)=x+523h^{-1}(x) = \sqrt[3]{\dfrac{x + 5}{2}} for all real xx.

Traps

Trap

Reading f−1(x)f^{-1}(x) as 1f(x)\dfrac{1}{f(x)}.

It seems right because x−1x^{-1} means 1x\dfrac{1}{x}. But on a function name, −1^{-1} marks the inverse: for f(x)=x+3f(x) = x + 3, f−1(x)=x−3f^{-1}(x) = x - 3, while 1f(x)=1x+3\dfrac{1}{f(x)} = \dfrac{1}{x + 3}.

Check yourself

For f(x)=2xf(x) = 2x, find f−1(8)f^{-1}(8) and 1f(8)\dfrac{1}{f(8)}.
Show answerHide answer

f−1(8)=4f^{-1}(8) = 4, because f(4)=8f(4) = 8. But 1f(8)=116\dfrac{1}{f(8)} = \dfrac{1}{16}, a different number.

Trap

Keeping ±\pm in an inverse after taking a square root.

It seems right because solving (y−2)2=x−1(y - 2)^2 = x - 1 as an equation gives two roots. But an inverse must be a function, so keep only the sign that matches the restricted domain: the outputs of g−1g^{-1} are the inputs of gg.

Check yourself

f(x)=x2+3f(x) = x^2 + 3 has domain x≤0x \leq 0. Which sign does f−1(x)f^{-1}(x) take?
Show answerHide answer

The negative sign: f−1(x)=−x−3f^{-1}(x) = -\sqrt{x - 3}, because its outputs must satisfy x≤0x \leq 0. Check: f(−2)=7f(-2) = 7 and f−1(7)=−2f^{-1}(7) = -2.

Trap

Reading f−1(b)f^{-1}(b) from a graph by starting at bb on the xx-axis.

It seems right because that is how you read f(b)f(b). But bb is an output of ff, so start at bb on the yy-axis, go across to the curve, and read its xx-coordinate.

Check yourself

The graph of ff passes through (2,7)(2, 7) and (7,4)(7, 4). What is f−1(7)f^{-1}(7)?
Show answerHide answer

22, because f(2)=7f(2) = 7. The value 44 is f(7)f(7), which is the wrong reading.

What's examined

Inverse functions sit in Unit 2 (Exponential and Logarithmic Functions) of the AP® Precalculus exam, in both the multiple-choice and the free-response sections. Expect to read inverse values from a table or graph, find f−1(x)f^{-1}(x) for a linear, rational or radical function, and restrict a domain so that an inverse exists. Show the swap-and-solve steps by hand. To justify that two functions are inverses, show that both compositions return xx. The inverse of an exponential function is a logarithm: see Logarithmic Functions and Their Graphs.

Practice questions

  1. Recall Which function is one-to-one on all real numbers?
    • A) f(x)=x2−4f(x) = x^2 - 4
    • B) f(x)=x3+2f(x) = x^3 + 2
    • C) f(x)=∣x−1∣f(x) = |x - 1|
    • D) f(x)=(x+3)2f(x) = (x + 3)^2
Show answer

Answer: B) f(x)=x3+2f(x) = x^3 + 2

Marking points:

  • x3+2x^3 + 2 is increasing on all real numbers, so no output repeats.
  • A fails because f(2)=f(−2)=0f(2) = f(-2) = 0. C fails because f(0)=f(2)=1f(0) = f(2) = 1. D fails because f(−2)=f(−4)=1f(-2) = f(-4) = 1.
  1. Recall A one-to-one function ff has f(−1)=6f(-1) = 6, f(0)=2f(0) = 2, f(3)=−4f(3) = -4 and f(5)=0f(5) = 0. Find f−1(2)f^{-1}(2) and f−1(0)f^{-1}(0).
Show answer

Answer: f−1(2)=0f^{-1}(2) = 0 and f−1(0)=5f^{-1}(0) = 5.

Marking points:

  • f(0)=2f(0) = 2, so f−1(2)=0f^{-1}(2) = 0.
  • f(5)=0f(5) = 0, so f−1(0)=5f^{-1}(0) = 5.
  1. Apply Let f(x)=5x−23f(x) = \dfrac{5x - 2}{3}. Which expression is f−1(x)f^{-1}(x)?
    • A) 3x−25\dfrac{3x - 2}{5}
    • B) 35x−2\dfrac{3}{5x - 2}
    • C) 5x+23\dfrac{5x + 2}{3}
    • D) 3x+25\dfrac{3x + 2}{5}
Show answer

Answer: D) 3x+25\dfrac{3x + 2}{5}

Marking points:

  • Swap: x=5y−23x = \dfrac{5y - 2}{3}, so 3x=5y−23x = 5y - 2, 5y=3x+25y = 3x + 2 and y=3x+25y = \dfrac{3x + 2}{5}.
  • A undoes the multiplication but not the subtraction. B takes the reciprocal of ff. C changes only the sign.
  1. Apply Let f(x)=x−2+3f(x) = \sqrt{x - 2} + 3 for x≥2x \geq 2. (a) State the range of ff. (b) Find f−1(x)f^{-1}(x) and state its domain.
Show answer

Answer: (a) The range of ff is y≥3y \geq 3. (b) f−1(x)=(x−3)2+2f^{-1}(x) = (x - 3)^2 + 2 for x≥3x \geq 3.

Marking points:

  • x−2≥0\sqrt{x - 2} \geq 0, so every output is at least 33.
  • Swap: x=y−2+3x = \sqrt{y - 2} + 3, so y−2=x−3\sqrt{y - 2} = x - 3 and y=(x−3)2+2y = (x - 3)^2 + 2.
  • The domain of f−1f^{-1} is the range of ff, x≥3x \geq 3. Check: f(6)=5f(6) = 5 and f−1(5)=6f^{-1}(5) = 6.
  1. Apply The graph of a one-to-one function ff passes through (−2,5)(-2, 5) and has the horizontal asymptote y=1y = 1. Which statement about the graph of f−1f^{-1} must be true?
    • A) It passes through (5,−2)(5, -2) and has the vertical asymptote x=1x = 1.
    • B) It passes through (5,−2)(5, -2) and has the horizontal asymptote y=1y = 1.
    • C) It passes through (2,−5)(2, -5) and has the vertical asymptote x=1x = 1.
    • D) It passes through (−2,5)(-2, 5) and has the vertical asymptote x=1x = 1.
Show answer

Answer: A) It passes through (5,−2)(5, -2) and has the vertical asymptote x=1x = 1.

Marking points:

  • Reflecting in y=xy = x swaps coordinates, so (−2,5)(-2, 5) becomes (5,−2)(5, -2), and the line y=1y = 1 becomes x=1x = 1.
  • B swaps the point but not the asymptote. C negates the coordinates instead of swapping them. D keeps the point of ff.
  1. Exam-style Let f(x)=x+52x−1f(x) = \dfrac{x + 5}{2x - 1} for x≠12x \neq \dfrac{1}{2}. (a) Find f−1(x)f^{-1}(x). (b) Find f−1(2)f^{-1}(2).
Show answer

Answer: (a) f−1(x)=x+52x−1f^{-1}(x) = \dfrac{x + 5}{2x - 1}. (b) f−1(2)=73f^{-1}(2) = \dfrac{7}{3}.

Marking points:

  • Swap: x=y+52y−1x = \dfrac{y + 5}{2y - 1}, so 2xy−x=y+52xy - x = y + 5.
  • Collect: 2xy−y=x+52xy - y = x + 5, so y(2x−1)=x+5y(2x - 1) = x + 5 and y=x+52x−1y = \dfrac{x + 5}{2x - 1}. This ff is its own inverse, so its graph is symmetric about y=xy = x.
  • f−1(2)=73f^{-1}(2) = \dfrac{7}{3}. Check: f(73)=22/311/3=2f\left(\dfrac{7}{3}\right) = \dfrac{22/3}{11/3} = 2.
  1. Exam-style The function f(x)=x3+x+1f(x) = x^3 + x + 1 is increasing on all real numbers. What is the value of f−1(3)f^{-1}(3)?
    • A) 131\dfrac{1}{31}
    • B) 23\sqrt[3]{2}
    • C) 11
    • D) 3131
Show answer

Answer: C) 11

Marking points:

  • f−1(3)f^{-1}(3) is the input with f(x)=3f(x) = 3: x3+x+1=3x^3 + x + 1 = 3, and x=1x = 1 works since 1+1+1=31 + 1 + 1 = 3. Because ff is increasing, it is the only solution.
  • A is 1f(3)\dfrac{1}{f(3)}. B drops the xx term and solves x3+1=3x^3 + 1 = 3. D is f(3)f(3).

Key points

Recall, then reveal

Say the main points from memory first, then check them.

Show key pointsHide key points
  • f(a)=bf(a) = b means f−1(b)=af^{-1}(b) = a, so the domain and range of ff trade places in f−1f^{-1}.
  • Only a one-to-one function has an inverse; restrict a function to a piece where it only increases or only decreases.
  • To find f−1(x)f^{-1}(x), swap xx and yy, solve for yy, and keep the branch that fits the restricted domain.
  • The graph of f−1f^{-1} is the mirror image of the graph of ff in the line y=xy = x.
  • Two functions are inverses when composing them in either order returns xx.

Figures

A solid curve rising from (2, 1) through (3, 2) to (4, 5), the right half of a parabola, and a dashed curve rising from (1, 2) through (2, 3) to (5, 4), its mirror image in the dashed line y = x. (open full size in a new tab)
The graph of y = g(x) = (x − 2)² + 1 for x ≥ 2 and its inverse, reflected in the line y = x

Keep learning

Explore AP Precalculus tutoring →

View the full Precalculus syllabus →

More in this unit

Exponential and Logarithmic Functions

All Composition and Inverse Functions notes

Part of Novark's AP Precalculus notes