← mapFunctions & Growth

Inverse Functions

⚗ Dr. Möbius, from the lab

The Sets stratum gave you the theorem: a function has an inverse if and only if it's a bijection. Now we're landing that theorem in graph-world, where "bijection" has a visual test and "finding the inverse" is a two-line procedure. The marquee example — exponential and logarithm, mirror images of each other across y=xy = x — has been sitting in front of you this whole time, and it's about to make every single log law feel fucking obvious in retrospect. Strap in.

THE BIG IDEA

A function is invertible exactly when it passes the horizontal line test; the inverse function is found by swapping inputs and outputs; and the graphs of $f$ and $f^{-1}$ are reflections of each other across the line $y = x$.

The theorem lands in graph-world

Recall from the Sets stratum (composition-inverses node): a function f:ABf: A \to B has an inverse if and only if ff is a bijection — both injective (one-to-one: different inputs give different outputs) and surjective (every output is achieved).

In graph-world, injectivity has a visual test: the horizontal line test. A function is injective if and only if every horizontal line intersects its graph at most once. Why? Because a horizontal line y=ky = k hits the graph at exactly the points where f(x)=kf(x) = k. If the line hits twice, there are two inputs mapping to the same output — injectivity fails, the bijection dies, and the inverse doesn't exist. The test is a single sweep of your eye; do not skip it.

