Crayonbird
Menu

Maths

What is an inverse function, and how do you find one?

Quick answer

An inverse function f⁻¹ undoes f: if f(3) = 7, then f⁻¹(7) = 3. To find it, write y = f(x), swap x and y, then solve for y.

Ages 14–18Secondary

In one sentence

An inverse function undoes what the original function did, taking every output back to the input it came from.

Explained

Think of a function as a machine. f(x) = 2x + 1 takes 3, doubles it to 6, adds 1 and gives 7. The inverse machine runs the other way: it takes 7, subtracts 1 to get 6, halves it and gives back 3. Every step is undone, in the reverse order, like taking off your shoes before your socks.

  • box
  • mirror
  • pencil
The inverse is the machine running backwards, and its graph is the mirror image in y = x.

The inverse of f is written f⁻¹(x) and read "f inverse of x". The little −1 is not a power: f⁻¹(x) does not mean 1 ÷ f(x).

To find an inverse with algebra, use the swap method:

  1. Write y = f(x), for example y = 2x + 1.
  2. Swap x and y: x = 2y + 1.
  3. Solve for y: x − 1 = 2y, so y = (x − 1)/2.

So f⁻¹(x) = (x − 1)/2. Check: f(3) = 7 and f⁻¹(7) = 6/2 = 3. In general, f(f⁻¹(x)) = x and f⁻¹(f(x)) = x: putting a function and its inverse together gives back what you started with.

On a graph, swapping x and y turns every point (a, b) into (b, a). That is a reflection in the diagonal line y = x. If (3, 7) is on the graph of f, then (7, 3) is on the graph of f⁻¹.

Not every function has an inverse. f(x) = x² sends both 3 and −3 to 9, so an inverse would not know which one to give back. A function has an inverse only if it is one-to-one: each output comes from exactly one input. On a graph, use the horizontal line test: if a horizontal line crosses the graph more than once, there is no inverse. The fix is to restrict the domain. For x ≥ 0, f(x) = x² is one-to-one and its inverse is f⁻¹(x) = √x.

The inputs and outputs also swap: the domain of f⁻¹ is the range of f, and the range of f⁻¹ is the domain of f.

You already know several famous pairs: x² and √x (for x ≥ 0), x³ and ∛x, 10ˣ and log₁₀ x (see logarithms), eˣ and ln x, and sin x and sin⁻¹ x (also called arcsin) on a restricted domain.

Examples

f(x) After swapping x and y f⁻¹(x)
x + 5 x = y + 5 x − 5
3x x = 3y x/3
2x + 1 x = 2y + 1 (x − 1)/2
(x − 4)/3 x = (y − 4)/3 3x + 4
x³ x = y³ ∛x
x², with x ≥ 0 x = y² √x, with x ≥ 0
10ˣ x = 10ʸ log₁₀ x, with x > 0

Worked example: the rule F = 1.8C + 32 turns degrees Celsius into Fahrenheit. Its inverse turns Fahrenheit back into Celsius: subtract 32, then divide by 1.8, so C = (F − 32)/1.8. For 77 °F, C = 45/1.8 = 25 °C. Check: 1.8 × 25 + 32 = 77.

Common mistakes

  • Reading f⁻¹(x) as 1/f(x). For f(x) = 2x, 1/f(x) = 1/(2x), but f⁻¹(x) = x/2. Fix: the −1 means "undo", not "one over".
  • Undoing the steps in the wrong order. For f(x) = 2x + 1, the inverse is (x − 1)/2, not x/2 − 1. Fix: undo the last step first, or use the swap method.
  • Forgetting the one-to-one rule. x² on all real numbers has no inverse. Fix: restrict the domain (for example x ≥ 0) and say so in your answer.
  • Reflecting in the wrong line. The inverse graph is the reflection in y = x, not in the x-axis or the y-axis.

Step by step

Step by step

  1. Write y =Replace f(x) with y, for example y = (x + 1)/(x − 2).
  2. Swap x and yX = (y + 1)/(y − 2).
  3. Solve for yMultiply out and collect the y terms on one side: x(y − 2) = y + 1, so xy − y = 2x + 1, so y(x − 1) = 2x + 1.
  4. Write the inverseF⁻¹(x) = (2x + 1)/(x − 1), and state any values that are not allowed (here x ≠ 1).
  5. CheckTest a number: f(3) = 4/1 = 4, and f⁻¹(4) = 9/3 = 3.

