Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Inverse Functions






Undoing Functions

Some processes can be reversed. Encryption can be decrypted. Compression can be decompressed. A temperature converted to Fahrenheit can be converted back to Celsius. The function that performs the reversal is the inverse — it undoes what the original function did.

Given a function ff that transforms input aa into output bb, the inverse function f1f^{-1} transforms bb back into aa. The round trip leaves you where you started. Not every function has an inverse, but those that do reveal a symmetric relationship between input and output.



What is an Inverse Function

An inverse function reverses the action of the original function. If ff takes input aa and produces output bb, then f1f^{-1} takes input bb and produces output aa.

f(a)=b    f1(b)=af(a) = b \iff f^{-1}(b) = a


The two functions undo each other. Applying ff then f1f^{-1} returns to the starting point. Applying f1f^{-1} then ff also returns to the starting point.

Consider f(x)=2xf(x) = 2x, which doubles its input. The inverse f1(x)=x/2f^{-1}(x) = x/2 halves its input. If f(3)=6f(3) = 6, then f1(6)=3f^{-1}(6) = 3. Doubling then halving — or halving then doubling — restores the original value.

Consider f(x)=x+5f(x) = x + 5, which adds five. The inverse f1(x)=x5f^{-1}(x) = x - 5 subtracts five. Adding then subtracting five is a round trip to nowhere.

Not every function has an inverse. The function f(x)=x2f(x) = x^2 on (,)(-\infty, \infty) sends both 33 and 3-3 to 99. Given output 99, there is no unique input to recover — the reversal is ambiguous. Functions without unique input-output pairings cannot be inverted.

Notation: f⁻¹(x) vs 1/f(x)

The notation f1(x)f^{-1}(x) denotes the inverse function of ff. This is not the same as 1f(x)\dfrac{1}{f(x)}, which is the reciprocal of f(x)f(x).

Inverse function: f1(x)f^{-1}(x) undoes ff. If f(x)=2x+3f(x) = 2x + 3, then f1(x)=x32f^{-1}(x) = \dfrac{x - 3}{2}.

Reciprocal: 1f(x)=12x+3\dfrac{1}{f(x)} = \dfrac{1}{2x + 3}.

These are completely different functions with different meanings, different graphs, and different values.

The superscript 1-1 in f1f^{-1} is not an exponent indicating a power. It is a label indicating the inverse relationship. This notation conflicts with the convention that x1=1/xx^{-1} = 1/x, which is why confusion arises.

When writing the reciprocal of a function, use 1f(x)\dfrac{1}{f(x)} or (f(x))1(f(x))^{-1} with parentheses to clarify. Reserve f1(x)f^{-1}(x) exclusively for the inverse function.

For trigonometric functions, the same notational hazard exists. The inverse sine is sin1(x)\sin^{-1}(x) or arcsin(x)\arcsin(x) — not the reciprocal csc(x)=1/sin(x)\csc(x) = 1/\sin(x).

Inverse as Reflection over y = x

The graph of f1f^{-1} is the reflection of the graph of ff across the line y=xy = x.

Every point (a,b)(a, b) on the graph of ff corresponds to a point (b,a)(b, a) on the graph of f1f^{-1}. The coordinates swap because input and output swap roles.

If ff passes through (2,5)(2, 5), then f1f^{-1} passes through (5,2)(5, 2). If ff passes through (1,3)(-1, 3), then f1f^{-1} passes through (3,1)(3, -1).

The line y=xy = x is the mirror. Points on this line satisfy y=xy = x, so swapping coordinates leaves them unchanged — they are fixed points of the reflection.

This geometric relationship provides a visual test. Graph a function, draw the line y=xy = x, and reflect the curve across that line. The result is the graph of the inverse function (if it exists).

The reflection also reveals features. If ff has a horizontal asymptote, f1f^{-1} has a vertical asymptote at the same value. If ff is increasing, f1f^{-1} is increasing. The shapes are congruent, just positioned symmetrically across y=xy = x.

