Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Precalculus

Inverse Functions: How to Find, Graph and Verify an Inverse

By MathSolver Pro Editorial Team · Published

An inverse function undoes what the original function does. If ff sends 2 to 7, its inverse sends 7 back to 2. This guide explains when an inverse exists, how to find its formula, and how to check it.

What an inverse function does

A function takes an input and produces an output. Its inverse, written f−1f^{-1}, runs the process backwards: it takes an output of ff and returns the input that produced it. If f(a)=bf(a) = b, then f−1(b)=af^{-1}(b) = a. Doing one and then the other brings you back where you started.

f−1(f(x))=x for x in the domain of f,f(f−1(x))=x for x in the domain of f−1f^{-1}(f(x)) = x \text{ for } x \text{ in the domain of } f, \qquad f(f^{-1}(x)) = x \text{ for } x \text{ in the domain of } f^{-1}

A simple everyday example is temperature conversion. The function F=95C+32F = \frac{9}{5}C + 32 converts Celsius to Fahrenheit. Its inverse, C=59(F−32)C = \frac{5}{9}(F - 32), converts back. Feeding 37 degrees Celsius into the first gives 98.6 degrees Fahrenheit, and feeding 98.6 into the second returns 37.

The notation needs care. The −1-1 in f−1f^{-1} is not an exponent. The inverse function f−1(x)f^{-1}(x) is different from the reciprocal 1f(x)\frac{1}{f(x)}. For f(x)=2xf(x) = 2x, the inverse is f−1(x)=x2f^{-1}(x) = \frac{x}{2}, but the reciprocal is 12x\frac{1}{2x}.

When does an inverse exist?

Reversing a function only works if each output came from exactly one input. Such a function is called one-to-one, or injective. If two different inputs give the same output, there is no way to know which input to return, so no inverse function exists on that domain.

The function f(x)=x2f(x) = x^2 fails this test on all real numbers, because f(3)=f(−3)=9f(3) = f(-3) = 9. Asked to undo 9, an inverse would not know whether to return 3 or −3-3. Graphically, this is the horizontal line test: a function is one-to-one exactly when no horizontal line crosses its graph more than once. The line y=9y = 9 crosses the parabola y=x2y = x^2 twice, so the parabola fails.

Functions that are always increasing or always decreasing pass automatically. Linear functions with non-zero slope, x3x^3, exe^x and ln⁡x\ln x are all one-to-one on their natural domains.

How to find an inverse algebraically

  1. Replace f(x)f(x) with yy.
  2. Swap xx and yy everywhere.
  3. Solve the new equation for yy.
  4. Replace yy with f−1(x)f^{-1}(x) and state its domain, which is the range of ff.

Example 1: f(x)=3x−4f(x) = 3x - 4

  1. Write y=3x−4y = 3x - 4 and swap: x=3y−4x = 3y - 4.
  2. Solve: 3y=x+43y = x + 4, so f−1(x)=x+43f^{-1}(x) = \frac{x + 4}{3}.
  3. Check: f(f−1(x))=3⋅x+43−4=xf(f^{-1}(x)) = 3 \cdot \frac{x + 4}{3} - 4 = x.

Example 2: f(x)=x3+2f(x) = x^3 + 2

  1. Swap: x=y3+2x = y^3 + 2, so y3=x−2y^3 = x - 2.
  2. Take the cube root: f−1(x)=x−23f^{-1}(x) = \sqrt[3]{x - 2}, defined for every real xx.
  3. Check at a point: f(1)=3f(1) = 3 and f−1(3)=13=1f^{-1}(3) = \sqrt[3]{1} = 1.

Example 3: f(x)=2x+1x−3f(x) = \dfrac{2x + 1}{x - 3}

  1. Swap: x=2y+1y−3x = \frac{2y + 1}{y - 3}.
  2. Multiply up: x(y−3)=2y+1x(y - 3) = 2y + 1, so xy−2y=3x+1xy - 2y = 3x + 1.
  3. Factor out yy: y(x−2)=3x+1y(x - 2) = 3x + 1, so f−1(x)=3x+1x−2f^{-1}(x) = \frac{3x + 1}{x - 2}.
  4. Domains swap with ranges: ff has domain x≠3x \neq 3 and range y≠2y \neq 2, while f−1f^{-1} has domain x≠2x \neq 2 and range y≠3y \neq 3.

