Algebra 2

Inverse functions

An inverse function undoes a function: if f(2)=7f(2) = 7, then f−1(7)=2f^{-1}(7) = 2. To find it, write y=f(x)y = f(x), swap x and y, and solve for y. The graph of f−1f^{-1} is the graph of f reflected over the line y=xy = x. Check your answer by composing: f(f−1(x))f(f^{-1}(x)) should equal x. Only one-to-one functions have inverses, so sometimes you restrict the domain first.

Updated

The key idea

A function sends inputs to outputs. Its inverse sends each output back to the input it came from. So inputs and outputs trade places, and every point (a,b)(a, b) on f becomes (b,a)(b, a) on f−1f^{-1}.

f(a)=b  ⟺  f−1(b)=a,f(f−1(x))=x=f−1(f(x))f(a) = b \iff f^{-1}(b) = a, \qquad f\big(f^{-1}(x)\big) = x = f^{-1}\big(f(x)\big)

The −1-1 is not an exponent here. f−1(x)f^{-1}(x) means the inverse function, not 1f(x)\frac{1}{f(x)}.

Steps to find an inverse

  1. Replace f(x)f(x) with y.
  2. Swap x and y.
  3. Solve the new equation for y.
  4. Replace y with f−1(x)f^{-1}(x) and state any domain limits.
  5. Check that f(f−1(x))=xf(f^{-1}(x)) = x.

Worked examples

Example 1: a linear function

Problem Find the inverse of f(x)=3x−5f(x) = 3x - 5 and check it.

  1. Write y for f(x)f(x).
    y=3x−5y = 3x - 5
  2. Swap x and y.
    x=3y−5x = 3y - 5
  3. Add 5 to both sides.
    x+5=3yx + 5 = 3y
  4. Divide by 3.
    y=x+53y = \frac{x + 5}{3}
  5. Check: put x+53\frac{x + 5}{3} into f.
    3⋅x+53−5=x3 \cdot \frac{x + 5}{3} - 5 = x

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

Example 2: a rational function

Problem Find the inverse of f(x)=2x+1x−3f(x) = \frac{2x + 1}{x - 3}.

  1. Write y=2x+1x−3y = \frac{2x + 1}{x - 3}, then swap x and y.
    x=2y+1y−3x = \frac{2y + 1}{y - 3}
  2. Multiply both sides by y−3y - 3.
    x(y−3)=2y+1x(y - 3) = 2y + 1
  3. Distribute.
    xy−3x=2y+1xy - 3x = 2y + 1
  4. Get every y term on one side and everything else on the other.
    xy−2y=3x+1xy - 2y = 3x + 1
  5. Factor out y.
    y(x−2)=3x+1y(x - 2) = 3x + 1
  6. Divide by x−2x - 2.
    y=3x+1x−2y = \frac{3x + 1}{x - 2}

Answer f−1(x)=3x+1x−2f^{-1}(x) = \frac{3x + 1}{x - 2}, for x≠2x \ne 2

Example 3: restrict the domain first

Problem f(x)=(x−2)2+1f(x) = (x - 2)^2 + 1 is not one-to-one, so restrict it to x≥2x \ge 2. Find the inverse.

  1. Swap x and y in y=(x−2)2+1y = (x - 2)^2 + 1.
    x=(y−2)2+1x = (y - 2)^2 + 1
  2. Subtract 1.
    x−1=(y−2)2x - 1 = (y - 2)^2
  3. Take the square root. The outputs of the inverse are the old inputs, which were at least 2, so y−2≥0y - 2 \ge 0 and only the positive root fits.
    y−2=x−1y - 2 = \sqrt{x - 1}
  4. Add 2.
    y=2+x−1y = 2 + \sqrt{x - 1}

Answer f−1(x)=2+x−1f^{-1}(x) = 2 + \sqrt{x - 1}, with domain x≥1x \ge 1

Example 4 (test-hard): an inverse value without the formula

Problem Let f(x)=x3+x+1f(x) = x^3 + x + 1. Find f−1(11)f^{-1}(11).

  1. f−1(11)f^{-1}(11) is the input that gives 11. Set up that equation instead of hunting for a formula.
    x3+x+1=11x^3 + x + 1 = 11
  2. Move 11 over.
    x3+x−10=0x^3 + x - 10 = 0
  3. Try small integers. x=2x = 2 works.
    23+2−10=02^3 + 2 - 10 = 0
  4. f is always increasing (both x3x^3 and x grow), so no other input gives 11.

Answer f−1(11)=2f^{-1}(11) = 2

