Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Inverse Function Calculator

How to use
  1. Type the function in the f(x)f(x) box, for example 2x+32x + 3, e2x−1e^{2x} - 1 or x−1x+2\dfrac{x - 1}{x + 2}. Learn more about entering the function
  2. Read the formula under Inverse, with the domain and range of the inverse below it. If the function has no inverse, the answer says so and offers one on a branch. Learn more about reading the answer
  3. Look at the graph: the amber curve is the mirror image of the blue graph in the dashed line y=xy = x. When ff is one-to-one, that mirror image is the graph of f−1f^{-1}.
  4. Type a number in Undo the value y = to find the xx that ff sends to it. The pair is marked on both curves.

Inverse function
Inverse
f−1(x)=x−32\displaystyle f^{-1}(x) = \frac{x-3}{2}
Domain of the inverse
R\displaystyle \mathbb{R}
Range of the inverse
R\displaystyle \mathbb{R}
How it was found

No horizontal line meets the graph of f(x)=2x+3f(x) = 2 x+3 twice, so ff is one-to-one and has an inverse.

Swap the roles: write x=f(y)x = f(y) and solve for yy, undoing the operations of ff from the outside in. That gives f−1(x)=x−32f^{-1}(x) = \frac{x-3}{2}.

The inverse takes the outputs of ff back to its inputs, so its domain is the range of ff and its range is the domain of ff.

To undo y=5y = 5: solve f(x)=5f(x) = 5. The answer is x=1x = 1, so f−1(5)=1f^{-1}(5) = 1.

Drawn by the tool
f−1(x)f^{-1}(x)read-only
f(x)=2x+3f\left(x\right)=2 x+3
f−1(x)f^{-1}(x)


Finding the inverse

DemoFind the inverse
Step 0 of 4
Type the function in the f(x)f(x) box. The calculator first decides whether ff is one-to-one. If it is, it writes the formula of f−1f^{-1} under Inverse and draws its graph in amber.

The formula is found by undoing the operations of ff in reverse order, the same way you would solve y=f(x)y = f(x) for xx by hand. For some functions, such as x3+xx^3 + x, no formula of this kind exists; the calculator then says that the inverse exists without a simple formula, and still draws it and evaluates it.

The box Undo the value y = asks the inverse a single question: which xx does ff send to this number? The answer appears at the end of How it was found, and the two matching points are marked on the graph.

Reading the answer

DemoWhen there is no inverse
Step 0 of 4
    For a one-to-one function there are three boxes:

  • Inverse: the formula f−1(x)f^{-1}(x).
  • Domain of the inverse: the inputs f−1f^{-1} accepts. This is the range of ff.
  • Range of the inverse: the outputs of f−1f^{-1}. This is the domain of ff.

  • The domain matters as much as the formula. For f(x)=x−1f(x) = \sqrt{x - 1} the inverse is x2+1x^2 + 1, but only for x≥0x \geq 0; the left half of that parabola does not belong to the inverse.

    For a function that is not one-to-one, the Inverse box says there is none on the whole domain. On one branch then gives an inverse for a stretch of the domain where ff only rises or only falls, and How it was found lists such stretches.

What an inverse function is

The inverse of a function ff is the function f−1f^{-1} that undoes it: if ff sends aa to bb, then f−1f^{-1} sends bb back to aa. In symbols, f−1(f(x))=xf^{-1}(f(x)) = x and f(f−1(x))=xf(f^{-1}(x)) = x.

For f(x)=2x+3f(x) = 2x + 3: f(1)=5f(1) = 5. The inverse must send 55 back to 11. It is f−1(x)=x−32f^{-1}(x) = \dfrac{x - 3}{2}, and indeed 5−32=1\dfrac{5 - 3}{2} = 1.

The notation f−1f^{-1} does not mean 1f\dfrac{1}{f}. The inverse of 2x+32x + 3 is x−32\dfrac{x - 3}{2}, not 12x+3\dfrac{1}{2x + 3}.
2x+32x + 3 (blue) sends 11 to 55; its inverse (amber) sends 55 back to 11.

Finding an inverse by hand

