Skip to content
ihateDesmos

Inverse functions and their graphs

6 min read · Updated 20 October 2026

An inverse function undoes the original: if f sends 2 to 7, its inverse sends 7 back to 2. On a graph that swap of inputs and outputs is a reflection in the line y = x, which makes inverses easy to sketch once you know the original.

What an inverse is

If y = f(x), the inverse f⁻¹ satisfies f⁻¹(y) = x. Applying one after the other gets you back where you started: f⁻¹(f(x)) = x. The notation f⁻¹ means the inverse function, not 1/f(x).

Graphing an inverse

Every point (a, b) on the graph of f becomes (b, a) on the graph of f⁻¹. Swapping coordinates is the same as reflecting in the line y = x. So to sketch an inverse, reflect the original: (0, 1) on y = 2ˣ becomes (1, 0) on y = log₂ x, and the horizontal asymptote y = 0 becomes the vertical asymptote x = 0.

−4−2246−220
Open in calculator
2ˣ and its inverse log₂ x, mirror images in y = x.

Finding an inverse algebraically

  1. Write y = f(x). For example, y = (2x + 3)/5.
  2. Swap x and y: x = (2y + 3)/5.
  3. Solve for y: 5x = 2y + 3, so y = (5x − 3)/2.
  4. That is f⁻¹(x). Check: f(f⁻¹(x)) = (2·(5x − 3)/2 + 3)/5 = x.

The horizontal line test

A function has an inverse only if it is one-to-one: no two inputs give the same output. On a graph, that means no horizontal line crosses it more than once. y = x³ passes; y = x² fails, because 2 and −2 both give 4, so “undo squaring” has two answers.

The fix is to restrict the domain. On x ≥ 0, x² is one-to-one, and its inverse is √x. The same trick defines the inverse trig functions: sine restricted to −π/2 ≤ x ≤ π/2 has inverse arcsin.

24−220
Open in calculator
x² restricted to x ≥ 0, and its inverse √x.

Properties worth remembering

  • The domain of f⁻¹ is the range of f, and the range of f⁻¹ is the domain of f.
  • A graph and its inverse cross, if at all, on the line y = x or in pairs symmetric about it.
  • Slopes are reciprocal: if f has slope m at (a, b), then f⁻¹ has slope 1/m at (b, a). A horizontal tangent becomes a vertical one, which is why √x is vertical at the origin.

Practice

A new problem every time. Answer in any form you like: fractions, decimals, √ and π all work, and equivalent equations count as right.

Problem 1

Find the inverse of f(x) = 5x + 6.

Show the answer

Answer: f⁻¹(x) = (x − 6)/5

  1. Write y = 5x + 6.
  2. Swap x and y: x = 5y + 6.
  3. Solve for y: 5y = x − 6, so y = (x − 6)/5.
  4. So f⁻¹(x) = (x − 6)/5.
Open in the calculator

Frequently asked questions

How do you graph an inverse function?
Reflect the original graph in the line y = x, which swaps the coordinates of every point.
Does every function have an inverse?
Only one-to-one functions, which pass the horizontal line test. Others can be given an inverse by restricting their domain.
Is f⁻¹(x) the same as 1/f(x)?
No. f⁻¹ is the inverse function, which undoes f. 1/f(x) is the reciprocal.
How do I find an inverse algebraically?
Write y = f(x), swap x and y, and solve for y.

Keep going

Try it in the calculator

Every figure on this page opens in ihateDesmos, where you can drag sliders and watch the graph respond.

Open the calculator