Inverse Function Calculator

Find the inverse of linear, quadratic, cubic, exponential, log, radical and rational functions with steps and a graph reflected across y = x.

Inverse Function Calculator

Find the inverse of a function algebraically and visualize both the original function and its inverse. This calculator solves linear, quadratic (on one side of the vertex), cubic, exponential, logarithmic, square-root and rational functions and shows the domain and range of f and f⁻¹. Other functions, including trigonometric ones, can be entered as Custom and graphed, but their inverse is not solved.

Function Input

Linear function: f(x) = ax + b

Display Options

Inverse Function Calculator: Get f⁻¹(x) and Check Your Work

Finding the inverse of a function is not about “solving for y” after swapping x and y. That is the procedure you follow, but it only works if the function is injective, and it only gives a true function if you handle domain restrictions carefully. Most homework mistakes happen because a student applies the steps to a quadratic without restricting the domain, or writes 1/f(x) instead of f⁻¹(x). This inverse function calculator handles linear, quadratic (on one side of the vertex), cubic, exponential, logarithmic, square root, and rational families. It shows the algebraic steps, graphs both f and f⁻¹, and includes the verification composition so you can confirm f(f⁻¹(x)) = x. Use it to check your own work, not to skip the learning.

How to Use the Inverse Calculator

Select a function type from the dropdown: Linear, Quadratic, Cubic, Exponential, Logarithmic, Square Root, Rational, or Custom. Enter the coefficients exactly as they appear in your problem. For a quadratic, note the calculator restricts the domain to the right-hand branch (x ≥ vertex) because a quadratic is not invertible otherwise. For a custom function, you type an expression like x^3 + 2*x - 1 or e^x, but the inverse is not solved for custom entries, only graphed.

Set the decimal precision (2 to 5 places) and the graph range (x from -5 to 5, -10 to 10, or -20 to 20). Check “Show calculation steps” and “Show graph” before clicking “Find Inverse.” The results panel shows the original function, the inverse expression, and a verification table with sample values for f(f⁻¹(x)) and f⁻¹(f(x)). The graph plots f, f⁻¹, and the line y = x.

If you are working a problem from OpenStax Precalculus 2e (sections 4.7 Inverse Functions and 4.8 Inverse Trigonometric Functions), this tool follows the same four-step method you see in that textbook.

The Four-Step Method the Calculator Follows

The calculator automates the standard algebraic procedure. Understanding the steps lets you solve any inverse by hand and catch calculator errors.

Step 1: Replace f(x) With y

This is notation only. Writing y = 2x + 3 instead of f(x) = 2x + 3 makes the variables easier to swap next.

Step 2: Swap x and y

Every x becomes a y and every y becomes an x. For the linear case, x = 2y + 3. This step reflects the fact that if (a, b) is on f, then (b, a) is on f⁻¹.

Step 3: Solve for y

Isolate y using algebra. For x = 2y + 3, subtract 3 to get x - 3 = 2y, then divide by 2 to get y = (x - 3)/2. For quadratics, this is where you complete the square. For exponentials, you take a logarithm. The calculator shows each algebraic move.

Step 4: Replace y With f⁻¹(x)

You are done: f⁻¹(x) = (x - 3)/2. The superscript -1 is the inverse function notation, not a reciprocal. Never write f⁻¹(x) as 1/f(x).

Worked Examples by Function Family

Linear Case: f(x) = 2x + 3

y = 2x + 3. Swap: x = 2y + 3. Solve: 2y = x - 3, y = (x - 3)/2. f⁻¹(x) = (x - 3)/2. Verify: f(f⁻¹(x)) = 2((x-3)/2) + 3 = x - 3 + 3 = x. f⁻¹(f(x)) = (2x+3 - 3)/2 = 2x/2 = x.

Quadratic Case: f(x) = x² + 2x + 1 (restricted to x ≥ -1)

Complete the square: x² + 2x + 1 = (x + 1)². Swap: x = (y + 1)². Take square root: y + 1 = ±√x. Because the domain was restricted to x ≥ -1, keep the + branch: y = -1 + √x. f⁻¹(x) = √x - 1. The left branch would be -√x - 1, which is the inverse of the left-hand side of the parabola.

Exponential Case: f(x) = 2ˣ

Swap: x = 2ʸ. Solve: y = log₂(x). f⁻¹(x) = log₂(x). The base of the exponent becomes the base of the logarithm.

Logarithmic Case: f(x) = ln(x)

Swap: x = ln(y). Solve: y = eˣ.The inverse of a natural log is the natural exponential.

Square Root Case: f(x) = √(x - 1) + 2

Swap: x = √(y - 1) + 2. Isolate the radical: x - 2 = √(y - 1). Square both sides: (x - 2)² = y - 1. Solve: y = (x - 2)² + 1. Domain of f⁻¹ is the range of f: f(x) ≥ 2, so x ≥ 2 for f⁻¹.

Rational Case: f(x) = (2x + 3)/(x - 1)

Swap: x = (2y + 3)/(y - 1). Multiply: x(y - 1) = 2y + 3. Expand: xy - x = 2y + 3. Collect y terms: xy - 2y = x + 3. Factor: y(x - 2) = x + 3. y = (x + 3)/(x - 2). f⁻¹(x) = (x + 3)/(x - 2). This is not self-inverse. Verify with the composition.

