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
Look at the graph: the amber curve is the mirror image of the blue graph in the dashed line y=x. When f is one-to-one, that mirror image is the graph of f−1.
Type a number in Undo the value y = to find the x that f sends to it. The pair is marked on both curves.
Inverse function
Inverse
f−1(x)=2x−3
Domain of the inverse
R
Range of the inverse
R
How it was found
No horizontal line meets the graph of f(x)=2x+3 twice, so f is one-to-one and has an inverse.
Swap the roles: write x=f(y) and solve for y, undoing the operations of f from the outside in. That gives f−1(x)=2x−3.
The inverse takes the outputs of f back to its inputs, so its domain is the range of f and its range is the domain of f.
To undo y=5: solve f(x)=5. The answer is x=1, so f−1(5)=1.
Type the function in the f(x) box. The calculator first decides whether f is one-to-one. If it is, it writes the formula of f−1 under Inverse and draws its graph in amber.
The formula is found by undoing the operations of f in reverse order, the same way you would solve y=f(x) for x by hand. For some functions, such as x3+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 x does f 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).
Domain of the inverse: the inputs f−1 accepts. This is the range of f.
Range of the inverse: the outputs of f−1. This is the domain of f.
The domain matters as much as the formula. For f(x)=x−1 the inverse is x2+1, but only for x≥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 f only rises or only falls, and How it was found lists such stretches.
What an inverse function is
The inverse of a function f is the function f−1 that undoes it: if f sends a to b, then f−1 sends b back to a. In symbols, f−1(f(x))=x and f(f−1(x))=x.
For f(x)=2x+3: f(1)=5. The inverse must send 5 back to 1. It is f−1(x)=2x−3, and indeed 25−3=1.
The notation f−1 does not mean f1. The inverse of 2x+3 is 2x−3, not 2x+31.
2x+3 (blue) sends 1 to 5; its inverse (amber) sends 5 back to 1.
Finding an inverse by hand
1. Write y=f(x). 2. Swap x and y. 3. Solve for y. 4. Write the result as f−1(x) and state its domain.
For f(x)=e2x−1: write x=e2y−1. Add 1: x+1=e2y. Take the logarithm: ln(x+1)=2y. Divide: y=2ln(x+1). The domain is x>−1.
For a fraction of two lines such as f(x)=x+2x−1, the unknown appears twice. Write x=y+2y−1, multiply out to xy+2x=y−1, collect y: y(x−1)=−2x−1, so f−1(x)=x−1−2x−1.
Solving undoes the operations of f from the outside in: the last thing f does is the first thing to undo.
The graph of an inverse
Swapping x and y turns every point (a,b) of the graph of f into the point (b,a). Geometrically, that is a reflection in the line y=x.
So the graph of f−1 is the mirror image of the graph of f in that line. The calculator draws the line dashed, the graph of f in blue and its mirror image in amber.
ex and ln(x) are the standard pair: the horizontal asymptote y=0 of the exponential becomes the vertical asymptote x=0 of the logarithm, and the point (0,1) becomes (1,0).
ex (blue) and ln(x) (amber) are mirror images in the line y=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: f is one-to-one when no horizontal line meets its graph more than once.
f(x)=x2 fails: the line y=4 meets the parabola at x=−2 and x=2. Its mirror image in y=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, x3, ex, ln(x), x.
The line y=4 meets x2 twice, so x2 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≥0 for f(x)=x2. On that half the function only rises, and its inverse is x. Keeping x≤0 instead gives the inverse −x.
The inverse trigonometric functions are built this way. sin(x) repeats every value infinitely often; restricted to [−2π,2π] it is one-to-one, and its inverse there is arcsin(x).
The calculator reports such an inverse under On one branch.
On x≥0, x2 (blue) has the inverse x (amber).
Common mistakes
Reading f−1 as a reciprocal.f−1(x) is not f(x)1.
Forgetting the domain of the inverse. The inverse of x−1 is x2+1 only for x≥0.
Inverting a function that is not one-to-one.x2 has no inverse on all of R; ±x is two values, not a function.
Undoing in the wrong order. For 2x+3, subtract 3 first and then divide by 2; the last operation is undone first.
Reflecting in the wrong line. The mirror is y=x, not an axis.
Related tools and lessons
To watch a graph being reflected in y=x on prepared examples, with the horizontal line test built in, open the Inverse Functions visual tool. The theory is in the lesson on inverse functions.