Inverse Function Calculator
This inverse function calculator takes f(x) and undoes it — and when there is no inverse to be had, it says so plainly instead of printing a ± and leaving you to work out what that means.
Type 2x + 3 and you get f⁻¹(x) = (x − 3)/2. Some books write the same answer as x/2 − 3/2; open the bracket and one becomes the other, and either earns full marks.
What an Inverse Function Is
Not a formula to memorise — a job description:
f⁻¹(f(x)) = x
Whatever f does to a number, f⁻¹ has to put back, so that doing both leaves you where you started. Everything else about the topic falls out of that one line, including the part that catches people.
Swap x and y, Then Solve for y
The method everyone is taught, and it is worth knowing why it works rather than just that it does.
y = 2x + 3 → x = 2y + 3 → y = (x − 3)/2
The graph of an inverse is the original reflected in the line y = x, and reflecting in that line is exactly what swapping the two letters does. So the swap is not a trick someone invented; it is the reflection written down. Solving for y afterwards is tidying up.
Shoes and Socks: Undo the Steps Backwards
Socks then shoes going on; shoes then socks coming off. A function works the same way, and it is the fastest way to do these by hand.
Read √(2x − 4) + 1 as a list of things done to x:
x → multiply by 2 → subtract 4 → take the square root → add 1
Now undo them backwards: subtract 1, square it, add 4, divide by 2. That gives ((x − 1)² + 4)/2, and no rearranging was needed at any point.
Getting that order wrong is the commonest wrong answer in this topic, which is why the working on this page lists the steps forwards and then reverses them rather than doing both at once in your head.
The method has a limit worth knowing. It works because x appears once, so the function really is a chain and there is something to peel. Type x² + x and there is no chain: x turns up twice, the two occurrences interfere, and undoing one of them undoes nothing. That equation can be solved by other means, but not by this one, and a page that produced an answer anyway would be guessing. This one names the reason and stops.
One shape does have x twice and still inverts cleanly: (2x + 1)/(x − 3). Everything gathers onto one side because x is only ever multiplied and added, never squared or rooted, and the answer comes out as (−3x − 1)/(−x + 2). It is common enough in textbooks to be worth handling rather than refusing.
When There Is No Inverse Function
Here is the catch nobody mentions until it bites. Try x² + 2 and solving ends like this:
x = y² + 2 → y = ±√(x − 2)
That ± is not an inconvenience to be tidied away. It is the answer. It says two different inputs share an output — 3 and −3 both give 11 here — and an inverse would have to send 11 back to both at once. No function can. So x² + 2 has no inverse function at all.
The same fact in a picture is the horizontal line test: slide a horizontal line down the curve, and if it ever crosses twice, there is no inverse. The algebra and the picture are saying one thing in two languages, and the ± is simply the algebra's way of saying the line crossed twice.
It is worth being clear about what has and has not gone wrong here. Nothing about the method failed; it did its job and reported what it found. x² + 2 is a perfectly good function, and it simply does not have an inverse — the same way 7 is a perfectly good number that is not a square. An answer of "there is none" is a real answer, and marking schemes expect it.
Restricting the Domain, and the Two Branches
This is why textbooks write "for x ≥ 0" beside x², and why it looks like fussiness until you see what it is for.
x² + 2 folds at x = 0. Keep only one side and that half is one-to-one, so it has an inverse:
keep x ≥ 0 → f⁻¹(x) = √(x − 2)
keep x ≤ 0 → f⁻¹(x) = −√(x − 2)
Which half you keep decides which branch is the answer. The question has to tell you, and if it does not, both are correct. This page gives you both, with the fold point, rather than one of them and a silence.
Worth adding: an even power does not always fold. (√x)² is just x, because a square root is never negative, so squaring it never sends two inputs to one output.
Domain and Range Swap Over
Since the inverse sends outputs back to inputs, everything f can produce is exactly what f⁻¹ can accept:
domain of f⁻¹ = range of f
That is worth knowing for its own sake, and it also explains something that looks odd. The inverse of √(x − 4) is x² + 4, and x² + 4 will happily accept −3 — but the original never produced a negative number, so that input was never part of the question.
Using the Inverse Function Calculator
Type the function of x on one line, the way you would write it: ^ for powers, / for division, brackets wherever you would put them. An f(x) = or y = at the front is fine and gets ignored.
Fractions and decimals both work and nothing is rounded. Every answer is put back through f⁻¹(f(x)) = x on real numbers before you see it — which is also why the page will sometimes refuse rather than print something it cannot stand behind.
Inverse Function FAQ
How do you find the inverse of a function?
Why does x squared have no inverse?
What does restricting the domain mean?
How do you check an inverse is right?
Undo the last step first — and if a ± turns up at the end, that is the finding, not a nuisance.