Inverse Functions

Learning goals

  • Verify a candidate inverse by checking that both compositions equal the identity
  • Explain why a function has at most one inverse
  • Decide whether a function is invertible by testing whether it is one-to-one
  • Find an inverse algebraically and state its domain and range
  • Justify why restricting a domain to create an inverse is a choice, not a fixed repair
  • Connect the horizontal line test to swapping each pair (a,b)(a, b) into (b,a)(b, a)

An inverse must undo f from both sides

Give the idea its definition. A function gg is an inverse of ff when composing the two in either order returns the identity:

g∘f=id⁡  on dom⁡fandf∘g=id⁡  on dom⁡g.g \circ f = \operatorname{id} \ \text{ on } \operatorname{dom} f \qquad\text{and}\qquad f \circ g = \operatorname{id} \ \text{ on } \operatorname{dom} g.

Read both halves. The first, g(f(x))=xg(f(x)) = x for every xx in the domain of ff, says gg undoes ff: feed xx through ff and gg brings it back. The second, f(g(x))=xf(g(x)) = x for every xx in the domain of gg, says ff undoes gg the same way. Reversing has to work in both directions, and we insist on both because one alone can hold while the other fails. The example that shows this is the heart of the lesson.

Worked example 1 One side is not enough

Let f(x)=x2f(x) = x^2 with domain all real numbers, and let g(x)=xg(x) = \sqrt{x} with domain x≥0x \ge 0. Test both compositions.

Start with f∘gf \circ g. For any x≥0x \ge 0,

(f∘g)(x)=f(x)=(x)2=x,(f \circ g)(x) = f(\sqrt{x}) = (\sqrt{x})^2 = x,

so f∘gf \circ g is the identity on the domain of gg. Stop here and you would call gg the inverse of ff. Now test the other order:

(g∘f)(x)=g(x2)=x2=∣x∣.(g \circ f)(x) = g(x^2) = \sqrt{x^2} = |x|.

This equals xx when x≥0x \ge 0, but for x<0x < 0 it gives −x-x, not xx. For instance (g∘f)(−3)=9=3≠−3(g \circ f)(-3) = \sqrt{9} = 3 \ne -3. So g∘fg \circ f is not the identity on the domain of ff; it collapses every negative input to its positive twin. The function gg undoes ff from one side only. Squaring throws away the sign, and no square root can restore a sign that is already gone. A one-sided inverse is not an inverse, which is exactly why the definition demands both compositions.

Check your understanding

For f(x)=x2f(x) = x^2 on all real numbers and g(x)=xg(x) = \sqrt{x} on x≥0x \ge 0, a student checks that (f∘g)(x)=x(f \circ g)(x) = x, concludes g=f−1g = f^{-1}, and adds: "inverses are unique, so no other function could also undo ff this way." What is wrong with the student's reasoning?

Answer choices

When both sides do hold, the verification is a short two-part check, and skipping either part is the most common way to get an inverse wrong.

Worked example 2 A two-sided verification

Show that g(x)=x−12g(x) = \dfrac{x - 1}{2} is the inverse of f(x)=2x+1f(x) = 2x + 1, both on all real numbers.

Check g∘fg \circ f first, substituting f(x)f(x) into gg:

(g∘f)(x)=g(2x+1)=(2x+1)−12=2x2=x.(g \circ f)(x) = g(2x + 1) = \frac{(2x + 1) - 1}{2} = \frac{2x}{2} = x.

Now check f∘gf \circ g, substituting g(x)g(x) into ff:

(f∘g)(x)=f ⁣(x−12)=2⋅x−12+1=(x−1)+1=x.(f \circ g)(x) = f\!\left(\frac{x - 1}{2}\right) = 2 \cdot \frac{x - 1}{2} + 1 = (x - 1) + 1 = x.

Both compositions return xx for every real number, and both functions have all of R\mathbb{R} as their domain, so g=f−1g = f^{-1}. Each line undid the other: the first canceled “times two then plus one” by “minus one then over two,” and the second ran that cancellation in the opposite order.

There is only one inverse

Because the definition is two-sided, a function cannot have two different inverses. Here is why: suppose gg and hh both undid ff from both directions. Take any output bb of ff. Since hh is an inverse, f(h(b))=bf(h(b)) = b; feed that into gg, and since gg undoes ff, g(f(h(b)))=h(b)g(f(h(b))) = h(b). But the left side is also g(b)g(b), because f(h(b))=bf(h(b)) = b. So g(b)=h(b)g(b) = h(b) for every bb: gg and hh agree everywhere, which makes them the same function. Because there is at most one inverse, we may speak of the inverse of ff and give it the name f−1f^{-1}.