For a quadratic, restrict the domain first. f(x) = (x − 3)² + 1 with x ≥ 3: swap to x = (y − 3)² + 1, so (y − 3)² = x − 1 and y = 3 + √(x − 1). Take the positive root because y ≥ 3. So f⁻¹(x) = 3 + √(x − 1) for x ≥ 1. Check: f(4) = 2 and f⁻¹(2) = 3 + 1 = 4.

Practice questions

Find the inverse

Try each one, then check your answer.

  1. f(x) = x + 9. Find f⁻¹(x).
    Show answer
    f⁻¹(x) = x − 9
  2. f(x) = 6x. Find f⁻¹(x).
    Show answer
    f⁻¹(x) = x/6
  3. f(x) = 2x + 8. Find f⁻¹(x).
    Show answer
    x = 2y + 8, so y = (x − 8)/2: f⁻¹(x) = (x − 8)/2
  4. f(x) = 5x − 3. Find f⁻¹(12).
    Show answer
    f⁻¹(x) = (x + 3)/5, so f⁻¹(12) = 15/5 = 3. Check: f(3) = 12.
  5. f(x) = (x + 2)/3. Find f⁻¹(x).
    Show answer
    x = (y + 2)/3, so 3x = y + 2: f⁻¹(x) = 3x − 2
  6. f(x) = 7 − x. Find f⁻¹(x).
    Show answer
    x = 7 − y, so y = 7 − x: f⁻¹(x) = 7 − x (this function is its own inverse)
  7. f(x) = x/4 + 1. Find f⁻¹(x).
    Show answer
    x = y/4 + 1, so y = 4(x − 1): f⁻¹(x) = 4x − 4
  8. f(x) = x³ − 2. Find f⁻¹(x).
    Show answer
    x = y³ − 2, so y³ = x + 2: f⁻¹(x) = ∛(x + 2)
  9. f(x) = 1/x, x ≠ 0. Find f⁻¹(x).
    Show answer
    x = 1/y, so y = 1/x: f⁻¹(x) = 1/x (its own inverse)
  10. f(x) = 3/(x − 1), x ≠ 1. Find f⁻¹(x).
    Show answer
    x = 3/(y − 1), so y − 1 = 3/x: f⁻¹(x) = 3/x + 1, x ≠ 0. Check: f(4) = 1 and f⁻¹(1) = 4.
  11. f(x) = (2x + 3)/(x − 1), x ≠ 1. Find f⁻¹(x).
    Show answer
    x(y − 1) = 2y + 3, so xy − 2y = x + 3: f⁻¹(x) = (x + 3)/(x − 2), x ≠ 2. Check: f(2) = 7 and f⁻¹(7) = 10/5 = 2.
  12. f(x) = x² + 1, x ≥ 0. Find f⁻¹(x).
    Show answer
    x = y² + 1, so y = √(x − 1): f⁻¹(x) = √(x − 1), x ≥ 1
  13. f(x) = 2ˣ. Find f⁻¹(x).
    Show answer
    x = 2ʸ, so y = log₂ x: f⁻¹(x) = log₂ x, x > 0
  14. Are f(x) = 2x + 1 and g(x) = (x − 1)/2 inverses of each other?
    Show answer
    f(g(x)) = (x − 1) + 1 = x and g(f(x)) = 2x/2 = x: yes
  15. The point (3, 8) is on the graph of y = f(x). Which point must be on the graph of y = f⁻¹(x)?
    Show answer
    Swap the coordinates: (8, 3)
  16. f(x) = 4x − 1 has domain 0 ≤ x ≤ 5. What is the domain of f⁻¹?
    Show answer
    The range of f is −1 ≤ f(x) ≤ 19, so the domain of f⁻¹ is −1 ≤ x ≤ 19

Word problems

Inverse functions in real life

