Why the intervals swap
A function is a set of ordered pairs (x, y). Its inverse is the same set with every pair reversed to (y, x). Reversing the pairs reverses the roles of the two sets, so whatever was the set of inputs becomes the set of outputs.
Ran(f⁻¹) = Dom(f)
This is why the inverse of a function defined only on [2, 6] with outputs in [4, 10] is defined only on [4, 10]. Feed it 3 and there is no answer, because the original function never produced 3.
Reading the result
For f: [2, 6] → [4, 10], the inverse is f⁻¹: [4, 10] → [2, 6]. Every output the original could produce is now a legal input, and every input it accepted is now a reachable output.
| Quantity | f | f⁻¹ |
|---|---|---|
| Domain | [2, 6] | [4, 10] |
| Range | [4, 10] | [2, 6] |
| Width | 4 | 6 |
| Midpoint | 4 | 7 |
The widths swap too: the inverse's domain is as wide as the original's range. If you enter intervals whose widths look wrong for the function you have in mind, that is the quickest signal that a bound was typed incorrectly.
When the swap does not work
Swapping only produces a genuine inverse function when the original is one-to-one on the interval you specified. A function that turns around inside its domain will map two inputs to the same output, and the reversed relation will then assign two outputs to one input — not a function at all.
- Parabolas need the domain restricted to one side of the vertex before an inverse exists.
- Sine and cosine need the familiar principal intervals for the same reason.
- Functions with a horizontal asymptote never reach it, so that value is excluded from the inverse's domain.
Check monotonicity first. If f increases then decreases over the interval you entered, the inverse relation is not single-valued. Restrict the domain before trusting the swap.
Where this matters
- Solving equations — the valid solutions of f(x) = c are exactly those c values inside the range.
- Inverse trigonometry — arcsin's domain [−1, 1] and range [−90°, 90°] are the swapped domain and range of sine restricted to its principal interval.
- Numerical inversion — a root-finder can only succeed for targets inside the range of the function it is inverting.
- Unit conversions — a conversion valid from 0 to 100 °C maps to a specific, computable range in °F.
Domain and range written as intervals
The swap is easiest to check when both sets are written as intervals. The domain of f becomes the range of f⁻¹, and the range of f becomes the domain of f⁻¹. Nothing else changes.
| Function | Domain of f | Range of f | Domain of f⁻¹ | Range of f⁻¹ |
|---|---|---|---|---|
| √x | [0, ∞) | [0, ∞) | [0, ∞) | [0, ∞) |
| x² on x ≥ 0 | [0, ∞) | [0, ∞) | [0, ∞) | [0, ∞) |
| eˣ | (−∞, ∞) | (0, ∞) | (0, ∞) | (−∞, ∞) |
| ln x | (0, ∞) | (−∞, ∞) | (−∞, ∞) | (0, ∞) |
| arctan x | (−∞, ∞) | (−π/2, π/2) | (−π/2, π/2) | (−∞, ∞) |
The arctangent row is the interesting one: its range is an open interval, because the function approaches ±π/2 but never reaches either value. An inverse that is asked for arctan of an infinite argument has no finite answer, and the domain of the inverse reflects that honestly.
Reading the table backwards is just as valid. If you know the domain and range of an inverse, you know the range and domain of the original — which is often the faster way to answer the question.
Frequently asked questions
What is the domain of an inverse function?
Exactly the range of the original function. If f produces outputs from 4 to 10, then f⁻¹ accepts inputs from 4 to 10 and nothing else.
What is the range of an inverse function?
Exactly the domain of the original function. The two intervals swap roles completely.
Does this work for infinite intervals?
The rule is the same, but this calculator uses finite numeric bounds. For an unbounded interval enter a very large number and read the result as an approximation of the open bound.
Why do the interval widths swap?
Because the inverse's domain is the original's range. The width of one becomes the width of the other — a useful arithmetic check on your answer.
What if the function is not one-to-one?
Then no inverse function exists on that interval, and the swap gives a relation rather than a function. Restrict the domain until the function is monotonic.