Check your understanding

In the uniqueness argument, gg and hh both undo ff from both sides. For an output bb of ff, the single expression g(f(h(b)))g(f(h(b))) is read two ways: inside-out as g(f(h(b)))=g(b)g(f(h(b))) = g(b) (using f(h(b))=bf(h(b)) = b, since hh undoes ff), and regrouped as (g∘f)(h(b))=h(b)(g \circ f)(h(b)) = h(b) (using g∘f=id⁡g \circ f = \operatorname{id}, since gg undoes ff). What justifies reading the same expression both ways?

Answer choices

That name carries a warning you first met at the end of the previous lesson. The superscript in f−1f^{-1} marks the inverse for composition, and it never means the reciprocal 1f\dfrac{1}{f}. For f(x)=x+3f(x) = x + 3 the inverse is f−1(x)=x−3f^{-1}(x) = x - 3, while the reciprocal (f(x))−1=1x+3\bigl(f(x)\bigr)^{-1} = \dfrac{1}{x + 3} is a completely different function. Keep f−1f^{-1} for undoing and 1f\dfrac{1}{f} for dividing.

Which functions can be inverted

Not every function has an inverse; Worked Example 1 already met one that does not. The question is which do, and the answer is the cleanest statement in the chapter, provided we say one thing about the codomain out loud and then never forget it.

Throughout the rest of this lesson, take a function’s codomain to be its range, the set of values it actually outputs. A function is one-to-one when different inputs always give different outputs, equivalently when f(a)=f(b)f(a) = f(b) forces a=ba = b. With the codomain fixed as the range, invertibility and one-to-oneness are the same condition.

Here is why. Draw an arrow from each input to the output it produces. If ff is one-to-one, no two arrows point at the same output, so every output in the range has exactly one arrow pointing at it. Reverse every arrow and you get a new set of arrows, one leaving each output and landing back on the input it came from, and that is a function: it is f−1f^{-1}. If instead two arrows had pointed at the same output, reversing them would leave that output with two arrows going out to two different inputs, which is not a function at all, since a function may only give one answer per input. So the reversed arrows form a function exactly when the original arrows never collided, which is exactly one-to-one.

The codomain hypothesis is not decoration, and dropping it is the classic way this statement turns false. If the codomain is left larger than the range, some declared output is never actually produced, and no gg can satisfy f∘g=id⁡f \circ g = \operatorname{id} there. That is because f(g(b))f(g(b)) is always a genuine output of ff, and it can never equal a value that ff misses. With a larger codomain the correct condition is that ff be both one-to-one and onto, that is a bijection. Taking the codomain to be the range is exactly what makes “onto” automatic, and that leaves one-to-one as the only thing to check. Whenever this lesson says “invertible” it means “one-to-one, as a map onto its range.”

Worked example 3 Finding an inverse, then proving it

Find the inverse of f(x)=x3+1f(x) = x^3 + 1 on all real numbers, and verify it on both sides.

Write y=x3+1y = x^3 + 1 and solve for xx:

y−1=x3⟹x=y−13.y - 1 = x^3 \quad\Longrightarrow\quad x = \sqrt[3]{y - 1}.

Renaming the input, the candidate is f−1(x)=x−13f^{-1}(x) = \sqrt[3]{x - 1}. Solving only produces a candidate, so verify both orders before trusting it:

(f−1∘f)(x)=(x3+1)−13=x33=x,(f^{-1} \circ f)(x) = \sqrt[3]{(x^3 + 1) - 1} = \sqrt[3]{x^3} = x,(f∘f−1)(x)=(x−13)3+1=(x−1)+1=x.(f \circ f^{-1})(x) = \left(\sqrt[3]{x - 1}\right)^3 + 1 = (x - 1) + 1 = x.

Both give xx across all of R\mathbb{R}, so f−1(x)=x−13f^{-1}(x) = \sqrt[3]{x - 1} is confirmed. Notice that this check alone is enough: it proves ff has an inverse and pins down exactly what it is, all in one step, with no separate one-to-one argument needed first.

Worked example 4 Inverting a linear-fractional rule

Find the inverse of f(x)=xx−2f(x) = \dfrac{x}{x - 2} on x≠2x \ne 2, and state the domain of the inverse.

Write y=xx−2y = \dfrac{x}{x - 2} and solve for xx. Clear the denominator, then gather every term containing xx on one side:

y(x−2)=x⟹yx−2y=x⟹yx−x=2y.y(x - 2) = x \quad\Longrightarrow\quad yx - 2y = x \quad\Longrightarrow\quad yx - x = 2y.

Now factor xx out of the left side and divide:

x(y−1)=2y⟹x=2yy−1.x(y - 1) = 2y \quad\Longrightarrow\quad x = \frac{2y}{y - 1}.

So f−1(x)=2xx−1f^{-1}(x) = \dfrac{2x}{x - 1}. The move that carries any linear-fractional rule is exactly this one, collect the xx terms, factor, then divide. Check both orders before trusting the candidate:

(f∘f−1)(x)=f ⁣(2xx−1)=2xx−12xx−1−2=2xx−12x−1=2x2=x,(f \circ f^{-1})(x) = f\!\left(\frac{2x}{x - 1}\right) = \frac{\dfrac{2x}{x-1}}{\dfrac{2x}{x-1} - 2} = \frac{\dfrac{2x}{x-1}}{\dfrac{2}{x-1}} = \frac{2x}{2} = x,(f−1∘f)(x)=f−1 ⁣(xx−2)=2⋅xx−2xx−2−1=2xx−22x−2=2x2=x.(f^{-1} \circ f)(x) = f^{-1}\!\left(\frac{x}{x-2}\right) = \frac{2 \cdot \dfrac{x}{x-2}}{\dfrac{x}{x-2} - 1} = \frac{\dfrac{2x}{x-2}}{\dfrac{2}{x-2}} = \frac{2x}{2} = x.

Both collapse to xx. For the domain, the inputs of f−1f^{-1} are the values ff actually produces, and ff never outputs 11, since xx−2=1\frac{x}{x - 2} = 1 forces x=x−2x = x - 2, which is impossible. So dom⁡f−1\operatorname{dom} f^{-1} excludes 11, matching the denominator of the formula 2xx−1\frac{2x}{x - 1}.

Check your understanding

Consider f(x)=3xx+1f(x) = \dfrac{3x}{x + 1} on x≠−1x \ne -1. Which statement correctly decides whether ff has an inverse and, if so, finds it?

Answer choices

Swapping pairs is what inverting really does

Take the three pairs (1,4),(2,7),(3,10)(1, 4), (2, 7), (3, 10), the input-output pairs of some function ff. Swap every pair’s coordinates and you get (4,1),(7,2),(10,3)(4, 1), (7, 2), (10, 3): the same information, read backward, output first. Every input of ff becomes an output, and every output becomes an input. That swapped set of pairs is exactly f−1f^{-1}, when it is a function at all.

Now try it on a function that is not one-to-one: (−2,4)(-2, 4) and (2,4)(2, 4). Swapping gives (4,−2)(4, -2) and (4,2)(4, 2), two different pairs that start with the same first number, 44. A function may only give one answer per input, so this swapped set is not a function; there is no way to know whether 44 should go back to −2-2 or to 22. A repeated output is exactly what breaks the swap.

This connects to a claim from the first lesson of this chapter, Relations and Functions: swapping the two variables reflects the whole picture across y=xy = x, and the horizontal line test is the vertical line test asked about the swapped picture. Both claims are now proven at once. A function ff is, underneath, its set of pairs (a,f(a))(a, f(a)). Swapping every pair gives the inverse relation, and that swapped set is a function of its first coordinate exactly when no two of ff‘s pairs share a second coordinate, that is, exactly when ff is one-to-one, which on a graph is the horizontal line test. So the swapped relation is a function precisely when ff passes the horizontal line test, and only then is there an inverse function f−1f^{-1}.

Being a function was never a property of a curve alone; it was a property of a curve together with a choice of input. Inverting changes that choice, feeding in what used to come out. So “can ff be undone” and “does ff pass the horizontal line test” are the same question asked two ways.

Restricting the domain is a real choice

Worked Example 1 showed that f(x)=x2f(x) = x^2 on all real numbers has no inverse, because it fails the horizontal line test: f(−2)=f(2)=4f(-2) = f(2) = 4. The standard repair is to shrink the domain until the rule becomes one-to-one. It is worth being honest about what that move is. You are not fixing ff; by the equality test of the Function Notation lesson, a rule together with a smaller domain is a different function. Restricting the domain replaces the function that had no inverse with a neighboring one that does.

Worked example 5 Two honest restrictions of x2x^2

The rule x2x^2 becomes one-to-one on the inputs x≥0x \ge 0, and also on the inputs x≤0x \le 0. Find the inverse in each case.