When yy appears more than once after swapping, collect all the yy terms on one side and factor yy out, exactly as in Example 3.

Restricting the domain

A function that is not one-to-one can still have an inverse if you restrict its domain to a piece where it is. This is how square roots and inverse trigonometric functions are defined.

Restricting f(x)=x2f(x) = x^2 to x≥0x \ge 0 keeps only the right half of the parabola, which is one-to-one. Its inverse is f−1(x)=xf^{-1}(x) = \sqrt{x} for x≥0x \ge 0. Choosing x≤0x \le 0 instead would give −x-\sqrt{x}.

Example 4: f(x)=(x−2)2+1f(x) = (x - 2)^2 + 1 with x≥2x \ge 2

  1. On x≥2x \ge 2 the function is increasing, with range [1,∞)[1, \infty).
  2. Swap: x=(y−2)2+1x = (y - 2)^2 + 1, so (y−2)2=x−1(y - 2)^2 = x - 1.
  3. Take the square root. Because y≥2y \ge 2, choose the positive root: y−2=x−1y - 2 = \sqrt{x - 1}.
  4. So f−1(x)=2+x−1f^{-1}(x) = 2 + \sqrt{x - 1} with domain [1,∞)[1, \infty).

Inverse trigonometric functions work the same way. Sine is not one-to-one, so arcsin⁡x\arcsin x is defined as the inverse of sine restricted to [−π2,π2]\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]. That is why arcsin⁡(sin⁡5π6)=π6\arcsin\left(\sin\frac{5\pi}{6}\right) = \frac{\pi}{6}, not 5π6\frac{5\pi}{6}: the answer must lie in the restricted interval.

Exponentials and logarithms

The most important inverse pair in precalculus is exe^x and ln⁡x\ln x: ln⁡(ex)=x\ln(e^x) = x for every real xx, and eln⁡x=xe^{\ln x} = x for x>0x > 0. More generally, log⁡bx\log_b x is the inverse of bxb^x. The guide on logarithms builds all of their rules from this fact.

Example 5: f(x)=ex−1+3f(x) = e^{x - 1} + 3

  1. Swap: x=ey−1+3x = e^{y - 1} + 3, so ey−1=x−3e^{y - 1} = x - 3.
  2. Take natural logs: y−1=ln⁡(x−3)y - 1 = \ln(x - 3).
  3. So f−1(x)=1+ln⁡(x−3)f^{-1}(x) = 1 + \ln(x - 3) for x>3x > 3, matching the range (3,∞)(3, \infty) of ff.

Graphs of inverse functions

Because an inverse swaps inputs and outputs, every point (a,b)(a, b) on the graph of ff becomes the point (b,a)(b, a) on the graph of f−1f^{-1}. Geometrically, swapping coordinates is a reflection in the line y=xy = x. So the graph of an inverse is the mirror image of the original graph across that diagonal line.

This gives a quick way to sketch an inverse and a useful check: the graphs of exe^x and ln⁡x\ln x are reflections of each other, as are x3x^3 and x3\sqrt[3]{x}. Features swap too. A horizontal asymptote of ff becomes a vertical asymptote of f−1f^{-1}, which is exactly what happened in Example 3. Plotting both functions with the line y=xy = x on the graphing calculator makes the symmetry clear.

Verifying an inverse

To prove two functions are inverses, compose them in both orders and simplify. If both compositions equal xx on the relevant domains, the functions are inverses. For Example 3:

f ⁣(3x+1x−2)=2⋅3x+1x−2+13x+1x−2−3=6x+2+x−2x−23x+1−3x+6x−2=7x7=xf\!\left(\frac{3x + 1}{x - 2}\right) = \frac{2\cdot\frac{3x + 1}{x - 2} + 1}{\frac{3x + 1}{x - 2} - 3} = \frac{\frac{6x + 2 + x - 2}{x - 2}}{\frac{3x + 1 - 3x + 6}{x - 2}} = \frac{7x}{7} = x