Finding Inverse Algebraically

To find the inverse of a function algebraically, solve for the input in terms of the output.

Step 1: Write y=f(x)y = f(x).

Step 2: Swap xx and yy.

Step 3: Solve for yy.

Step 4: Write f1(x)=f^{-1}(x) = the result.

Example: Find the inverse of f(x)=3x7f(x) = 3x - 7.

Step 1: y=3x7y = 3x - 7

Step 2: x=3y7x = 3y - 7

Step 3: x+7=3yx + 7 = 3y, so y=x+73y = \dfrac{x + 7}{3}

Step 4: f1(x)=x+73f^{-1}(x) = \dfrac{x + 7}{3}

Example: Find the inverse of f(x)=2x+1x3f(x) = \dfrac{2x + 1}{x - 3}.

Step 1: y=2x+1x3y = \dfrac{2x + 1}{x - 3}

Step 2: x=2y+1y3x = \dfrac{2y + 1}{y - 3}

Step 3: x(y3)=2y+1x(y - 3) = 2y + 1, so xy3x=2y+1xy - 3x = 2y + 1, thus xy2y=3x+1xy - 2y = 3x + 1, giving y(x2)=3x+1y(x - 2) = 3x + 1, and y=3x+1x2y = \dfrac{3x + 1}{x - 2}

Step 4: f1(x)=3x+1x2f^{-1}(x) = \dfrac{3x + 1}{x - 2}

Domain and Range Swap

The domain of ff becomes the range of f1f^{-1}. The range of ff becomes the domain of f1f^{-1}.

This swap is exact and complete. Every input of ff is an output of f1f^{-1}, and every output of ff is an input of f1f^{-1}.

Let f(x)=xf(x) = \sqrt{x} with domain [0,)[0, \infty) and range [0,)[0, \infty).

The inverse is f1(x)=x2f^{-1}(x) = x^2, but restricted: domain [0,)[0, \infty) and range [0,)[0, \infty).

The full function g(x)=x2g(x) = x^2 on (,)(-\infty, \infty) is not the inverse of x\sqrt{x} — that would require negative inputs, which x\sqrt{x} never produces.

Let f(x)=exf(x) = e^x with domain (,)(-\infty, \infty) and range (0,)(0, \infty).

The inverse is f1(x)=ln(x)f^{-1}(x) = \ln(x) with domain (0,)(0, \infty) and range (,)(-\infty, \infty).

Exponentials accept all real inputs and produce only positive outputs. Logarithms accept only positive inputs and produce all real outputs. The swap is symmetric.

When finding an inverse, always verify that the domain and range correctly swap.

Verifying Inverses via Composition

Two functions are inverses if and only if their compositions yield the identity function — the function that returns its input unchanged.

For ff and f1f^{-1} to be inverses:

(ff1)(x)=f(f1(x))=xfor all x in the domain of f1(f \circ f^{-1})(x) = f(f^{-1}(x)) = x \quad \text{for all } x \text{ in the domain of } f^{-1}


(f1f)(x)=f1(f(x))=xfor all x in the domain of f(f^{-1} \circ f)(x) = f^{-1}(f(x)) = x \quad \text{for all } x \text{ in the domain of } f


Both conditions must hold.

Verify that f(x)=5x2f(x) = 5x - 2 and g(x)=x+25g(x) = \dfrac{x + 2}{5} are inverses.

f(g(x))=f(x+25)=5x+252=(x+2)2=xf(g(x)) = f\left(\frac{x + 2}{5}\right) = 5 \cdot \frac{x + 2}{5} - 2 = (x + 2) - 2 = x \checkmark


g(f(x))=g(5x2)=(5x2)+25=5x5=xg(f(x)) = g(5x - 2) = \frac{(5x - 2) + 2}{5} = \frac{5x}{5} = x \checkmark


Both compositions return xx, confirming that g=f1g = f^{-1}.

If either composition fails to simplify to xx, the functions are not inverses. This verification catches algebraic errors in finding inverses.

The Horizontal Line Test