On the domain x≥0x \ge 0, the outputs are all the y≥0y \ge 0, and the input that produced a given yy is the nonnegative square root:

f(x)=x2 (x≥0)⟹f−1(x)=x.f(x) = x^2 \ (x \ge 0) \quad\Longrightarrow\quad f^{-1}(x) = \sqrt{x}.

Check both orders. The easy side is (f∘f−1)(x)=(x)2=x(f \circ f^{-1})(x) = (\sqrt{x})^2 = x for x≥0x \ge 0, the domain of f−1f^{-1}. The awkward side is (f−1∘f)(x)=x2=∣x∣=x(f^{-1} \circ f)(x) = \sqrt{x^2} = |x| = x, which holds because x≥0x \ge 0.

On the domain x≤0x \le 0, the same outputs y≥0y \ge 0 now arrive from negative inputs, so the inverse is the negative root:

f(x)=x2 (x≤0)⟹f−1(x)=−x.f(x) = x^2 \ (x \le 0) \quad\Longrightarrow\quad f^{-1}(x) = -\sqrt{x}.

Check both orders again. (f∘f−1)(x)=(−x)2=x(f \circ f^{-1})(x) = (-\sqrt{x})^2 = x for x≥0x \ge 0, the domain of f−1f^{-1}. And (f−1∘f)(x)=−x2=−∣x∣=−(−x)=x(f^{-1} \circ f)(x) = -\sqrt{x^2} = -|x| = -(-x) = x, using ∣x∣=−x|x| = -x for x≤0x \le 0.

Both restrictions are legitimate, and they give different inverses, x\sqrt{x} and −x-\sqrt{x}. So there is no such thing as the restriction that makes x2x^2 invertible; there is a choice, and the choice is part of the answer.

Check your understanding

Take the pairs (0,0),(1,1),(2,4),(3,9)(0, 0), (1, 1), (2, 4), (3, 9) from f(x)=x2f(x) = x^2 restricted to x≥0x \ge 0. A classmate says: (1) 'swapping every pair to (b,a)(b, a) gives a function here because no two of these pairs share a second coordinate,' and (2) 'x≥0x \ge 0 is the one restriction that fixes x2x^2, since it worked.' Which claim, if either, is correct?

Answer choices

Domain and range trade places

Swapping every pair (a,b)(a, b) into (b,a)(b, a) swaps the two coordinates’ roles: the inputs of f−1f^{-1} are the outputs of ff, and the outputs of f−1f^{-1} are the inputs of ff. In symbols, dom⁡f−1=range⁡f\operatorname{dom} f^{-1} = \operatorname{range} f and range⁡f−1=dom⁡f\operatorname{range} f^{-1} = \operatorname{dom} f.

For the x2x^2 example just above, that swap is easy to miss, because x≥0x \ge 0 happened to be both the domain of ff and the range of x\sqrt{x}. Here is a case where domain and range actually look different. Let f(x)=x+3f(x) = x + 3 on 0≤x≤50 \le x \le 5. Its outputs run from f(0)=3f(0) = 3 to f(5)=8f(5) = 8, so its range is 3≤y≤83 \le y \le 8. The inverse is f−1(x)=x−3f^{-1}(x) = x - 3, and by the swap its domain is 3≤x≤83 \le x \le 8, the range ff just had, while its own range is 0≤y≤50 \le y \le 5, the domain ff just had. Inverting does not merely flip a formula; it swaps the two sets a function lives between, and the domain is genuine data, carried along with the rule.

Check your understanding

Let f(x)=2x−1f(x) = 2x - 1 on the domain 1≤x≤41 \le x \le 4, so its range is 1≤y≤71 \le y \le 7. What are the domain AND range of f−1f^{-1}?

Answer choices

Reading the inverse off the graph

The coordinate swap has a picture. A point (a,b)(a, b) lies on the graph of ff exactly when b=f(a)b = f(a), and that is exactly when (b,a)(b, a) lies on the graph of f−1f^{-1}. So the graph of f−1f^{-1} is the set of points (b,a)(b, a) as (a,b)(a, b) runs over the graph of ff. The map that sends every point (a,b)(a, b) to (b,a)(b, a) is reflection in the line y=xy = x: it fixes that line and exchanges the horizontal and vertical directions. Therefore the graph of f−1f^{-1} is the mirror image of the graph of ff across y=xy = x. That is not by decree but because inverting is swapping coordinates, and swapping coordinates is that reflection.

