01

What an inverse function is

An inverse function undoes another function. If f sends 2 to 7, then f⁻¹ sends 7 back to 2. Formally, f⁻¹(f(x)) = x for every x in the domain, and f(f⁻¹(y)) = y for every y in the range.

Finding it always follows the same three steps: write y = f(x), swap x and y, then solve for y. What changes between function families is only how hard that last step is.

The swap methody = f(x)  →  x = f(y)  →  solve for y

Not every function has an inverse. It must be one-to-one — no two inputs may produce the same output. That is why the quadratic option here returns two branches: a parabola fails the test, and the tool is honest about it rather than silently picking one.

02

The six families and their inverses

Inverse rules for the supported families
f(x)f⁻¹(y)Condition
ax + b(y − b)/aa ≠ 0
ax² + bx + c−b/2a ± √((y − c)/a)two branches
ax³ + b∛((y − b)/a)a ≠ 0
a·e^(bx)ln(y/a)/ba > 0
a·ln(x) + be^((y − b)/a)a > 0, x > 0
a/(x + b) + ca/(y − c) − by ≠ c

The conditions are not decoration. Each one marks a place where the inverse stops existing: a horizontal line has no inverse, an exponential never reaches zero, a rational function never reaches its horizontal asymptote.

03

Worked examples

A linear function

f(x) = 2x + 3. Swap: x = 2y + 3, so y = (x − 3)/2. At y = 7 the inverse gives (7 − 3)/2 = 2, which is exactly the input that produced 7. The check line in the result panel confirms it.

A quadratic, honestly two-valued

f(x) = x². Solving x = y² gives y = ±√x. At y = 9 the answers are 3 and −3 — both square to 9. If you need a genuine function you must restrict the domain to x ≥ 0, which is what the graph calculator does.

An exponential

f(x) = eˣ. Swap: x = eʸ, so y = ln(x). At y = 5 the inverse returns ln(5) ≈ 1.6094. The pair eˣ and ln(x) are the cleanest example of mutual inverses in mathematics.

04

How to check your answer

Compose the two functions. If f⁻¹ is correct, then f(f⁻¹(y)) must return y exactly. This calculator performs that composition and displays it in the result panel as a check line.

  • Graphically — the curve of f⁻¹ is the curve of f reflected across the line y = x.
  • Numerically — pick three points, invert each, and confirm the original function maps them back.
  • Symbolically — substitute f⁻¹(y) into f and simplify; you should get y with no leftover terms.

The check catches most mistakes. If the check line disagrees with your target by more than rounding error, the algebra went wrong somewhere — usually a sign error when solving for y.

05

Where inverse functions matter

  • Unit conversion — every conversion factor is an invertible linear function, and the reverse conversion is its inverse.
  • Cryptography — encryption must be invertible, and decryption is the inverse function.
  • Machine learning — activation functions are paired with their inverses during normalisation and gradient inspection.
  • Engineering calibration — a sensor's response curve is inverted to recover the measured quantity.
06

Deriving an inverse in four steps

The algebraic procedure is the same for every family, and the tool follows it explicitly so the steps are visible rather than hidden behind a result.

  1. Write the function as y = f(x).
  2. Exchange the two variables, giving x = f(y).
  3. Solve the resulting equation for y.
  4. State the domain of the result — it is the range of the original function.

Step 3 is where the family matters. A linear function needs one division; a quadratic needs a square root and a choice of sign; an exponential needs a logarithm; a trigonometric function needs a restricted domain before the inverse exists at all.

The same four steps, three families
FamilyAfter swappingSolve for yResult
f(x) = 3x − 7x = 3y − 7y = (x + 7)/3(x + 7)/3
f(x) = x², x ≥ 0x = y²y = √x√x
f(x) = 2ˣx = 2ʸy = log₂xlog₂x
07

The horizontal line test, in practice

Before inverting anything, check whether the function is one-to-one. Draw horizontal lines across its graph: if any line crosses the curve twice, two different inputs share an output and the inverse is not a function.

This test is the reason domain restrictions exist. The parabola fails it everywhere except at its vertex; restricting to one side of the vertex makes it pass. The sine fails it everywhere; restricting to a single period makes it pass.

What the test tells you
Graph shapePasses?What to do
Straight line, not verticalYesInvert directly
ParabolaNoRestrict to one branch
CubicYesInvert directly
Sine or cosine waveNoRestrict to one period
ExponentialYesInvert with a logarithm
Absolute valueNoChoose a sign, then invert

A function that passes the test everywhere on its domain is called injective. Add the condition that it covers its whole target range and it is bijective, which is the precise condition for an inverse function to exist.

08

Composition is the proof

An inverse is correct exactly when composing the two functions returns the original input. This is not a convention; it is the definition, and it gives you a one-line verification for any answer you derive.

The testf⁻¹(f(x)) = x
f(f⁻¹(x)) = x

For f(x) = (2x + 3)/5 the inverse is (5x − 3)/2. Substituting gives (5·((2x+3)/5) − 3)/2 = ((2x + 3) − 3)/2 = x. The algebra collapses cleanly when the inverse is right, and fails to collapse when it is wrong — which is more informative than rechecking the derivation.

Both directions must hold. A function that satisfies only one is not an inverse; it is a one-sided inverse, which happens when the domain was restricted too aggressively or when a branch was chosen inconsistently.

09

Inverting a composition

When a function is built from several steps, the inverse undoes them in reverse order. Put on socks then shoes; to undo it, remove the shoes first.

The reversal rule(f ∘ g)⁻¹ = g⁻¹ ∘ f⁻¹

For h(x) = √(2x + 1), the composition is "double, add one, take the root". The inverse is "square, subtract one, halve": h⁻¹(x) = (x² − 1)/2. Check at x = 4: h(4) = √9 = 3, and h⁻¹(3) = (9 − 1)/2 = 4. Correct.

The order in the formula looks backwards because function composition is written right to left. The last operation applied is the first one undone, which is why the inverses appear in reverse.

?

Frequently asked questions

How do I find the inverse of f(x) = 2x + 3?

Write y = 2x + 3, swap to x = 2y + 3, then solve: y = (x − 3)/2. Check with x = 7: (7 − 3)/2 = 2, and f(2) = 7.

Why does a parabola have two inverses?

Because it is not one-to-one — both 3 and −3 square to 9. The inverse relation therefore has two branches, and you must restrict the domain of the original function to get a single-valued inverse.

Does every function have an inverse?

No. Only one-to-one functions do. A function that produces the same output from two different inputs cannot be undone unambiguously.

What is the relationship between a function and its inverse on a graph?

They are mirror images across the line y = x. Every point (a, b) on the original curve appears as (b, a) on the inverse.

How do I find the inverse of a logarithmic function?

Exponentiate. From y = a·ln(x) + b, rearrange to ln(x) = (y − b)/a, then x = e^((y − b)/a). Logarithms and exponentials are mutual inverses.

Is f⁻¹ the same as 1/f?

No. f⁻¹ is the inverse function, which undoes f. 1/f is the reciprocal, which divides 1 by the output. For f(x) = 2x, f⁻¹(x) = x/2 while 1/f(x) = 1/(2x).