Inverse Function Calculator

Find inverse formulas, check candidate inverses, and review composition results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Check a candidate inverse

“Verified” is reserved for symbolic equivalence. Numerical agreement without a proof is reported as inconclusive.

Steps and composition verifications
Inverse result

▼ See explanations and tips below ▼

What Is an Inverse Function?

An inverse function reverses what another function does. If a function \(f\) takes an input \(x\) and produces an output \(y\), then its inverse takes that output \(y\) and returns the original input \(x\).

$$ f(x)=y \quad \Longleftrightarrow \quad f^{-1}(y)=x $$

The notation \(f^{-1}\) means “the inverse of \(f\).” It does not mean \(\frac{1}{f(x)}\). That distinction matters because inverse functions undo inputs and outputs, while reciprocals divide \(1\) by a value.

For an inverse to be a function, each output of the original function must come from exactly one input. This property is called being one-to-one. If two different inputs produce the same output, then reversing the function would force one input value to have two possible outputs, which is not allowed for a function.


Why Inverse Functions Matter

Inverse functions help answer “what input caused this output?” questions. That makes them useful in algebra, graphing, modeling, unit conversion, and many applied problems.

For example, a function might convert hours traveled into distance. Its inverse would convert distance back into hours traveled. A function might convert Celsius to Fahrenheit. Its inverse converts Fahrenheit back to Celsius. In algebra, inverse functions also help solve equations by reversing operations in the correct order.

The most important habit is not just finding a formula. It is checking whether the original function can be reversed as a function and identifying the domain and range where the inverse makes sense.


Key Terms to Know

  • Function: A rule that gives exactly one output for each allowed input.
  • Domain: The set of input values where a function is defined.
  • Range: The set of output values a function can produce.
  • One-to-one function: A function where each output comes from no more than one input.
  • Horizontal line test: A graph test for one-to-one behavior. If any horizontal line crosses the graph more than once, the function is not one-to-one.
  • Composition: Putting one function inside another, written as \((f \circ g)(x)=f(g(x))\).
  • Restricted domain: A smaller domain chosen so a function that is not one-to-one on its full domain becomes one-to-one.
  • Branch: One part of a multi-valued relationship chosen after restricting a domain, such as the positive or negative branch of a square-root result.

How Inverse Functions Work

An inverse function swaps the role of input and output. If \(g\) is the inverse of \(f\), then composing the two functions should return the starting value:

$$ f(g(x))=x $$

and

$$ g(f(x))=x $$

The first equation checks that \(g\) undoes \(f\) in one direction. The second checks the reverse direction. These equations are only meaningful on the domains where the compositions are defined.

A common algebraic method for finding an inverse is:

  1. Write the function as \(y=f(x)\).
  2. Interchange \(x\) and \(y\).
  3. Solve the new equation for \(y\).
  4. Rename \(y\) as \(f^{-1}(x)\).
  5. State any domain and range restrictions.

Linear functions

A nonconstant linear function has the form:

$$ f(x)=mx+b, \quad m\ne0 $$

Swap \(x\) and \(y\), then solve:

$$ x=my+b $$
$$ y=\frac{x-b}{m} $$

So the inverse is:

$$ f^{-1}(x)=\frac{x-b}{m} $$

A constant function does not have an inverse function on its full domain because every input gives the same output.

Linear-fractional rational functions

A common rational form is:

$$ f(x)=\frac{ax+b}{cx+d} $$

The denominator cannot be zero. If \(c\ne0\), the original function excludes:

$$ x=-\frac{d}{c} $$

When the rational expression is not degenerate and the inverse can be written in the same family, the coefficients are not proportional. A common way to express this condition is \(ad-bc\ne0\). The inverse has the form:

$$ f^{-1}(x)=\frac{dx-b}{a-cx} $$

The denominator of the inverse also cannot be zero, so the inverse excludes:

$$ x=\frac{a}{c} $$

This excluded value is not just a technical detail. It tells you which output value the original function never reaches.

Square-root functions

A square-root form such as

$$ f(x)=a\sqrt{mx+b}+k, \quad a\ne0,\ m\ne0 $$

requires the radicand to be nonnegative:

$$ mx+b\ge0 $$

Solving for the inverse gives:

$$ f^{-1}(x)=\frac{\left(\frac{x-k}{a}\right)^2-b}{m} $$

However, the inverse formula should only be used for input values in the range of the original square-root function. If \(a>0\), the range starts at \(k\) and increases. If \(a<0\), the range ends at \(k\) and decreases.

Odd powers, even powers, and quadratics

A simple odd-power function such as

$$ f(x)=a x^n+c, \quad a\ne0 $$

with positive odd integer \(n\) is one-to-one over all real numbers. Its inverse can be written as:

$$ f^{-1}(x)=\sqrt[n]{\frac{x-c}{a}} $$

Even powers and quadratics behave differently. For example, \(f(x)=x^2\) sends both \(-2\) and \(2\) to \(4\). Since two inputs share the same output, \(x^2\) is not one-to-one over all real numbers. To choose an inverse, you must first restrict the domain, such as \(x\ge0\) or \(x\le0\).


Examples of Inverse Functions in Practice

Example 1: Linear inverse

Let:

$$ f(x)=2x+3 $$

Write \(y=2x+3\), swap \(x\) and \(y\), and solve:

$$ x=2y+3 $$
$$ x-3=2y $$
$$ y=\frac{x-3}{2} $$

So:

$$ f^{-1}(x)=\frac{x-3}{2} $$

Check by composition:

$$ f(f^{-1}(x))=2\left(\frac{x-3}{2}\right)+3=x $$

and

$$ f^{-1}(f(x))=\frac{(2x+3)-3}{2}=x $$

Both compositions return \(x\), so the functions undo each other.


Example 2: Rational inverse with excluded values

Let:

$$ f(x)=\frac{2x+1}{x-4} $$

The original function is undefined at \(x=4\). Now solve for the inverse:

$$ y=\frac{2x+1}{x-4} $$

Swap \(x\) and \(y\):

$$ x=\frac{2y+1}{y-4} $$

Solve for \(y\):

$$ x(y-4)=2y+1 $$
$$ xy-4x=2y+1 $$
$$ y(x-2)=4x+1 $$
$$ y=\frac{4x+1}{x-2} $$

So:

$$ f^{-1}(x)=\frac{4x+1}{x-2} $$

The inverse is undefined at \(x=2\). This means the original function never outputs \(2\).


Example 3: Square-root inverse and range restriction

Let:

$$ f(x)=\sqrt{x-1}+2 $$

The original domain is \(x\ge1\), because the value under the square root must be nonnegative. The range is \(y\ge2\), because a square root is never negative.

Solve for the inverse:

$$ y=\sqrt{x-1}+2 $$

Swap \(x\) and \(y\):

$$ x=\sqrt{y-1}+2 $$
$$ x-2=\sqrt{y-1} $$
$$ (x-2)^2=y-1 $$
$$ y=(x-2)^2+1 $$

So:

$$ f^{-1}(x)=(x-2)^2+1 $$

The inverse domain is \(x\ge2\), because the inputs to the inverse are the outputs of the original function.


Example 4: Quadratic function that needs a restricted domain

The function

$$ f(x)=x^2 $$

is not one-to-one over all real numbers because:

$$ f(-3)=9 \quad \text{and} \quad f(3)=9 $$

A full inverse over all real numbers would not be a function. But if the domain is restricted to \(x\ge0\), then the inverse is:

$$ f^{-1}(x)=\sqrt{x} $$

If the domain is restricted to \(x\le0\), then the inverse is:

$$ f^{-1}(x)=-\sqrt{x} $$

Both are valid on their chosen restricted domains, but they are different branches.


Example 5: Principal trigonometric inverse

The sine function is periodic and is not one-to-one on all real numbers. On its principal branch,

$$ -\frac{\pi}{2}\le x\le\frac{\pi}{2}, \qquad f(x)=\sin(x), \qquad f^{-1}(x)=\arcsin(x) $$

The inverse domain is \([-1,1]\), and the inverse range is the selected principal interval. The calculator reports this restriction with the formula instead of claiming that unrestricted sine has an inverse.


How to Interpret the Result

A returned inverse formula means the expression tree was solved structurally, not guessed from sample values. Read the domain, range, and branch cards with the formula because they are part of the inverse result.

When a quadratic, even power, or absolute-value form needs a restriction, use the branch selector to choose the left/decreasing or right/increasing part of the original function.

For rational functions, excluded values tell you where the original function or inverse function is undefined. For square-root functions, the domain note tells you when the expression under the root is valid, and the range note tells you which inverse inputs are allowed.

Candidate results use three strict states. Verified means the candidate is symbolically equivalent to the derived inverse on the stated branch. Rejected includes a concrete composition counterexample. Inconclusive means deterministic probes agreed but did not constitute a symbolic proof.


Common Mistakes and Misconceptions

  • Confusing inverse notation with a reciprocal. \(f^{-1}(x)\) means the inverse function, not \(\frac{1}{f(x)}\).
  • Assuming every function has an inverse. A function must be one-to-one, or its domain must be restricted first.
  • Ignoring domain and range. An inverse formula can look correct but still be invalid for some input values.
  • Expecting a quadratic to have one full inverse over all real numbers. Quadratics need a branch or restricted domain.
  • Forgetting parentheses. Expressions such as \(\frac{2x+1}{x-4}\) and \(2x+\frac{1}{x}-4\) are very different.
  • Using a variable other than \(x\). This calculator expects functions in terms of \(x\).
  • Treating numerical agreement as a proof. This calculator labels numerical-only agreement inconclusive and reserves verified status for symbolic equivalence.
  • Rounding too early. Rounding coefficients or intermediate values can hide small errors, especially in rational expressions and composition checks.