A function and its inverse as mirror images across y = xThe parabola x squared restricted to nonnegative inputs and the square root function are reflections of each other in the dashed line y = x, meeting it at the origin and at (1, 1).1212y = xx²√x(1, 1)
The rule x squared on the inputs x greater than or equal to zero, labeled x squared, and its inverse the square root, labeled square root of x. Each is the mirror image of the other across the dashed line y = x, and the two curves meet on that line at the origin and at the point (1, 1).

Reflection across y=xy = x also preserves a graph’s direction: if ff is increasing, so is f−1f^{-1}, and if ff is decreasing, so is f−1f^{-1}. Here is why: “increasing” means that whenever the input goes up, the output goes up too, so an input-step and its matching output-step always point the same way. Swapping coordinates swaps which one you call the input, but it cannot flip just one of the two steps, so they still point the same way after the swap. A rising curve reflects to a rising curve, and a falling one to a falling one.

That mirror is a reliable way to picture an inverse, with one caution. It is tempting to think the two graphs can only meet on the line y=xy = x, since that is where the mirror itself sits. That is not true in general: the reflection carries the two graphs into each other, so wherever they cross, the crossings mirror each other too, but a set can mirror itself without lying entirely on the mirror line. What is always true is narrower: if f(a)=af(a) = a for some input aa, then aa is a fixed point, (a,a)(a, a) sits on y=xy = x, and since f−1(a)=af^{-1}(a) = a too, that point lies on both graphs. So every fixed point is a common point on y=xy = x, but a common point off y=xy = x can still happen, as the next example shows.

Worked example 6 Where f(x)=−x3f(x) = -x^3 meets its inverse

The function f(x)=−x3f(x) = -x^3 on all real numbers is one-to-one, and its inverse is f−1(x)=−x3f^{-1}(x) = -\sqrt[3]{x}, the negative of the real cube root. Find every point the two graphs share.

A shared point is an xx with f(x)=f−1(x)f(x) = f^{-1}(x), so set the two rules equal:

−x3=−x3⟹x3=x3.-x^3 = -\sqrt[3]{x} \quad\Longrightarrow\quad x^3 = \sqrt[3]{x}.

Cube both sides to clear the root, writing x3\sqrt[3]{x} as x1/3x^{1/3}:

x9=x⟹x9−x=0⟹x(x8−1)=0.x^9 = x \quad\Longrightarrow\quad x^9 - x = 0 \quad\Longrightarrow\quad x(x^8 - 1) = 0.

The solutions are x=0x = 0 and x8=1x^8 = 1, that is x=1x = 1 and x=−1x = -1. Read off the meeting points: at x=0x = 0 the graphs meet at (0,0)(0, 0), which lies on y=xy = x; at x=1x = 1 they meet at (1,−1)(1, -1); and at x=−1x = -1 they meet at (−1,1)(-1, 1). Check the last two on both graphs: f(1)=−1f(1) = -1 and f−1(1)=−13=−1f^{-1}(1) = -\sqrt[3]{1} = -1, so (1,−1)(1, -1) sits on each; and f(−1)=1f(-1) = 1 with f−1(−1)=−−13=1f^{-1}(-1) = -\sqrt[3]{-1} = 1, so (−1,1)(-1, 1) does too. Two of the three meeting points, (1,−1)(1, -1) and (−1,1)(-1, 1), are not on y=xy = x: the claim that intersections can happen only on y=xy = x is false in general, even though it happens to be true whenever ff is increasing, since f(x)=−x3f(x) = -x^3 is decreasing.

The graphs of f and its inverse crossing off the line y = xThe curve minus x cubed and the curve minus the cube root of x are reflections across the dashed line y = x, but they meet at (-1, 1) and (1, -1), neither on that line.y = xff⁻¹(-1, 1)(1, -1)
The decreasing function f sending x to minus x cubed and its inverse, the function sending x to minus the cube root of x. The two curves are mirror images across the dashed line y = x, yet they cross at (-1, 1) and (1, -1), marked with dots, neither of which lies on that line.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

Why an inverse can never have a rival

The main lesson gives the reason in plain words. Here is the formal version, which pins down exactly where the previous lesson’s associative law is needed.

The inverse is unique#

Suppose gg and hh are both inverses of ff. Write AA for the domain of ff and BB for its range, so ff sends AA to BB while gg and hh send BB back to AA. Being inverses means g∘f=id⁡Ag \circ f = \operatorname{id}_A and f∘g=id⁡Bf \circ g = \operatorname{id}_B, and likewise h∘f=id⁡Ah \circ f = \operatorname{id}_A and f∘h=id⁡Bf \circ h = \operatorname{id}_B.