A faster informal check is to pick one input, apply ff, then apply your inverse and see whether you get the input back. It does not prove the formula is right, but it catches most errors. Composition is explained in more detail in the guide to function composition.

Inverses in calculus

If ff is differentiable and one-to-one, the slope of the inverse at a point is the reciprocal of the slope of ff at the matching point. If f(a)=bf(a) = b and f′(a)≠0f'(a) \neq 0, then:

(f−1)′(b)=1f′(a)(f^{-1})'(b) = \frac{1}{f'(a)}

For f(x)=x3+xf(x) = x^3 + x, we have f(1)=2f(1) = 2 and f′(x)=3x2+1f'(x) = 3x^2 + 1, so f′(1)=4f'(1) = 4 and (f−1)′(2)=14(f^{-1})'(2) = \frac{1}{4}. This works even though finding a formula for f−1f^{-1} would be very difficult. It is the reason the derivative of ln⁡x\ln x is 1x\frac{1}{x}, since ln⁡\ln is the inverse of exe^x.

Common mistakes

  • Treating f−1(x)f^{-1}(x) as 1f(x)\frac{1}{f(x)}.
  • Forgetting to swap xx and yy, which just rearranges the original function.
  • Finding a formula for a function that is not one-to-one without restricting its domain.
  • Choosing the wrong sign of a square root after restricting the domain.
  • Not stating the domain of the inverse, which should equal the range of the original.

The inverse function calculator shows the swap and solve steps and checks the result by composition.

Inverses from tables and in applications

You do not always need a formula. If a table lists a one-to-one function, its inverse is found by swapping the two columns. Suppose a delivery company charges by weight, and its price table shows that 1 kilogram costs 6 dollars, 2 kilograms cost 9 dollars and 3 kilograms cost 12 dollars. The inverse table answers the opposite question: given what a customer paid, how heavy was the parcel? A payment of 9 dollars means 2 kilograms. If two weights had the same price, the inverse question would have no single answer, which is the one-to-one condition appearing in a practical setting.

Many real formulas are used in both directions. A loan calculator computes the monthly payment from the amount borrowed, and its inverse tells you how much you can borrow for a payment you can afford. A recipe scaled by servings can be inverted to find how many servings a given amount of flour makes. In science, a calibration curve turns a known concentration into an instrument reading, and the inverse turns a measured reading back into a concentration. Each time, the inverse is useful precisely because the original relationship is one-to-one over the range of values that matter.

Seeing inverses this way also makes the algebraic steps feel natural. Swapping xx and yy is just a compact way of saying that the roles of input and output have been exchanged, and solving for yy is answering the reverse question.

Frequently asked questions

Is the inverse the same as the reciprocal?

No. The inverse function f−1f^{-1} undoes ff, while the reciprocal 1f(x)\frac{1}{f(x)} divides 1 by its output. For f(x)=x+5f(x) = x + 5, the inverse is x−5x - 5 but the reciprocal is 1x+5\frac{1}{x + 5}.

How can I tell from a graph if an inverse exists?

Use the horizontal line test. If some horizontal line crosses the graph more than once, the function is not one-to-one and has no inverse unless you restrict its domain.

Why do the domain and range swap?

Because the inverse takes outputs of ff as its inputs and returns inputs of ff as its outputs. Whatever values ff can produce become exactly the values the inverse accepts.

Does every linear function have an inverse?

Every linear function mx+bmx + b with m≠0m \neq 0 does, and the inverse is x−bm\frac{x - b}{m}. A constant function, where m=0m = 0, sends every input to the same output, so it has no inverse.

MathSolver Pro Editorial Team

Math content and review

Our editorial team writes every guide to explain the reasoning behind each method, not just the answer. Each worked example is checked against the site's own solver engines and automated tests before it is published, and articles are revised whenever a method or an exam format changes.