Back to courseLesson 5 of 14

Inverse functions

What you'll learn

Undo a function by reflecting it across y = x — and see why only one-to-one functions have an inverse.

If a function is a machine that turns 3 into 7, its inverse is the machine that turns 7 back into 3. The inverse undoes the original.

Undo, step by step

We write the inverse of f as f⁻¹ (read "f inverse" — the −1 is not an exponent). If f sends a → b, then f⁻¹ sends b → a. They cancel:

f⁻¹(f(x)) = x

To find an inverse by hand, swap the roles of input and output and solve:

  1. Start with y = 2x + 1
  2. Swap x and y: x = 2y + 1
  3. Solve for y: y = (x − 1) / 2

So f(x) = 2x + 1 has inverse f⁻¹(x) = (x − 1) / 2. Check: f(3) = 7, and f⁻¹(7) = (7 − 1)/2 = 3. ✓

The graph: a reflection across y = x

Swapping every input with its output has a beautiful visual meaning — the graph flips across the diagonal line y = x:

y = xff⁻¹(a, b)(b, a)
The inverse is the same curve seen in the mirror y = x: every point (a, b) becomes (b, a). Inputs and outputs trade places.

Every point (a, b) on f becomes (b, a) on f⁻¹. The mirror is always the line y = x.

Not every function has an inverse

To undo a function, each output must come from exactly one input — the function must be one-to-one. f(x) = x² fails: both 3 and −3 give 9, so when you see the output 9 you can't tell which input it came from.

The visual test mirrors the vertical-line test: a function is one-to-one when no horizontal line hits its graph more than once. (To invert x², you first restrict it to x ≥ 0 — then √x is its inverse.)

Why this matters

Inverses are how you solve for a hidden input. Logarithms (next module) exist to invert exponentials; arcsin and arccos invert the trig functions; "decrypt" inverts "encrypt". Whenever you need to run a process backwards, you're asking for an inverse.

Check your understanding

Question 1 of 2

What is the inverse of f(x) = 3x − 6?

Next lesson