Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library
← Precalculus

Inverse Functions

Reverse a one-to-one function and verify by composition.

Precalculus is the course that gets functions ready for calculus. A function is a rule with an input and one output, and here you learn how to graph, change, and reverse them.

Inverse Functions: the central idea

An inverse function reverses input and output. It exists as a function only when each output of the original corresponds to one input on the chosen domain.

Words you need

Inverse function
An inverse function, written $f^{-1}$, is the function that reverses $f$, sending every output of $f$ back to the input it came from.
One-to-one function
A one-to-one function is a function where no two different inputs ever produce the same output, which is exactly the condition needed for an inverse to exist.
Horizontal-line test
The horizontal-line test is a quick graph check: if no horizontal line ever crosses the curve more than once, the function is one-to-one and can be inverted.
Composition
Composition means feeding one function's output into another, and it is the official proof of an inverse, since $f^{-1}(f(x))=x$ and $f(f^{-1}(x))=x$ must both hold.
Domain restriction
A domain restriction is a deliberate decision to keep only part of a function's inputs, such as $x\ge0$ for $x^2$, so the trimmed function becomes one-to-one and gains an inverse.
Line of symmetry $y=x$
The line $y=x$ is the mirror for inverses, because swapping $x$ and $y$ reflects every point of a graph across it, turning $(3,11)$ into $(11,3)$.

What to know before this lesson

Know function composition, domains and ranges, one-to-one behavior, and solving equations for a variable.

If one of those prerequisites is uncertain, use the Precalculus subject guide to locate the earlier concept before memorizing a procedure.

Inverse functions: a worked example

Follow the mathematical structure
For $f(x)=2x+5$, $f^{-1}(x)=(x-5)/2$.

Every step, with the arithmetic

  1. Step 1 - Start with the function$f(x)=2x^3+1$
  2. Step 2 - Check it is one-to-oneCubing never repeats an output, so the graph passes the horizontal-line test
  3. Step 3 - Write it as an equation$y=2x^3+1$
  4. Step 4 - Swap the two variables$x=2y^3+1$
  5. Step 5 - Undo the $+1$, then the $\times2$$x-1=2y^3$, so $\dfrac{x-1}{2}=y^3$
  6. Step 6 - Undo the cube$y=\sqrt[3]{\dfrac{x-1}{2}}$, so $f^{-1}(x)=\sqrt[3]{\dfrac{x-1}{2}}$
  7. Step 7 - Test with a real number$f(2)=2(8)+1=17$, and $f^{-1}(17)=\sqrt[3]{16/2}=\sqrt[3]{8}=2$
  8. Step 8 - Verify the composition$f^{-1}(f(x))=\sqrt[3]{\dfrac{(2x^3+1)-1}{2}}=\sqrt[3]{x^3}=x$

For $f(x)=2x+5$, swapping gives $x=2y+5$, so $y=(x-5)/2$ and therefore $f^{-1}(x)=(x-5)/2$.

Common function and inverse pairs, with the domain each one needs

Common function and inverse pairs, with the domain each one needs
Function f(x)Inverse f^-1(x)Domain f needsNumber check
2x + 5(x - 5) / 2all real numbersf(3) = 11 and f^-1(11) = 3
x^3cube root of xall real numbersf(2) = 8 and f^-1(8) = 2
x^2square root of xx >= 0 onlyf(4) = 16 and f^-1(16) = 4
e^xln xall real numbers; inverse needs x > 0f(0) = 1 and ln 1 = 0
1 / x1 / x (its own inverse)x not equal to 0f(4) = 0.25 and f^-1(0.25) = 4
sin xarcsin x-pi/2 <= x <= pi/2 onlysin(pi/6) = 0.5 and arcsin(0.5) = pi/6

The step-by-step method for inverse functions

  1. Check one-to-one behavior with logic, a graph's horizontal-line test, or a justified domain restriction.
  2. Write $y=f(x)$, interchange $x$ and $y$, and solve for $y$.
  3. State inverse domain and range, then verify both compositions return their inputs.