Common mistakes

  • Writing 1f(x)\frac{1}{f(x)}. The inverse of 3x−53x - 5 is not 13x−5\frac{1}{3x - 5}. Fix: swap x and y and solve.
  • Forgetting to swap. Solving y=3x−5y = 3x - 5 for x gives the same function written backwards. Fix: swap first, then solve for y, so the answer is in terms of x.
  • Leaving y on both sides. In xy−3x=2y+1xy - 3x = 2y + 1, collect every y term on one side and factor y out.
  • Keeping both square roots. With a restricted domain, only one sign makes sense. Fix: the outputs of f−1f^{-1} must match the inputs you allowed for f.
  • Skipping the check. A quick composition catches most algebra slips. Fix: plug a number like x=4x = 4 into f, then into your inverse, and see if you get 4 back.

Quick methods

Practice

5 practice questions

  1. What is the inverse of f(x)=x+42f(x) = \frac{x + 4}{2}?

    1. f−1(x)=2x−4f^{-1}(x) = 2x - 4
    2. f−1(x)=2x+4f^{-1}(x) = 2x + 4
    3. f−1(x)=x−42f^{-1}(x) = \frac{x - 4}{2}
    4. f−1(x)=2x+4f^{-1}(x) = \frac{2}{x + 4}
    Show answer

    Answer: f−1(x)=2x−4f^{-1}(x) = 2x - 4

    Swap: x=y+42x = \frac{y + 4}{2}. Multiply by 2: 2x=y+42x = y + 4, so y=2x−4y = 2x - 4. 2x+4\frac{2}{x + 4} is the reciprocal, which is not the inverse.

  2. f is one-to-one and f(3)=10f(3) = 10. Which point must be on the graph of f−1f^{-1}?

    1. (3,10)(3, 10)
    2. (10,3)(10, 3)
    3. (−3,−10)(-3, -10)
    4. (3,−10)(3, -10)
    Show answer

    Answer: (10,3)(10, 3)

    (3,10)(3, 10) is on f, and the inverse swaps inputs and outputs, so (10,3)(10, 3) is on f−1f^{-1}. That is the reflection of (3,10)(3, 10) over y=xy = x.

  3. Which function does NOT have an inverse function on its whole domain?

    1. f(x)=2x+7f(x) = 2x + 7
    2. g(x)=x3g(x) = x^3
    3. h(x)=x2+1h(x) = x^2 + 1
    4. k(x)=xk(x) = \sqrt{x}
    Show answer

    Answer: h(x)=x2+1h(x) = x^2 + 1

    h(2)=h(−2)=5h(2) = h(-2) = 5, so two inputs share an output and h fails the horizontal line test. The other three never repeat an output.

  4. What is the inverse of f(x)=x3−1f(x) = x^3 - 1?

    1. f−1(x)=x+13f^{-1}(x) = \sqrt[3]{x + 1}
    2. f−1(x)=x3+1f^{-1}(x) = \sqrt[3]{x} + 1
    3. f−1(x)=1x3−1f^{-1}(x) = \frac{1}{x^3 - 1}
    4. f−1(x)=x−13f^{-1}(x) = \sqrt[3]{x - 1}
    Show answer

    Answer: f−1(x)=x+13f^{-1}(x) = \sqrt[3]{x + 1}

    Swap: x=y3−1x = y^3 - 1, so y3=x+1y^3 = x + 1 and y=x+13y = \sqrt[3]{x + 1}. Adding 1 after the cube root undoes the steps in the wrong order.

  5. If f(x)=5x−7f(x) = 5x - 7, what is f−1(18)f^{-1}(18)?

    Show answer

    Answer: 5

    Find the input that gives 18: 5x−7=185x - 7 = 18, so 5x=255x = 25 and x=5x = 5. Check: f(5)=25−7=18f(5) = 25 - 7 = 18.

Frequently asked questions

Is f^-1(x) the same as 1/f(x)?

No. f−1f^{-1} is the function that undoes f, while 1f(x)\frac{1}{f(x)} is the reciprocal of the output. For f(x)=2xf(x) = 2x, the inverse is x2\frac{x}{2}, but the reciprocal is 12x\frac{1}{2x}. The notation is confusing, so read it from context.

How do I check that two functions are inverses?

Compose them both ways. If f(g(x))=xf(g(x)) = x and g(f(x))=xg(f(x)) = x for every allowed x, they are inverses. A quick spot check: put a number into one, put the result into the other, and you should get your number back.

What does one-to-one mean?

Every output comes from exactly one input. If two different inputs give the same output, like x2x^2 at 3 and −3-3, the inverse would not know which input to return. Restricting the domain, for example to x≥0x \ge 0, fixes that.

How are the graphs of a function and its inverse related?

They are mirror images over the line y=xy = x, because every point (a,b)(a, b) becomes (b,a)(b, a). If you fold the graph paper along y=xy = x, the two graphs land on top of each other.

Try asking Ducky

  • “Why do we swap x and y? It feels like cheating.”
  • “Can you check my inverse by composing it with the original?”
  • “Why does only the positive square root work in the restricted one?”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.