For a cubic with two turning points (discriminant of f′ > 0), the calculator warns that no single inverse function exists over ℝ, and you must choose a monotonic piece.

Common Function Inverse Pairs
Function f(x)Inverse f⁻¹(x)Domain Restriction
ax + b(x - b)/aa ≠ 0
ax² + bx + c (x ≥ -b/(2a))(-b + √(b² - 4a(c - x))) / (2a)x ≥ vertex y-coordinate
ax³ (or monotonic cubic)∛(x/a)None for a·x³; check turning points
a·bˣlog_b(x/a)b > 0, b ≠ 1; x/a > 0
a·log_b(x) + cb^((x - c)/a)b > 0, b ≠ 1; x > 0 for f
a√(bx + c) + d((x - d)/a)² - c)/bbx + c ≥ 0 for f; x in range of f
a/(bx + c) + d(a/(x - d) - c)/bbx + c ≠ 0 for f; x ≠ d for f⁻¹
eˣln(x)x > 0 for f⁻¹
ln(x)eˣx > 0 for f
sin(x) on [-π/2, π/2]arcsin(x)x in [-1, 1]
cos(x) on [0, π]arccos(x)x in [-1, 1]
tan(x) on (-π/2, π/2)arctan(x)All real numbers

When There Is No Inverse (and What to Do About It)

A function must be injective to have an inverse function. If it fails the horizontal line test, a single output corresponds to more than one input, and swapping x and y would give a relation, not a function. The classic case is f(x) = x². The horizontal line y = 4 hits the graph at x = 2 and x = -2.

The solution is domain restriction. Choose an interval where f is strictly monotonic (always increasing or always decreasing). For a quadratic, restrict to one side of the vertex: x ≥ -b/(2a) gives the right branch, and the inverse is a square root function shifted and scaled. For a cubic with two turning points, the inverse exists on each monotonic piece separately.

Another case: f(x) = |x| fails the horizontal line test on any interval containing 0. Restrict to x ≥ 0 to get f⁻¹(x) = √x, or to x ≤ 0 to get f⁻¹(x) = -√x.

The calculator handles this automatically for quadratics (it uses the right branch) and warns you when a cubic is not injective over ℝ. For custom functions, you must judge injectivity yourself before trusting the graph.

Reading the Graph: The Reflection Property

The graph of f⁻¹ is the mirror image of the graph of f across the line y = x. If (a, b) is on f, then (b, a) is on f⁻¹. This is not a coincidence: it is the geometric meaning of swapping x and y.

To check the calculator's graph, look for these three curves:

  • f(x) in one color (usually blue)
  • f⁻¹(x) in another (usually red)
  • y = x as a dashed line

At any point on f, travel perpendicular to y = x the same distance to land on f⁻¹. If the two curves do not appear symmetric, either the inverse was computed incorrectly or the function is not injective on the displayed range.

For rational functions, watch for vertical asymptotes in f becoming horizontal asymptotes in f⁻¹, and vice versa. The calculator labels asymptotes in the properties panel.

Common Questions

What does one-to-one mean, and how do I check it?

A function is injective if every output comes from exactly one input. The horizontal line test is the visual check: if any horizontal line cuts the graph more than once, the function is not injective. Algebraically, you check by assuming f(a) = f(b) and proving a = b, or by showing the derivative never changes sign (for differentiable functions).

Is f⁻¹(x) the same as 1/f(x)?

No. f⁻¹(x) is the inverse function, meaning f(f⁻¹(x)) = x. 1/f(x) is the multiplicative reciprocal, so f(x) times 1/f(x) = 1. For example, if f(x) = 2x, then f⁻¹(x) = x/2, but 1/f(x) = 1/(2x). Confusing the two is the most common notation mistake in inverse function work. The superscript -1 in f⁻¹ is not an exponent.

Why does the graph of f⁻¹ reflect across y = x?

Because every point (a, b) on f becomes (b, a) on f⁻¹. Swapping the coordinates is exactly a reflection over the line y = x. If you fold the graph paper along that line, the two curves should match exactly. This works only when f is injective on its domain.

How do I handle inverse trigonometric functions?

Trigonometric functions are periodic, so they are not injective without domain restriction. The principal values are fixed by convention: arcsin has range [-π/2, π/2], arccos has [0, π], and arctan has (-π/2, π/2). The calculator does not have dedicated buttons for trig inverses: enter them as a Custom function (like sin(x) for f or arcsin(x) for f⁻¹) and graph only. The algebraic inverse is not solved for trig functions. For that, use the formulas in OpenStax Precalculus 2e section 4.8.

What if the calculator gives an inverse that does not verify?

Check the domain restriction on f. For a quadratic, the inverse works only on the chosen branch (x ≥ vertex by default). If you entered a quadratic with a linear coefficient, verify the calculator completed the square correctly. For a cubic that is not injective, the calculator will say the inverse does not exist over ℝ. For a custom function, the calculator does not solve the inverse at all. Use the graph to check if the reflected curve looks like a function (passes the vertical line test).

Guides on this site