1. Write y=f(x)y = f(x).
2. Swap xx and yy.
3. Solve for yy.
4. Write the result as f−1(x)f^{-1}(x) and state its domain.

For f(x)=e2x−1f(x) = e^{2x} - 1: write x=e2y−1x = e^{2y} - 1. Add 11: x+1=e2yx + 1 = e^{2y}. Take the logarithm: ln⁡(x+1)=2y\ln(x + 1) = 2y. Divide: y=ln⁡(x+1)2y = \dfrac{\ln(x + 1)}{2}. The domain is x>−1x > -1.

For a fraction of two lines such as f(x)=x−1x+2f(x) = \dfrac{x - 1}{x + 2}, the unknown appears twice. Write x=y−1y+2x = \dfrac{y - 1}{y + 2}, multiply out to xy+2x=y−1xy + 2x = y - 1, collect yy: y(x−1)=−2x−1y(x - 1) = -2x - 1, so f−1(x)=−2x−1x−1f^{-1}(x) = \dfrac{-2x - 1}{x - 1}.

Solving undoes the operations of ff from the outside in: the last thing ff does is the first thing to undo.

The graph of an inverse

Swapping xx and yy turns every point (a, b)(a,\ b) of the graph of ff into the point (b, a)(b,\ a). Geometrically, that is a reflection in the line y=xy = x.

So the graph of f−1f^{-1} is the mirror image of the graph of ff in that line. The calculator draws the line dashed, the graph of ff in blue and its mirror image in amber.

exe^x and ln⁡(x)\ln(x) are the standard pair: the horizontal asymptote y=0y = 0 of the exponential becomes the vertical asymptote x=0x = 0 of the logarithm, and the point (0, 1)(0,\ 1) becomes (1, 0)(1,\ 0).
exe^x (blue) and ln⁡(x)\ln(x) (amber) are mirror images in the line y=xy = x.

One-to-one functions and the horizontal line test

A function has an inverse exactly when it is one-to-one: different inputs always give different outputs. Otherwise some output comes from two inputs, and there is no single way back.

The horizontal line test checks this on a graph: ff is one-to-one when no horizontal line meets its graph more than once.

f(x)=x2f(x) = x^2 fails: the line y=4y = 4 meets the parabola at x=−2x = -2 and x=2x = 2. Its mirror image in y=xy = x is a sideways parabola, which is not the graph of a function.

Functions that only rise or only fall are always one-to-one: lines with a slope, x3x^3, exe^x, ln⁡(x)\ln(x), x\sqrt{x}.
The line y=4y = 4 meets x2x^2 twice, so x2x^2 is not one-to-one.

Restricting the domain

A function that is not one-to-one can be given an inverse by keeping only part of its domain.

Keep x≥0x \geq 0 for f(x)=x2f(x) = x^2. On that half the function only rises, and its inverse is x\sqrt{x}. Keeping x≤0x \leq 0 instead gives the inverse −x-\sqrt{x}.

The inverse trigonometric functions are built this way. sin⁡(x)\sin(x) repeats every value infinitely often; restricted to [−π2, π2]\left[-\dfrac{\pi}{2},\ \dfrac{\pi}{2}\right] it is one-to-one, and its inverse there is arcsin⁡(x)\arcsin(x).

The calculator reports such an inverse under On one branch.
On x≥0x \geq 0, x2x^2 (blue) has the inverse x\sqrt{x} (amber).

Common mistakes

  • Reading f−1f^{-1} as a reciprocal. f−1(x)f^{-1}(x) is not 1f(x)\dfrac{1}{f(x)}.
  • Forgetting the domain of the inverse. The inverse of x−1\sqrt{x - 1} is x2+1x^2 + 1 only for x≥0x \geq 0.
  • Inverting a function that is not one-to-one. x2x^2 has no inverse on all of R\mathbb{R}; ±x\pm\sqrt{x} is two values, not a function.
  • Undoing in the wrong order. For 2x+32x + 3, subtract 33 first and then divide by 22; the last operation is undone first.
  • Reflecting in the wrong line. The mirror is y=xy = x, not an axis.