📘 CodingMarble Learn

Inverse Functions

An inverse function undoes what a function does. If f sends a to b, then f⁻¹ sends b back to a. To find it, write y = f(x), swap x and y, and solve for y. The graph of f⁻¹ is the mirror image of the graph of f in the line y = x. Only one-to-one functions have an inverse; if a function is not one-to-one, limit its domain first (for example x² with x ≥ 0 has inverse √x).

🎬 Step-by-step story

  1. A function is a machine. Put in 3, the machine f does ×2 then +1, and 7 comes out.
  2. The undo machine f⁻¹ does the opposite steps in the opposite order: −1 then ÷2. Put in 7 and 3 comes back.
  3. On a graph, f has the point (3, 7). So f⁻¹ has the point (7, 3). The x and y just swap places.
  4. Swap every point and the whole graph flips over the line y = x. The blue f and the orange f⁻¹ are mirror images.
  5. x² gives 4 for both 2 and −2. A flat line hits it twice, so there is no inverse. Keep only x ≥ 0 and the inverse is √x.
  6. Your turn: pick a function, slide x, and watch the point and its mirror point move together.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why do we undo the steps in reverse order?

The last thing f did is on the outside, so it must come off first, like shoes before socks. In the 3D, f does ×2 then +1 and f⁻¹ does −1 then ÷2.

Why do we swap x and y?

The inverse takes outputs as inputs. Swapping the letters turns every point (a, b) into (b, a), which is exactly what the 3D shows.

Why is the inverse graph a reflection in y = x?

Swapping coordinates of a point puts it the same distance on the other side of y = x. Do that to every point and the whole curve flips.

Why doesn't every function have an inverse?

If two inputs give the same output, the undo machine cannot choose. The red flat line in the 3D hits x² twice.

Is f⁻¹ always a different graph from f?

Not always. f(x) = −x + 4 and f(x) = 1/x are their own inverses: they are symmetric about y = x already. Try it in free play by imagining the mirror.

What is an inverse function?

A function takes an input x and gives one output f(x). The inverse function, written f⁻¹, goes the other way. It takes the output and gives back the input.

If f(a) = b, then f⁻¹(b) = a.

Doing one and then the other brings you back to the start: f⁻¹(f(x)) = x and f(f⁻¹(x)) = x.

Careful: f⁻¹ does not mean 1 ÷ f(x). The small −1 here is a name, not a power.

The domain (allowed inputs) of f⁻¹ is the range (outputs) of f, and the range of f⁻¹ is the domain of f.

How to find the inverse of a function

Four steps:

  1. Write y = f(x).
  2. Swap x and y.
  3. Solve the new equation for y.
  4. Write the answer as f⁻¹(x) = … and state its domain.

Example: f(x) = 2x + 1. Write y = 2x + 1. Swap: x = 2y + 1. Solve: y = (x − 1)/2. So f⁻¹(x) = (x − 1)/2.

Check: f(3) = 7 and f⁻¹(7) = 3. It works.

Quick method for simple chains: list the steps of f and undo them in reverse order. f = “×2 then +1”, so f⁻¹ = “−1 then ÷2”.

Graph of an inverse function

Every point (a, b) on f becomes (b, a) on f⁻¹. Swapping coordinates is the same as reflecting in the line y = x.

So to sketch f⁻¹, draw y = x as a mirror and flip the graph of f across it.

One-to-one functions and restricting the domain

The undo machine must know which input to give back. So each output must come from only one input. Such a function is called one-to-one (injective).

Horizontal line test: if any flat line cuts the graph more than once, the function is not one-to-one and has no inverse.

x² fails: 2² = 4 and (−2)² = 4. Fix it by keeping only part of the graph. With domain x ≥ 0, f(x) = x² is one-to-one and its inverse is the square root function f⁻¹(x) = √x, with domain x ≥ 0.

Strictly increasing or strictly decreasing functions always pass the test.

Try it: the undo game

With a friend: one person secretly picks a number, doubles it, adds 5 and says only the result. You must find the secret number. Write the rule as f(x) = 2x + 5 and use f⁻¹(x) = (x − 5)/2. In the 3D, choose a function, move the slider and check that the blue and orange points always mirror each other.

Key formulas and definitions

Worked examples

1. Find the inverse of f(x) = 3x − 6.

y = 3x − 6. Swap: x = 3y − 6. Add 6: x + 6 = 3y. Divide by 3: y = (x + 6)/3. So f⁻¹(x) = (x + 6)/3. Check: f(4) = 6, f⁻¹(6) = 12/3 = 4.

2. f(x) = 5x + 2. Find f⁻¹(17) without finding the formula.

f⁻¹(17) is the x for which f(x) = 17. 5x + 2 = 17 ⇒ 5x = 15 ⇒ x = 3. So f⁻¹(17) = 3.

3. Find the inverse of f(x) = (x + 4)/2 and verify f(f⁻¹(x)) = x.

y = (x + 4)/2. Swap: x = (y + 4)/2. 2x = y + 4 ⇒ y = 2x − 4. f⁻¹(x) = 2x − 4. Check: f(2x − 4) = (2x − 4 + 4)/2 = x. ✔

4. Find the inverse of f(x) = x³ + 1.

y = x³ + 1. Swap: x = y³ + 1. y³ = x − 1. y = ∛(x − 1). So f⁻¹(x) = ∛(x − 1), defined for all real x.

5. Find the inverse of f(x) = (x − 2)², x ≥ 2, and state its domain.

Range of f is y ≥ 0. y = (x − 2)². Swap: x = (y − 2)². Take the root (y ≥ 2 so y − 2 ≥ 0): √x = y − 2. f⁻¹(x) = √x + 2, domain x ≥ 0, range ≥ 2.

6. Find the inverse of f(x) = (2x + 1)/(x − 3), x ≠ 3.

y = (2x + 1)/(x − 3). Swap: x = (2y + 1)/(y − 3). x(y − 3) = 2y + 1 ⇒ xy − 3x = 2y + 1 ⇒ xy − 2y = 3x + 1 ⇒ y(x − 2) = 3x + 1. f⁻¹(x) = (3x + 1)/(x − 2), x ≠ 2.

Common mistakes

Practice quiz

1. If f(4) = 9, then f⁻¹(9) =
2. The graph of f⁻¹ is the reflection of the graph of f in the line:
3. Inverse of f(x) = x + 7 is:
4. Which function has an inverse on all real numbers?
5. The domain of f⁻¹ equals:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is an inverse function in simple words?

It is the undo function. If f turns a into b, the inverse turns b back into a.

How do you find the inverse of a function?

Write y = f(x), swap x and y, solve for y, and write f⁻¹(x). Check that f(f⁻¹(x)) = x.

Which functions have an inverse?

Only one-to-one functions, where each output comes from one input. Use the horizontal line test; restrict the domain if needed.

Where this is taught

NetherlandsVWO 5Functions, graphs and equations (part 2)
Ukraine10 класAlgebra: functions, polynomials, equations and inequalities (36 h)
USA (Common Core, NGSS, AP)Grade 11Modeling with functions
Germany (Bavaria)Jahrgangsstufe 12Functions: quotient rule and inverse functions

Learn first

Learn next

Related lessons

All Maths lessons