When to Use Inverse Functions

Use inverse functions when you need to:

  • Reverse a known input-output rule.
  • Solve for the original input from a measured output.
  • Check whether two formulas undo each other.
  • Convert between two related quantities.
  • Understand how domain and range switch between a function and its inverse.
  • Decide whether a function needs a restricted domain before it can be inverted.

Limitations and Things to Keep in Mind

This calculator structurally supports affine and linear-fractional rational forms, powers and real roots, quadratics, absolute-value branches, exponentials, logarithms, and principal trigonometric or inverse-trigonometric forms. It also supports nested forms when the variable follows one reversible operation path.

Quadratics, even powers, and absolute values require an explicit left or right branch selection. Sine, cosine, and tangent use the standard principal restrictions shown in the result cards. Arbitrary custom intervals and complex-valued branches are not supported.

Expressions in which the variable occurs along several unsupported nonlinear paths, general piecewise rules, and higher polynomials with several powers return an unsupported result. The calculator does not infer a familiar form merely because an expression matches it at a few numerical points.

Finite coefficients are serialized with an ECMAScript round-trip decimal representation so copied inverse formulas preserve the accepted binary64 coefficients. Candidate verification compares compositions only on the selected function and inverse domains, uses a relative 1e-10 tolerance, and distinguishes symbolic verification, numerical rejection, and inconclusive sampling.

For homework, exams, engineering work, or any setting where the result affects an important decision, verify the algebra and domain restrictions separately.


How to Use This Calculator

  1. Enter a function expression using \(x\) as the variable.
  2. Use standard operations such as \(+\), \(-\), \(*\), \(/\), powers, and parentheses as needed.
  3. If a branch selector appears, choose the restricted original domain you intend to invert.
  4. Optionally enter a candidate inverse expression for symbolic verification or independent composition counterexamples.
  5. Review the status message to see whether the detected form is one-to-one on its natural domain.
  6. Read the inverse result, or the explanation that a domain restriction or branch is needed.
  7. Check the detected form, domain/range notes, solution steps, and composition verification to understand the result.
  8. If you entered a candidate inverse, review its verified, rejected, or inconclusive verdict and any displayed counterexample.
  9. Use any available example buttons for sample inputs, or clear the fields to start over.

Frequently Asked Questions

Why does a function need to be one-to-one to have an inverse?

An inverse reverses outputs back to inputs. If two different inputs give the same output, the inverse would not know which input to return. That would make the inverse fail the definition of a function.


Is \(f^{-1}(x)\) the same as \(\frac{1}{f(x)}\)?

No. \(f^{-1}(x)\) means the inverse function of \(f\). The expression \(\frac{1}{f(x)}\) means the reciprocal of the function value.


Why do quadratics need restricted domains?

A quadratic such as \(x^2\) gives the same output for opposite inputs, such as \(-2\) and \(2\). Restricting the domain to one side of the vertex removes the duplicate outputs and lets you choose a single inverse branch.


What do the candidate verdicts mean?

Verified means symbolic equivalence was established on the stated branch. Rejected means a composition counterexample was found. Inconclusive means numerical probes agreed but a symbolic proof was not available.


Why do domain and range switch for inverse functions?

The outputs of the original function become the inputs of the inverse. Likewise, the inputs of the original function become the outputs of the inverse. That is why the range of \(f\) becomes the domain of \(f^{-1}\), and the domain of \(f\) becomes the range of \(f^{-1}\).


Why did the calculator reject an expression that looks valid?

The expression may be mathematically meaningful but outside the supported inverse-solving families. The calculator focuses on specific algebraic forms, so more general symbolic inverse problems may need manual algebra, graphing, or a computer algebra system.


Sources and References

Books

  1. Jay Abramson. Precalculus 2e. OpenStax, 2021. Sections 1.7 “Inverse Functions” and 3.8 “Inverses and Radical Functions.” Section 1.7 and Section 3.8.
  2. Jay Abramson. College Algebra 2e. OpenStax, 2021. Sections 3.4 “Composition of Functions” and 3.7 “Inverse Functions.” Section 3.4 and Section 3.7.
  3. Gilbert Strang and Edwin “Jed” Herman. Calculus Volume 1. OpenStax, 2016. Section 1.4 “Inverse Functions.” Section 1.4.