The horizontal line test determines whether a function has an inverse. If every horizontal line intersects the graph at most once, the function is one-to-one and has an inverse. If any horizontal line intersects the graph more than once, the function is not one-to-one and has no inverse (on that domain).

The test works because horizontal lines represent constant outputs. If a horizontal line crosses the graph twice, two different inputs produce the same output. The inverse would need to send that output back to two different inputs simultaneously — impossible for a function.

The parabola f(x)=x2f(x) = x^2 fails the horizontal line test. The line y=4y = 4 intersects the graph at x=2x = 2 and x=2x = -2. Both inputs produce output 44; the inverse cannot determine which to return.

The cubic f(x)=x3f(x) = x^3 passes the horizontal line test. Every horizontal line intersects the graph exactly once. Each output comes from exactly one input, so the inverse is well-defined: f1(x)=x3f^{-1}(x) = \sqrt[3]{x}.

Exponential functions pass. Logarithmic functions pass. Linear functions with nonzero slope pass. Quadratics, absolute value, and cosine (on their natural domains) fail.

One-to-One Requirement

A function has an inverse if and only if it is one-to-one: each output comes from exactly one input.

One-to-one means: if f(a)=f(b)f(a) = f(b), then a=ba = b. Different inputs always produce different outputs.

This property is necessary for reversal. To recover the input from the output, the output must point to a unique input. If multiple inputs share an output, the reversal is ambiguous.

Algebraic test: Assume f(a)=f(b)f(a) = f(b) and attempt to prove a=ba = b. If this always follows, the function is one-to-one.

For f(x)=3x+7f(x) = 3x + 7: If 3a+7=3b+73a + 7 = 3b + 7, then 3a=3b3a = 3b, so a=ba = b. One-to-one. ✓

For f(x)=x2f(x) = x^2: If a2=b2a^2 = b^2, then a=±ba = \pm b, which does not imply a=ba = b. Not one-to-one. ✗

Graphical test: the horizontal line test, as described above.

Monotonic functions — those that only increase or only decrease — are always one-to-one. They never produce the same output twice because they never turn around.

Restricting Domain to Create Inverse

A function that is not one-to-one on its natural domain can be made one-to-one by restricting the domain. On the smaller domain, an inverse exists.

The function f(x)=x2f(x) = x^2 is not one-to-one on (,)(-\infty, \infty). But restricted to [0,)[0, \infty), it is one-to-one — the right half of the parabola passes the horizontal line test.

The inverse is f1(x)=xf^{-1}(x) = \sqrt{x}, defined for x0x \geq 0.

Alternatively, restricting to (,0](-\infty, 0] also makes f(x)=x2f(x) = x^2 one-to-one. The inverse would be f1(x)=xf^{-1}(x) = -\sqrt{x}, the negative square root.

Different restrictions yield different inverses. The choice depends on context or convention. For x2x^2, the standard restriction is [0,)[0, \infty) because positive square roots are more commonly needed.

Trigonometric functions require restriction for their inverses. The sine function oscillates forever, failing the horizontal line test. Restricted to [π/2,π/2][-\pi/2, \pi/2], it is one-to-one, enabling arcsin\arcsin. Similar restrictions define arccos\arccos and arctan\arctan.

Restriction sacrifices part of the domain to gain invertibility. The trade-off is necessary whenever the original function is not one-to-one.

Graphing Inverse from Original

Given the graph of ff, the graph of f1f^{-1} is obtained by reflection across the line y=xy = x.

Method 1: Reflect visually. Draw the line y=xy = x as a mirror. Reflect each point on the graph of ff across this line. The reflected curve is the graph of f1f^{-1}.

Method 2: Swap coordinates of key points. Identify several points on the graph of ff: (a1,b1),(a2,b2),(a_1, b_1), (a_2, b_2), \ldots Plot the points (b1,a1),(b2,a2),(b_1, a_1), (b_2, a_2), \ldots Connect them with an appropriate curve.

Features transform predictably:

The yy-intercept of ff becomes the xx-intercept of f1f^{-1}.

The xx-intercept of ff becomes the yy-intercept of f1f^{-1}.

A horizontal asymptote of ff becomes a vertical asymptote of f1f^{-1}.

A vertical asymptote of ff becomes a horizontal asymptote of f1f^{-1}.

If ff is increasing, f1f^{-1} is increasing. If ff is decreasing, f1f^{-1} is decreasing.

The graphs of ff and f1f^{-1} intersect on the line y=xy = x — at points where f(a)=af(a) = a, called fixed points.

Inverse Function Tables

When a function is given as a table of values, the inverse function table is obtained by swapping the input and output columns.

Original function ff:

| xx | f(x)f(x) |
|-----|--------|
| 11 | 44 |
| 22 | 77 |
| 33 | 1010 |
| 44 | 1313 |

Inverse function f1f^{-1}:

| xx | f1(x)f^{-1}(x) |
|-----|-------------|
| 44 | 11 |
| 77 | 22 |
| 1010 | 33 |
| 1313 | 44 |

Each row flips: the output of ff becomes the input of f1f^{-1}, and the input of ff becomes the output of f1f^{-1}.

The inverse table has the same number of entries. The domain and range swap exactly as described earlier.

If the original table has repeated outputs — the same f(x)f(x) value appearing for different xx values — the function is not one-to-one, and no inverse table exists. The swapped table would have repeated inputs, violating the definition of a function.

Common Inverse Pairs

Certain function pairs arise repeatedly as inverses.

Linear: f(x)=mx+bf(x) = mx + b and f1(x)=xbmf^{-1}(x) = \dfrac{x - b}{m} (when m0m \neq 0).

Quadratic/Square root: f(x)=x2f(x) = x^2 on [0,)[0, \infty) and f1(x)=xf^{-1}(x) = \sqrt{x}.

Cubic/Cube root: f(x)=x3f(x) = x^3 and f1(x)=x3f^{-1}(x) = \sqrt[3]{x}.

Exponential/Logarithmic: f(x)=axf(x) = a^x and f1(x)=loga(x)f^{-1}(x) = \log_a(x). Special case: f(x)=exf(x) = e^x and f1(x)=ln(x)f^{-1}(x) = \ln(x).

Power/Root: f(x)=xnf(x) = x^n on appropriate domain and f1(x)=x1/nf^{-1}(x) = x^{1/n}.

Reciprocal: f(x)=1/xf(x) = 1/x is its own inverse: f1(x)=1/xf^{-1}(x) = 1/x. Taking the reciprocal twice returns the original value.

Trigonometric: sin\sin on [π/2,π/2][-\pi/2, \pi/2] and arcsin\arcsin; cos\cos on [0,π][0, \pi] and arccos\arccos; tan\tan on (π/2,π/2)(-\pi/2, \pi/2) and arctan\arctan.

Recognizing these pairs accelerates both finding inverses and verifying that two given functions are inverses.

Inverses in Context

Inverse functions model real-world processes that can be reversed.

Temperature conversion: F(C)=95C+32F(C) = \frac{9}{5}C + 32 converts Celsius to Fahrenheit. The inverse C(F)=59(F32)C(F) = \frac{5}{9}(F - 32) converts Fahrenheit back to Celsius.

Encoding and decoding: An encryption function scrambles data; the decryption function (its inverse) recovers the original. Without an inverse, decryption would be impossible.

Unit conversion: Any reversible unit conversion involves inverse functions. Miles to kilometers and kilometers to miles; pounds to kilograms and back.

Solving equations: If f(x)=bf(x) = b, then x=f1(b)x = f^{-1}(b). The inverse function provides the solution directly. To solve ex=10e^x = 10, apply the inverse of exe^x: x=ln(10)x = \ln(10).

Financial calculations: Converting interest rate to growth factor and back. Computing principal from future value.

In each case, the inverse answers the reverse question. If the original function asks "given input, what is output?" the inverse asks "given output, what was the input?"