How to check your answer

Compute $f^{-1}(f(x))$ and $f(f^{-1}(x))$; each should simplify to $x$ on the appropriate domain.

Use intercepts, end behavior, symmetry, and a few exact points to test whether a formula and graph describe the same function.

A mistake that changes the mathematics

$f^{-1}(x)$ means inverse function, not reciprocal $1/f(x)$.

Pause before continuing

Explain why the tempting step is invalid, then write the condition or definition that prevents it. This turns the error into a rule you can recognize in a new problem.

Where you will actually use this

Temperature conversion

Celsius to Fahrenheit is $F=\tfrac95C+32$, and its inverse $C=\tfrac59(F-32)$ converts back, so $20^\circ$C gives $68^\circ$F and $68^\circ$F gives $20^\circ$C.

Encryption and decryption

A cipher scrambles a message with one function and unscrambles it with the exact inverse, so a code that has no inverse is a code nobody can read.

Reading a growth model backwards

If a population follows $P=500\cdot2^{t}$, the inverse $t=\log_2(P/500)$ answers the different question of when the population reaches a target size.

How inverse functions connects to the rest of precalculus

Try a transfer problem

Restrict $f(x)=x^2$ so it has an inverse, find that inverse, and compare the two graphs across $y=x$.

Show the worked answer

$f(x)=x^2$ fails the horizontal-line test on all real numbers, since $f(3)$ and $f(-3)$ both equal $9$ and an inverse could not choose between them. Restrict the domain to $x\ge0$, keeping only the right half of the parabola. On that half the function is one-to-one. Now $y=x^2$ becomes $x=y^2$ after the swap, and solving gives $y=\sqrt{x}$, so $f^{-1}(x)=\sqrt{x}$ with domain $x\ge0$. The positive root is the right one because the restricted outputs must be nonnegative. Check: $f(5)=25$ and $f^{-1}(25)=5$; also $f^{-1}(f(x))=\sqrt{x^2}=x$ for $x\ge0$. Graphically, the right half of the parabola and the square-root curve are mirror images across the line $y=x$. The point $(3,9)$ on one becomes $(9,3)$ on the other, and $(0,0)$ sits on the mirror line itself, so it does not move. Restricting instead to $x\le0$ is equally valid and produces the other branch, $f^{-1}(x)=-\sqrt{x}$.

Work without copying the example. When finished, use the relevant focused calculator or formula reference to check the setup and result, then correct the first line where your reasoning changed. When the method feels reliable, move to precalculus practice questions.

Questions about inverse functions

Does $f^{-1}(x)$ mean $1/f(x)$?

No, and this is the most common mix-up. The $-1$ here is notation for undoing, not an exponent. For $f(x)=2x+5$, the inverse is $(x-5)/2$, while the reciprocal $1/f(x)$ is $1/(2x+5)$. Those are completely different functions.

Why is $\sqrt{x}$ the inverse of $x^2$ if $x^2$ is not one-to-one?

It is only an inverse on a restricted domain. Textbooks quietly agree to keep $x\ge0$, which is also why the square-root symbol always returns the nonnegative root. Without that agreement, $\sqrt{9}$ would have to mean both $3$ and $-3$, and it would not be a function.

What does the graph of an inverse look like?

It is the original graph reflected across the line $y=x$. Every point $(a,b)$ becomes $(b,a)$, the domain and range trade places, and a horizontal asymptote turns into a vertical one. Any point already sitting on $y=x$ stays exactly where it is.

Can a function be its own inverse?

Yes. $f(x)=1/x$ is one, since $f(f(x))=1/(1/x)=x$. So is $f(x)=-x$, and so is $f(x)=6-x$. These are called involutions, and their graphs are already symmetric across the line $y=x$, so reflecting them changes nothing.

Stuck on a problem?

Stuck on a inverse functions problem?

Paste your own question, or send the transfer problem above. You get the method, the answer, and a check you can repeat yourself.