Try each one, then check your answer.

  1. A taxi charges C = 2m + 3 dollars for m miles. Write m in terms of C, and find how far you went for $19.
    Show answer
    m = (C − 3)/2, so m = 16/2 = 8 miles
  2. A secret code turns a number n into c = 3n + 5. Decode the message 38.
    Show answer
    n = (c − 5)/3 = 33/3 = 11
  3. A weather app shows 50 °F. Use C = (F − 32)/1.8 to change it into Celsius.
    Show answer
    (50 − 32)/1.8 = 18/1.8 = 10 °C
  4. A phone plan costs C = 10 + 0.05m dollars for m minutes. Find the inverse and the minutes used for a $13 bill.
    Show answer
    m = (C − 10)/0.05 = 20(C − 10), so m = 20 × 3 = 60 minutes
  5. The area of a square is A = s² (s ≥ 0). Find the side as a function of the area, and the side of a 49 m² square.
    Show answer
    s = √A, so s = √49 = 7 m
  6. A stone dropped from a cliff falls about d = 5t² metres in t seconds. How long does it take to fall 80 m?
    Show answer
    t = √(d/5) = √16 = 4 seconds

Questions people ask

What is an inverse function in simple words?

It is the function that reverses another one. If f turns 3 into 7, the inverse turns 7 back into 3. Doing f and then f⁻¹ gets you back where you started.

What does f⁻¹(x) mean?

It is the notation for the inverse of f, read "f inverse of x". It is not a power and it does not mean 1/f(x).

How do you find the inverse of a function?

Write y = f(x), swap x and y, and rearrange to make y the subject. The result is f⁻¹(x). Always check it with a number.

How do you graph an inverse function?

Reflect the graph of f in the line y = x: each point (a, b) moves to (b, a). In Desmos, if you have defined f(x), typing x = f(y) draws the inverse.

Does every function have an inverse?

No. Only one-to-one functions do, the ones that pass the horizontal line test. Others, like x², get an inverse once you restrict the domain.

How do you find the inverse of a quadratic?

Restrict the domain so only one side of the parabola is used, then swap x and y and solve, often by completing the square. Keep only the square root that matches the restricted domain.

What are inverse trig functions?

sin⁻¹, cos⁻¹ and tan⁻¹ (arcsin, arccos, arctan) give the angle from a ratio. Because sin repeats, its inverse uses a restricted domain: sin⁻¹(0.5) = 30°.

What is the derivative of an inverse function?

In calculus, (f⁻¹)′(x) = 1 ÷ f′(f⁻¹(x)). For f(x) = x³, f⁻¹(8) = 2 and f′(2) = 12, so the slope of ∛x at x = 8 is 1/12.

Quick quiz

Inverse functions

Check what you know with 5 quick questions.

Question 1 of 5

If f(2) = 9, what is f⁻¹(9)?

Practise it

Try it

Practise inverse functions with unlimited questions

Algebra worksheets

Ages 11–12

One-step equations · Small positive numbers

Ages 11–13

Substitution · Small positive numbers

Ages 12–13

Two-step equations · Small positive numbers

Ages 12–15

nth term of a sequence · Bigger numbers

Ages 13–14

x on both sides · Bigger numbers

Ages 13–14

Expanding brackets · KS3, ages 13–14

See more in the library

All Algebra sheets

Practise it step by step in a full course: Grade 11 Maths

For grown-ups

Functions (maths)

A function is a rule that gives exactly one output for each input. In f(x) = 2x + 3, the input 4 gives the output 2 × 4 + 3 = 11.

Maths · Ages 12–16

Composite functions

A composite function applies one function and then another. f(g(x)), also written (f ∘ g)(x) or fg(x), means do g first, then put the answer into f.

Maths · Ages 14–18

Logarithms

A logarithm answers the question "what power?". log₂ 8 = 3 because 2³ = 8. Logs undo exponents, and their rules turn multiplying into adding.

Maths · Ages 14–18

Equations

An equation says two things are equal, using an = sign, like 2x + 1 = 9. Solving it means finding the value of the letter that makes it true, here x = 4.

Maths · Ages 10–16

Algebra

Algebra is maths that uses letters, like x or n, to stand for numbers we don't know yet or numbers that can change. For example, if n + 3 = 10, then n = 7.

Maths · Ages 10–16

Completing the square

Completing the square rewrites x² + bx + c as (x + b/2)² − (b/2)² + c. It solves quadratics, finds the vertex (turning point) of a parabola and proves the quadratic formula.

Maths · Ages 13–17

Back to the Learning Wiki