Inverse Functions Explorer

Pick a function, move a point on f, and watch its mirrored inverse point. Restrict domain for non-injective cases.

Loading interactive simulation...

Why the square root only gives you half the answers 🖖

Squaring sends 3 and −3 to the same place, so running it backwards has no single answer — and a function is allowed only one output per input. Mathematics resolves this by amputation: the square root is defined as the inverse of squaring restricted to x ≥ 0. That restriction is why √9 is 3 and not ±3, and it is why solving x² = 9 obliges you to put the ± back by hand. The horizontal line test is just a way of spotting in advance which functions will need this surgery.

The undo button, and how to test it 🖖

An inverse function is an undo button: feed f's output back through f⁻¹ and you land on your starting x. To find one, swap x and y in the equation and solve — that swap is exactly why the two graphs mirror across the line y=x. The surest check is composition: if f(f⁻¹(x)) = x and f⁻¹(f(x)) = x, you truly have a matched pair. Converting Celsius to Fahrenheit and back is the same idea in daily life.

Functions that are their own inverse 🖖

Most curves look nothing like their mirror image across y=x, but a rare few land exactly on top of themselves. These are involutions, functions satisfying f(f(x)) = x — they are their own inverse. The reciprocal f(x) = 1/x is the classic case: its hyperbola is already symmetric about y=x, so reflecting it changes nothing. The same self-undoing trick powers ROT13, where scrambling text twice restores the original.

INVERSE FUNCTIONS — DOES ONE EXIST, AND ON WHAT DOMAIN?

Which Inverse Case Are You In?

A function has an inverse exactly when no two inputs share an output — the horizontal line test. If it passes, the inverse is the reflection in y = x and nothing more needs deciding. If it fails, you are not stuck: cut the domain down to a piece where it does pass, and an inverse exists there. Which case you are in is settled before any algebra.

Strictly monotonic — the inverse exists everywhere f′ ≠ 0 ⇒ ∃f⁻¹
The horizontal line test fails — no inverse on the whole real line f(a) = f(−a) ⇒ ∄f⁻¹
Restrict the domain and the inverse comes back x ≥ 0 ⇒ f⁻¹ = √x
A classic pair — domain and range swap places f: A→B ⇒ f⁻¹: B→A

01

Strictly monotonic — the inverse exists everywhere

What you know: The function never repeats an output, so every horizontal line meets the graph once. The inverse is defined on the whole range.

Test: f′ ≠ 0 ⇒ ∃f⁻¹

Worked example: f(x) = 2x + 1 sends 2 to 5, and f⁻¹(x) = (x − 1)/2 sends 5 back to 2

Open this case: linear pair
Strictly monotonic — the inverse exists everywhere. Every horizontal line crosses once, so the reflection in y = x is itself a function. The function never repeats an output, so every horizontal line meets the graph once. The inverse is defined on the whole range.
Every horizontal line crosses once, so the reflection in y = x is itself a function.

02

The horizontal line test fails — no inverse on the whole real line

What you know: Two different inputs give the same output, so a would-be inverse would have to return two values at once. Reflecting the graph gives a curve, but not a function.

Test: f(a) = f(−a) ⇒ ∄f⁻¹

Worked example: f(x) = x² sends both 2.5 and −2.5 to 6.25, so f⁻¹(6.25) has no single answer

Open this case: quadratic (not invertible)
The horizontal line test fails — no inverse on the whole real line. The horizontal line meets the parabola twice, so the reflection cannot be a function. Two different inputs give the same output, so a would-be inverse would have to return two values at once. Reflecting the graph gives a curve, but not a function.
The horizontal line meets the parabola twice, so the reflection cannot be a function.

03

Restrict the domain and the inverse comes back

What you know: Cut the domain to a stretch where the function is monotonic. On x ≥ 0 the parabola passes the test, and √x is its inverse there.

Test: x ≥ 0 ⇒ f⁻¹ = √x

Worked example: On x ≥ 0, f(x) = x² sends 2.5 to 6.25 and f⁻¹(x) = √x sends 6.25 back to 2.5

Open this case: quadratic restricted
Restrict the domain and the inverse comes back. Half the parabola is monotonic, and on that half the reflection is a function again. Cut the domain to a stretch where the function is monotonic. On x ≥ 0 the parabola passes the test, and √x is its inverse there.
Half the parabola is monotonic, and on that half the reflection is a function again.

04

A classic pair — domain and range swap places

What you know: eˣ and ln x are inverses of each other. What one takes in, the other gives out: the domain of each is the range of the other.

Test: f: A→B ⇒ f⁻¹: B→A

Worked example: e¹ = 2.718 and ln(2.718) = 1. eˣ takes all reals to the positives; ln takes the positives back to all reals.

Open this case: exp and ln
A classic pair — domain and range swap places. Each curve is the other reflected in y = x; the positive half-axis becomes the whole line. eˣ and ln x are inverses of each other. What one takes in, the other gives out: the domain of each is the range of the other.
Each curve is the other reflected in y = x; the positive half-axis becomes the whole line.

Problem solved in full

  1. The point (2, 4) on f(x) = x² reflecting to (4, 2) 5 steps

    The point (2, 4) on f(x) = x² becomes (4, 2) on its inverse. Prove that the reflection is in the line y = x — and find why f needs its domain restricted at all.

    1. An inverse undoes the function, so if f sends a to b, the inverse sends b to a. Swapping the coordinates is the whole operation, and it is why the tool's two points read the same digits in the other order.

    2. That swap is a reflection, and the mirror line can be identified from the geometry rather than asserted. Take the midpoint of the two points.

    3. The midpoint is (3, 3), which lies on y = x. That is true for any pair (a, b) and (b, a), since their midpoint always has equal coordinates.

    4. Now the direction. The segment joining them has slope −1, perpendicular to the line y = x, whose slope is 1. A line that bisects a segment at right angles is its perpendicular bisector, so y = x is the mirror.

    5. The restriction is forced by the same swap. Without it f sends both 2 and −2 to 4, so the reverse map would have to send 4 to two places at once — not a function.

    Answer

    The tool prints P = (2,4) and Q = (4,2), and reports the function invertible on the current domain. The proof is the pair of facts in steps 3 and 4: bisected by y = x and perpendicular to it, which is exactly what reflection means. The restriction is worth noticing because it is a genuine loss, not a formality — x² is a perfectly good function that simply has no inverse, and the square root is the inverse of a different, smaller function that we agreed to call x² as well. Turn the restriction off and watch the mirrored curve stop being a function.

References (2)

Example problems