Now run a single chain and justify each step:

g=g∘id⁡B=g∘(f∘h)=(g∘f)∘h=id⁡A∘h=h.g = g \circ \operatorname{id}_B = g \circ (f \circ h) = (g \circ f) \circ h = \operatorname{id}_A \circ h = h.

The first equality composes gg with the identity on BB, its own domain, which changes nothing. The second replaces id⁡B\operatorname{id}_B by f∘hf \circ h, equal to it because hh is an inverse of ff. The third is the associative law from the previous lesson, and it is the one place the whole argument rests on it. The fourth uses g∘f=id⁡Ag \circ f = \operatorname{id}_A, and the last drops the identity on AA. So g=hg = h: any two inverses of ff are the same function. Notice that associativity is not a decoration here. Without it the middle step would fail, and the phrase “the inverse” would not even be well defined.

Proving invertible means one-to-one, in both directions

The main lesson explains this with arrows. Here is the same claim proved both ways.

With codomain taken as the range, ff is invertible exactly when it is one-to-one#

Take ff with domain AA and codomain its range B=f(A)B = f(A), so every element of BB equals f(a)f(a) for at least one a∈Aa \in A.

Suppose first that ff is one-to-one. Each b∈Bb \in B is f(a)f(a) for at least one aa, because BB is the range, and for at most one aa, because ff is one-to-one, so for exactly one. Define g(b)g(b) to be that unique aa. Then for every a∈Aa \in A we get g(f(a))=ag(f(a)) = a, since aa is the one input that ff sends to f(a)f(a), so g∘f=id⁡Ag \circ f = \operatorname{id}_A. Likewise, for every b∈Bb \in B we get f(g(b))=bf(g(b)) = b, since g(b)g(b) was chosen as an input that ff sends to bb, so f∘g=id⁡Bf \circ g = \operatorname{id}_B. Both sides hold, so gg is a two-sided inverse.

Conversely, suppose ff has an inverse gg. If f(a1)=f(a2)f(a_1) = f(a_2), apply gg to both sides. Because g∘f=id⁡Ag \circ f = \operatorname{id}_A,

a1=g(f(a1))=g(f(a2))=a2,a_1 = g(f(a_1)) = g(f(a_2)) = a_2,

so equal outputs force equal inputs and ff is one-to-one. That settles both directions.

Why reflecting across y = x preserves direction

The main lesson states this fact. Here is a proof that it holds for every increasing function, not just the ones a picture happens to show.

If ff is increasing, so is f−1f^{-1}#

Take two values u<vu < v in the range of ff and pull them back through ff, writing u=f(a)u = f(a) and v=f(b)v = f(b), so a=f−1(u)a = f^{-1}(u) and b=f−1(v)b = f^{-1}(v). If a≥ba \ge b held, the increasing ff would give f(a)≥f(b)f(a) \ge f(b), that is u≥vu \ge v, contradicting u<vu < v; so a<ba < b, which says f−1(u)<f−1(v)f^{-1}(u) < f^{-1}(v). A rising graph reflects to a rising graph, and by the same argument a falling one reflects to a falling one.

A bit of history (optional)

Mathematics sometimes gets a definition right by accident, and notices only years later.

Heinrich Weber, a German mathematician, wrote down axioms for a group in 1882. He asked for three things. Combining two elements must give a third element of the system. The combining must be associative. And you may cancel from either side: from ab=acab = ac it follows that b=cb = c, and from ba=caba = ca it also follows that b=cb = c. Nowhere did he ask that inverses exist. His definition was correct anyway, because every group he had in mind was finite. On a finite set, cancellation quietly delivers the inverses for nothing.

The reason is a counting argument. Combining with a fixed element aa is itself a map from the set to itself, sending each xx to axax, and cancellation says that map never sends two inputs to one output. On a finite set, a map from a set to itself that never sends two inputs to one output must reach every element: its outputs are all different, so there are as many of them as there are elements, and nothing is left over to be missed. A one-sided inverse for a map of a finite set to itself is therefore two-sided already. The gap this lesson warns about cannot open there.

The functions here live where that argument collapses. On the whole real line, squaring sends two inputs to one output and still leaves outputs unused. That is why the square root undoes it from one side and fails from the other. Weber came to see this himself. His textbook of 1895 says that the infinite case must ask for inverses outright. That demand is the pair of compositions this lesson made you check by hand.