Surjectivity is a domain/codomain declaration issue: the function f:RRf: \mathbb{R} \to \mathbb{R} defined by f(x)=x2f(x) = x^2 is not surjective onto R\mathbb{R} (negative numbers aren't hit), but it IS surjective onto [0,)[0, \infty). The same function, different codomain choice, different verdict.

Putting it together: to get an invertible function, you need

  1. the horizontal line test to pass (injectivity), and
  2. the codomain to equal the range (surjectivity, which you often achieve by just declaring the codomain to be the range).

When both hold, ff is a bijection and f1f^{-1} exists.

Finding the inverse: swap and solve

Given y=f(x)y = f(x), to find f1f^{-1}:

  1. Write y=f(x)y = f(x).
  2. Swap xx and yy: write x=f(y)x = f(y).
  3. Solve for yy. That yy is f1(x)f^{-1}(x).

Why swapping works. The inverse function reverses the input-output pairing. If ff maps 373 \mapsto 7, then f1f^{-1} maps 737 \mapsto 3. Swapping xx and yy in the equation implements exactly this: the old input becomes the new output and vice versa. It's the same move we made in the Sets stratum — same fucking idea, different notation. You've already done this. You just didn't know it yet.

Example: f(x)=2x+5f(x) = 2x + 5.

Swap: x=2y+5x = 2y + 5. Solve: y=(x5)/2y = (x - 5)/2. So f1(x)=(x5)/2f^{-1}(x) = (x-5)/2.

Verifying via composition — this IS the definition. An inverse must satisfy f1(f(x))=xf^{-1}(f(x)) = x and f(f1(x))=xf(f^{-1}(x)) = x. Check:

f1(f(x))=f1(2x+5)=(2x+5)52=2x2=x.f^{-1}(f(x)) = f^{-1}(2x+5) = \frac{(2x+5) - 5}{2} = \frac{2x}{2} = x. \checkmark

The composition test is not a ritual — it is the definition of inverse function, straight from the composition-inverses node. Do it until it's automatic.

Graphs mirror across y=xy = x

If (a,b)(a, b) is on the graph of ff — meaning f(a)=bf(a) = b — then (b,a)(b, a) is on the graph of f1f^{-1} — meaning f1(b)=af^{-1}(b) = a. The input and output swap.

Now: what geometric transformation swaps xx and yy coordinates? Reflection across the line y=xy = x.

The graphs of ff and f1f^{-1} are mirror images across y=xy = x. Every point swaps its coordinates. The line y=xy = x is the mirror.

Verify it visually:

function grapher
x = 2.22^x → 4.595ln(x) → 0.788x → 2.2

In that grapher, y=2xy = 2^x and y=ln(x)y = \ln(x) are reflections of each other across y=xy = x (the third function). Every log law re-read: "the mirror of the exponential."

Restricting domains to force invertibility: x2xx^2 \to \sqrt{x}

f(x)=x2f(x) = x^2 on R\mathbb{R} fails the horizontal line test — f(3)=f(3)=9f(-3) = f(3) = 9. Not injective. Not invertible. If you naively "swap and solve," you get y=±xy = \pm\sqrt{x}, which is not a function (two outputs for one input).

The fix: restrict the domain. On [0,)[0, \infty), the function f(x)=x2f(x) = x^2 is strictly increasing, hence injective, hence invertible. Its inverse on [0,)[0, \infty) is f1(x)=xf^{-1}(x) = \sqrt{x}.

This is not a cheat. It's the honest story behind the convention x0\sqrt{x} \ge 0: the square root is defined as the inverse of x2x^2 on [0,)[0, \infty), and we pick the non-negative branch by convention to get a function. The convention exists to make x\sqrt{x} a proper function, not some multi-valued fog machine. Conventions matter.

The same pattern repeats throughout mathematics: inverse trig functions (arcsin\arcsin, arccos\arccos, arctan\arctan) restrict the domain of sine, cosine, tangent to intervals where they're injective, producing proper inverse functions. The principle is always the same.

Exponential and logarithm: the marquee pair

f(x)=bxf(x) = b^x is strictly increasing (for b>1b > 1) or strictly decreasing (for 0<b<10 < b < 1) — either way, it passes the horizontal line test. Its inverse is f1(x)=logb(x)f^{-1}(x) = \log_b(x).

The defining relationship: blogb(x)=xandlogb(bx)=x.b^{\log_b(x)} = x \quad \text{and} \quad \log_b(b^x) = x.

These are just the two composition identities f(f1(x))=xf(f^{-1}(x)) = x and f1(f(x))=xf^{-1}(f(x)) = x, expressed in the specific notation of exponents and logs.

Every single log law, re-read as an inverse statement:

  • logb(bx)=x\log_b(b^x) = x: the log undoes the exponential.
  • blogb(x)=xb^{\log_b(x)} = x: the exponential undoes the log.
  • logb(MN)=logbM+logbN\log_b(MN) = \log_b M + \log_b N: because bm+n=bmbnb^{m+n} = b^m b^n — the inverse just translates the exponential product law.

The logarithm is not a separate subject. It is the inverse function of the exponential, full stop. Every log property is an exponential property read backwards through the mirror. If this feels obvious now, good — it should have felt obvious from day one, and the fact that it doesn't in most courses is the entire reason this lab exists.

🔬 SPECIMENS (worked examples)

Worked example 1 — finding an inverse and verifying by composition

Find the inverse of f(x)=3x12f(x) = \dfrac{3x - 1}{2} and verify it.

Step 1: confirm invertibility. ff is linear with slope 3/203/2 \ne 0: strictly increasing, hence injective. Its range is all of R\mathbb{R} (as xx ranges over R\mathbb{R}, ff hits every real). Bijection.

Step 2: swap and solve. Write y=(3x1)/2y = (3x-1)/2. Swap: x=(3y1)/2x = (3y-1)/2. Solve: 2x=3y1    3y=2x+1    y=2x+13.2x = 3y - 1 \implies 3y = 2x + 1 \implies y = \frac{2x+1}{3}.

So f1(x)=2x+13f^{-1}(x) = \dfrac{2x+1}{3}.

Step 3: verify composition. f1(f(x))=f1 ⁣(3x12)=23x12+13=(3x1)+13=3x3=x.f^{-1}(f(x)) = f^{-1}\!\left(\frac{3x-1}{2}\right) = \frac{2 \cdot \frac{3x-1}{2} + 1}{3} = \frac{(3x-1) + 1}{3} = \frac{3x}{3} = x. \checkmark

f(f1(x))=f ⁣(2x+13)=32x+1312=(2x+1)12=2x2=x.f(f^{-1}(x)) = f\!\left(\frac{2x+1}{3}\right) = \frac{3 \cdot \frac{2x+1}{3} - 1}{2} = \frac{(2x+1) - 1}{2} = \frac{2x}{2} = x. \checkmark

Worked example 2 — domain restriction and the square root

Find the inverse of f(x)=x24f(x) = x^2 - 4 restricted to x0x \ge 0, and state its domain and range.

The restriction is necessary. On all of R\mathbb{R}, ff fails the horizontal line test (f(2)=f(2)=0f(2) = f(-2) = 0). On [0,)[0, \infty), ff is strictly increasing (as xx grows from 0, x24x^2 - 4 grows). Invertible.

Find the inverse. Write y=x24y = x^2 - 4 for x0x \ge 0. Swap: x=y24x = y^2 - 4 — but wait, we need to solve for yy. After swapping: x=y24y2=x+4y=x+4x = y^2 - 4 \Rightarrow y^2 = x + 4 \Rightarrow y = \sqrt{x+4} (positive root, because we restricted y0y \ge 0 from the original domain).

f1(x)=x+4.f^{-1}(x) = \sqrt{x + 4}.

Domain of f1f^{-1} = range of ff = values x24x^2 - 4 takes on [0,)[0, \infty). At x=0x = 0: 4-4. As xx \to \infty: \infty. Range of ff is [4,)[-4, \infty). So domain of f1f^{-1} is [4,)[-4, \infty).

Range of f1f^{-1} = domain of ff = [0,)[0, \infty). (Makes sense: x+40\sqrt{x+4} \ge 0.)

Worked example 3 — the mirror graph (where the exponential and log finally shake hands)

The function f(x)=ex1f(x) = e^{x-1} has an inverse. Find it and describe geometrically what the graph of f1f^{-1} looks like relative to ff.

Find the inverse. Write y=ex1y = e^{x-1}. Swap: x=ey1x = e^{y-1}. Solve by taking ln\ln: ln(x)=y1    y=ln(x)+1.\ln(x) = y - 1 \implies y = \ln(x) + 1.

So f1(x)=ln(x)+1f^{-1}(x) = \ln(x) + 1.

Geometry. The graph of f1(x)=ln(x)+1f^{-1}(x) = \ln(x) + 1 is the reflection of the graph of f(x)=ex1f(x) = e^{x-1} across the line y=xy = x.

What does ex1e^{x-1} look like? It's the graph of exe^x shifted right by 1. It has a horizontal asymptote y=0y = 0 and passes through (1,1)(1, 1) (since e11=e0=1e^{1-1} = e^0 = 1).

Its reflection across y=xy = x: the horizontal asymptote y=0y = 0 reflects to the vertical asymptote x=0x = 0. The point (1,1)(1, 1) reflects to itself (it's on y=xy = x). The shape is a logarithm curve with a vertical asymptote at x=0x = 0.

Verify: f1(x)=ln(x)+1f^{-1}(x) = \ln(x) + 1 has vertical asymptote as x0+x \to 0^+ (where ln(x)\ln(x) \to -\infty). f1(1)=ln(1)+1=0+1=1f^{-1}(1) = \ln(1) + 1 = 0 + 1 = 1. The point (1,1)(1, 1) is shared by both ff and f1f^{-1} — it's on y=xy = x, the mirror.

☠ KNOWN HAZARDS

  • Confusing f1(x)f^{-1}(x) with 1/f(x)1/f(x). The notation f1f^{-1} means the inverse function, not the reciprocal. sin1(x)=arcsin(x)1/sin(x)=csc(x)\sin^{-1}(x) = \arcsin(x) \ne 1/\sin(x) = \csc(x). This confusion has been ruining exam scores for centuries, and it is a goddamn tragedy every time. The 1-1 exponent on a function means inverse, not reciprocal. Remember it or suffer.

  • Forgetting to restrict the domain. If a function fails the horizontal line test, you cannot simply "find the inverse" — you must first declare which piece of the domain you're working on. Skipping this produces a multi-valued mess that isn't a function. A multi-valued thing is not a function. We have been over this.

  • Verifying only one composition direction. You must check BOTH f1(f(x))=xf^{-1}(f(x)) = x and f(f1(x))=xf(f^{-1}(x)) = x. One direction can work "by accident" for certain non-bijective functions. The inverse requires both, and skipping one is how you hand in a wrong answer with complete confidence.

  • Assuming every function has an inverse. A constant function has no inverse. A function that's not injective has no inverse without domain restriction. Check first, invert second. The horizontal line test exists precisely to prevent you from wasting time inverting something that can't be inverted.

TL;DR

  • ff has an inverse \Leftrightarrow ff is a bijection \Leftrightarrow it passes the horizontal line test (with codomain = range).

  • To find f1f^{-1}: write y=f(x)y = f(x), swap xx and yy, solve for yy. Verify with composition: f1(f(x))=xf^{-1}(f(x)) = x.

  • Graphs of ff and f1f^{-1} are reflections across y=xy = x: every point (a,b)(a, b) on ff corresponds to (b,a)(b, a) on f1f^{-1}.

  • Restricting the domain of a non-injective function (e.g. x2x^2 to [0,)[0,\infty)) forces invertibility; this is how x\sqrt{x} and inverse trig are defined.

  • ln\ln and exe^x are the marquee inverse pair: elnx=xe^{\ln x} = x and ln(ex)=x\ln(e^x) = x are the composition identities in disguise.