Pick a base function in the Function menu at the top: One-to-one functions invert as they are, the ones that Need a branch are cut to their usual branch. Learn more about picking a base function
The graph shows g in blue, its inverse in amber and the mirror line y=x dashed gray; a faded curve is the part left out of the branch. Learn more about reading the plot
The tabs Input of g: b, h and Output of g: a, k hold the sliders; what moves the input of g moves the output of g−1, and the other way round. Learn more about transforming
The switches hide the faded part or the mirror line; ▶ runs a slider by itself and Reset puts back the sliders of the tab. Learn more about the switches
The explanation gives f and f−1, the inverse of g with the current values, and why a branch is needed; the Concepts tab explains inverses in general. Learn more about the explanation
Inverse of a function
g(x)=a⋅f(b(x−h))+k
g−1(x)
b=1h=0a=1k=0
Inverse · Exponential
g−1(x)=h+b1f−1(ax−k)
General
Input and output swap places. Shifting g right by h shifts g−1up by h; squeezing g sideways by b squeezes g−1vertically by the same factor.
For the current setup
Base · f(x)=ex, so f−1(x)=lnx
Domains · f on all real numbers, f−1 on x>0
The inverse · g−1(x)=h+b1f−1(ax−k), here with a=1, k=0, b=1, h=0.
The tool has three parts. Across the top runs a bar with the Function menu and the buttons for zooming, the starting view, saving a picture and full screen. On the left is the graph. On the right is the explanation, with the controls under it.
The graph shows the transformed function g(x)=a⋅f(b(x−h))+k in blue and its inverse g−1 in amber, with the mirror line y=x dashed gray between them: the two curves are mirror images in that line.
The tool opens with the exponential ex and its inverse lnx. The explanation gives the base pair f and f−1, their domains, and the inverse of the transformed function.
Picking a Base Function
DemoPicking a base function
Step 0 of 3
The Function menu has two groups:
• One-to-one — identity, linear 2x, cubic, reciprocal, exponential, logarithmic and square root. Each passes the horizontal line test, so its inverse is a function on the whole domain. • Needs a branch — quadratic, absolute value, sine and cosine. They fail the test, so the tool keeps the usual branch where they only rise or only fall (x≥0, [−π/2,π/2], [0,π]) and fades the rest of the curve. The inverse — x, x, arcsinx, arccosx — belongs to that branch.
The identity and the reciprocal are their own inverses: at the start the two curves coincide. A new function keeps the slider values.
Transforming the Function
DemoInput and output trade places
Step 0 of 2
The sliders transform the base function into g(x)=a⋅f(b(x−h))+k, in two tabs whose names say what they change on g:
• Input of g: b, h — a horizontal shift h of g becomes a vertical shift of g−1, and squeezing g sideways by b squeezes g−1 vertically. • Output of g: a, k — a vertical shift k of g becomes a horizontal shift of g−1, and stretching g vertically by a stretches g−1 sideways.
Input and output trade places, which is exactly what the formula g−1(x)=h+b1f−1(ax−k) says. For a function that needs a branch, the branch moves with the sliders too. With a=0 or b=0, g is constant and has no inverse; the explanation says so.
Reading the Plot
Up to four things appear on the graph:
• Dashed gray liney=x — the mirror. Every point (p,q) on g has its partner (q,p) on g−1. • Blue curve — g, or for a function that needs a branch, the branch that is inverted. • Faded curve — the part of g left out of the branch. • Amber curve — g−1.
Where the blue curve crosses the mirror line, g(x)=x, and the inverse passes through the same point.
The Switches and the Labels
DemoThe branch of sine
Step 0 of 2
Two switches under the sliders change what is drawn: Part left out of the branch hides or shows the faded piece, and Mirror line y = x hides or shows the dashed diagonal.
Along the bottom of the graph, small labels show b, h, a and k; a label turns blue once its value has moved from the start. ▶ beside a slider runs it by itself, Speed sets how fast, and Reset puts back the sliders of the current tab.
The Explanation and the Concepts Tab
DemoExplanation and Concepts
Step 0 of 2
The text on the right follows the function and the sliders:
• Base — f and f−1, and their domains. • The inverse — the formula g−1(x)=h+b1f−1(ax−k) with the current values. • The branch — for a function that needs one, why it is needed and which part is kept. • Its own inverse — for x and 1/x at the start.
The Concepts tab beside it holds a page that does not change with the controls: the inverse as a mirror image, the horizontal line test, restricted branches, and the check g(g−1(x))=x.
What is an Inverse Function?
The inverse of a function f is the function f−1 that undoes f: if f(a)=b then f−1(b)=a. Every input-output pair (a,b) on the graph of f becomes the pair (b,a) on f−1 — the coordinates swap.
Geometrically, swapping coordinates is the reflection across the line y=x. The visualizer always draws this mirror line as a dashed gray reference, and you can verify that g and g−1 are mirror images of each other across it: pick any point on the blue curve, reflect it across y=x, and you will land on the amber curve.
The defining identity is the composition
g∘g−1(x)=xandg−1∘g(x)=x
on whichever domains both sides are defined.
The Horizontal Line Test and Restricted Branches
Not every function has a single-valued inverse. A function f is invertible only when no horizontal line crosses its graph more than once — the horizontal line test. If a horizontal line hits f twice, two different inputs produce the same output, and the inverse would have to map one input to two outputs, which is not allowed for a function.
Functions that fail the test can still be inverted on a restricted subdomain where they are strictly monotonic:
• Quadraticx2 restricted to [0,∞)→ inverse is x • Absolute value∣x∣ restricted to [0,∞)→ inverse is the identity on [0,∞) • Sine restricted to [−π/2,π/2]→ inverse is arcsin(x), defined on [−1,1] • Cosine restricted to [0,π]→ inverse is arccos(x), defined on [−1,1]
These are called principal branches. The visualizer shows the discarded portion as a faded curve and the kept portion as a bold curve, making the cut explicit and visible. When you transform a restricted function, the restriction boundary moves along with it.
How Transformations of f Become Transformations of f−1
Solving y=a⋅f(b(x−h))+k for x gives the inverse explicitly:
g−1(x)=h+b1⋅f−1(ax−k)
Reading the formula, each transformation on f has a mirrored counterpart on f−1 — when you swap axes (which is what reflecting across y=x does), vertical operations become horizontal and vice versa:
• Vertical scale a on f becomes horizontal scale 1/a on f−1 • Vertical shift k on f becomes horizontal shift k on f−1 • Horizontal scale b on f becomes vertical scale 1/b on f−1 • Horizontal shift h on f becomes vertical shift h on f−1
This is the same as the geometric fact that reflecting across y=x swaps horizontal and vertical directions. In the tool, the tabs Input of g and Output of g make this correspondence visible: drag a slider of one and watch the inverse move in the other direction.
Functions That Are Their Own Inverse
Two functions in the menu answer the inversion question with "already done": the identity and the reciprocal are self-inverse — applying them twice returns the input, so f−1=f.
Geometrically, self-inverse means the graph is its own mirror image across y=x. The identity lies on the mirror; the reciprocal straddles it symmetrically. In the plots for both, the amber inverse curve lands exactly on the blue one — the visualizer dashes the amber so the coincidence stays visible.
The Identity and Its Inverse
The identity f(x)=x is the fixed point of inversion itself: its graph is the mirror line, so reflecting changes nothing at all.
f(x) = x, frozen
Curve, inverse, and mirror in one line: the identity is the fixed point of reflection itself.
Blue curve, amber inverse, and gray mirror all coincide in one line — the degenerate case that makes the reflection rule legible everywhere else. Undoing "do nothing" is doing nothing.
Every self-inverse function has a graph symmetric across this line; the identity is simply the extreme case where the graph and the line are the same object.
The Scaled Linear Function and Its Inverse
Doubling is undone by halving: f(x)=2x has the inverse f−1(x)=x/2, the cleanest nontrivial inverse pair in the menu.
2x and x/2, frozen
Two lines with reciprocal slopes, reflecting into each other across the dashed mirror.
The two lines reflect across the mirror with slopes 2 and 21 — reciprocal slopes, which is the general rule for linear inverses: reflection across y=x swaps rise with run.
Every nonzero linear function is invertible with no restriction: one-to-one is automatic when a graph climbs (or falls) steadily. The lesson generalizes as monotonicity — the property the horizontal line test checks for.
The Cubic and the Cube Root
Cubing is fully undone by the cube root: both functions are defined on all of R, so this pair needs no restriction anywhere.
x³ and ∛x, frozen
A full inverse pair with no restriction anywhere: the cubic never turns around, so the cube root accepts every real input.
The cubic passes the horizontal line test despite its flat spot at the origin — it never actually turns around, so every output is hit exactly once. That is why 3x, unlike x, accepts negative inputs without complaint.
Compare the quadratic, one degree lower: the even power folds, fails the test, and pays with a restricted branch. Odd degree grants full invertibility; even degree costs half the domain.
The Reciprocal and Its Inverse
The reciprocal undoes itself: if y=1/x, then x=1/y — the same formula read backwards, making 1/x the menu's second self-inverse function.
1/x, self-inverse, frozen
The dashed amber curve retraces the blue hyperbola exactly: flipping a fraction twice restores it.
Both hyperbola branches are symmetric across the mirror line, each mapping onto itself under reflection. The dashed amber curve traces the blue one exactly.
Self-inversion here has an arithmetic reading: flipping a fraction twice restores it. The excluded point at x=0 survives inversion — the inverse (being the same function) excludes it too, in both domain and range.
The Exponential and the Logarithm
The exponential's inverse is the natural logarithm: ex and ln(x) reflect into each other across y=x with no restriction needed — the exponential is strictly increasing everywhere.
eˣ and ln(x), frozen
The reflection swaps the asymptotes: horizontal floor becomes vertical wall, domain and range trade axes.
The reflection swaps their asymptotes along with everything else: the exponential's horizontal floor at y=0 becomes the logarithm's vertical wall at x=0; domain R and range (0,∞) trade places exactly.
This is the pair to study for the domain-range swap rule: whatever holds for f on one axis holds for f−1 on the other. The logarithmic entry shows the same picture from the other side.
The Logarithm and the Exponential
Choosing the logarithm as the base function shows the same inverse pair from the other direction: now ln(x) is blue and ex is amber.
ln(x) and eˣ, frozen
The same pair viewed from the other end — now the blue curve owns the wall and the amber one the floor.
Nothing mathematical changes — inversion is symmetric, (f−1)−1=f — but the visual swap is worth one deliberate look: the blue curve now owns the vertical asymptote and the restricted domain, the amber one the horizontal floor.
That interchangeability is the point: an inverse pair is one relationship viewed from two ends, not two separate facts. The exponential entry is this section's mirror twin, in every sense.
The Quadratic and the Square Root
The parabola fails the horizontal line test — every positive output comes from two inputs — so inverting it requires surgery: keep only the branch x≥0, shown bold over the faded full curve.
x² restricted, and √x, frozen
The faded left arm is the price of invertibility: only the bold right branch reflects into the square root.
The kept right half is one-to-one, and its reflection is exactly x — the amber curve. The discarded left half is why x returns only the non-negative root: the branch choice made here is the definition of the square root function.
Choosing the other branch (x≤0) would have produced −x instead. Branch choice is a genuine convention, standardized so that everyone's square root agrees.
This is the template for every restricted family: fold detected by the horizontal line test, branch kept, reflection taken.
The Square Root and Its Inverse
Starting from x and inverting lands back on the parabola — but only its right half: f−1(x)=x2 restricted to x≥0.
√x and its inverse, frozen
Inverting the root lands on the parabola’s right half only — the restriction is inherited from the root’s range.
The restriction is inherited, not imposed: the square root's range is [0,∞), so its inverse's domain can be no larger. Inverting never recovers what a restriction already discarded — the left half of the parabola is gone for good.
Together with the quadratic entry, this pair shows both directions of the same relationship, and why (x)2=x holds on x≥0 while x2=∣x∣ does not reduce to x — the asymmetry the composition tool demonstrates as its star example.
The Absolute Value and Its Inverse
The V fails the horizontal line test as badly as a function can — every positive output has exactly two preimages — so only the branch x≥0 survives, where ∣x∣ is simply x.
|x| restricted, frozen
The kept branch of the V is just y = x, so branch, inverse, and mirror coincide; the faded arm is the discarded half.
The kept branch coincides with the identity on the half-line, so its inverse does too: blue branch, amber inverse, and mirror line all overlap for x≥0. The faded left arm is the discarded half.
The absolute value makes the restriction lesson stark: what remains after cutting to a branch can be almost trivial. The interesting content was in the fold itself — and the fold is exactly what one-to-one functions are forbidden to have.
Sine and the Arcsine
A periodic wave hits every output infinitely often — the worst possible horizontal line test failure — so sine is restricted to one increasing sweep, [−π/2,π/2], before inverting.
sin(x) on [−π/2, π/2], and arcsin, frozen
One bold rising arch of the faded wave reflects into arcsine: domain [−1, 1], principal values on the y-axis.
That single bold arch, rising from −1 to 1, reflects into arcsin(x): a curve living on the domain [−1,1] (sine's range, swapped into position) and producing angles in [−π/2,π/2] — the principal values.
Every other period of the faded wave could have been chosen; the standardized branch is the one crossing the origin. Calculators answer arcsin(0.5)=30° rather than 150° because of exactly this convention.
Cosine's branch solves the same problem with a different cut — comparing the two shows how branch choice adapts to each function's shape.
Cosine and the Arccosine
Cosine's restriction cannot copy sine's: on [−π/2,π/2] cosine rises and falls, failing the test inside the window. The invertible sweep is [0,π] instead — one full descent from 1 to −1.
cos(x) on [0, π], and arccos, frozen
Cosine’s cut is one falling sweep, so arccosine falls too — from π down to 0 across its [−1, 1] domain.
Reflecting that falling branch produces arccos(x): defined on [−1,1], returning angles in [0,π], and decreasing — the visible signature that distinguishes it from arcsine at a glance.
The two arc functions are tied by arccos(x)=π/2−arcsin(x): complementary branches of complementary functions.
Together with sine, this closes the menu's tour of restriction strategies: same disease (periodicity), same cure (one monotone sweep), different incision points.
Related Concepts and Tools
Functions Families Gallery — companion gallery showing the same base functions used here, useful as a prerequisite for understanding what each family looks like before studying its inverse.
Function Transformations — visualizer for the four affine transformations alone, without the inverse overlay. Helpful for building intuition before adding the inverse layer here.
Composition of Functions — the operation behind the inverse identity g∘g−1=id. Inverses are defined precisely as compositional partners.
One-to-One Functions — the formal property a function must have to be invertible. Equivalent to passing the horizontal line test.
Inverse Trigonometric Functions — focused treatment of arcsin, arccos, arctan, and the standard principal-branch conventions used here.
Logarithm and Exponential — paired study of the canonical example of inverse functions, with ln and ex as exact inverses.