Inverse of a Function: Definition, Existence Conditions and Worked Examples

Learn when an inverse function exists, how domain restrictions make a rule invertible, and how to derive and verify the inverse of a quadratic step by step.

KnowledgeGate Team

Exam prep & CS education

Updated 22 Sep 20266 min read

Reversing the arrows of a relation is easy, but the reversed relation is not always a function. That is where many learners confuse an inverse with a reciprocal or find a formula without checking whether it is valid. An inverse differs from a reciprocal, exists exactly under stated conditions, and can be verified using a restricted quadratic.

Related reading: Bijective functions and Function composition.

What an inverse function actually does

An inverse function undoes the action of the original function. If f(a) = b, then f^{-1}(b) = a. The domain and codomain exchange roles: if f: A -> B is invertible, then f^{-1}: B -> A.

The two identity checks are:

  • f^{-1}(f(x)) = x for every x in the domain of f.

  • f(f^{-1}(y)) = y for every y in the domain of f^{-1}.

Take A = {1, 2, 3} and B = {4, 5, 6}. If f(1) = 5, f(2) = 6, and f(3) = 4, reversing the pairs gives f^{-1}(5) = 1, f^{-1}(6) = 2, and f^{-1}(4) = 3. This works because every value has one partner in each direction. In relations and functions, reversed ordered pairs form a relation, but form an inverse function only under stricter conditions.

Use Definition of a Function: Domain, Codomain, Range and Count for the underlying function test and set vocabulary. Inverse questions start from a valid function and ask whether reversing its ordered pairs still assigns exactly one output to every new input.

Mapping diagrams for A = {1, 2, 3} and B = {4, 5, 6}: f sends 1 to 5, 2 to 6 and 3 to 4, while f inverse reverses every arrow.

The exact existence condition: bijection

For a declared function f: A -> B, an inverse function f^{-1}: B -> A exists on all of B if and only if f is bijective. A bijection has two properties:

  • Injective: no two distinct inputs have the same output.

  • Surjective: every value in the declared codomain is reached.

Both conditions matter. For h: R -> [0, infinity), with h(x) = x^2, injectivity fails because h(2) = h(-2) = 4. After reversal, input 4 would have two possible outputs, so the reverse is not a function.

For p: R -> R, with p(x) = e^x, the rule is injective, but it never reaches 0 or a negative number. It therefore has no inverse on all of R. It does have an inverse on its image (0, infinity).

This gives a useful refinement: every injective function has an inverse on its image. Domain restrictions and codomain choices are part of the function, not decorative labels.

Use Functions in Discrete Mathematics for classifications, counting, and composition. Inverse questions begin one step later: test bijectivity, reverse the mapping, and verify both compositions.

Use Bijective Function: Definition, Count and Properties for a full bijection test and counting methods. Once a map passes those tests, inverse work swaps its input and output sets, derives the reverse rule, and states the new domain.

Worked example: restrict a quadratic, derive the inverse, and prove it

Consider

f: [0, infinity) -> [1, infinity), where f(x) = x^2 + 1.

First prove injectivity. Suppose f(a) = f(b). Then

a^2 + 1 = b^2 + 1

so a^2 = b^2. Since a and b are both non-negative, each is the unique non-negative square root of that common value. Therefore a = b, and f is injective.

Now prove surjectivity. Take any y >= 1 in the codomain and choose

x = sqrt(y - 1).

Because y >= 1, this x is real and non-negative. Substitution gives

f(x) = (sqrt(y - 1))^2 + 1 = y - 1 + 1 = y.

Every codomain value is reached, so f is surjective. It is therefore bijective.

To derive the inverse, begin with y = x^2 + 1. Then

x^2 = y - 1

and the original domain x >= 0 selects x = sqrt(y - 1). After swapping variable labels,

f^{-1}(x) = sqrt(x - 1) for x >= 1, with outputs in [0, infinity).

The algebra verifies both directions. For x >= 0,

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

For y >= 1,

f(f^{-1}(y)) = (sqrt(y - 1))^2 + 1 = y.

The values agree too: f(3) = 10 and f^{-1}(10) = 3; also, f^{-1}(5) = 2 and f(2) = 5. Without the restriction, f: R -> [1, infinity) would satisfy f(2) = f(-2) = 5, so it would not have an inverse function.

Read the inverse on a graph

The graphs of y = f(x) and y = f^{-1}(x) are reflections across the line y = x. Reversing input and output turns each point (a, b) into (b, a). This reflection is the graphical form of exchanging input and output. For the worked rule, (0, 1) reflects to (1, 0), (2, 5) to (5, 2), and (3, 10) to (10, 3).

The horizontal-line test checks injectivity graphically. The full parabola y = x^2 + 1 fails because the line y = 5 meets it at x = -2 and x = 2. The restricted branch x >= 0 meets each horizontal line in its range exactly once, so that branch can be inverted.

Graph of y = x squared + 1 for x >= 0 with its inverse y = square root of x minus 1, mirrored across the dashed line y = x.

Common inverse-function traps and their corrections

  1. Treating f^{-1}(x) as 1/f(x). For the worked function, f^{-1}(5) = 2, while 1/f(5) = 1/(5^2 + 1) = 1/26. An inverse undoes a mapping. A reciprocal divides 1 by a function value.

  2. Ignoring the inverse's domain. The formula sqrt(x - 1) requires x >= 1, exactly the range of the original function. State the inverse as a complete function, including its domain and output set. Both sets are part of the answer.

  3. Assuming a familiar formula is automatically invertible. Test injectivity and coverage of the declared codomain first. Restricting x^2 + 1 to x <= 0 would produce the valid inverse branch f^{-1}(x) = -sqrt(x - 1), whose outputs are non-positive.

  4. Checking only one composition or one convenient value. Numerical substitutions catch simple errors, but they are not a proof. Both algebraic identities must hold across their stated domains.

How exams test inverse functions

Four recurring forms are: decide whether an inverse exists, derive it algebraically, choose a domain restriction, or evaluate a composition or inverse value.

  1. For g: R -> R, with g(x) = 3x - 5, solving y = 3x - 5 gives g^{-1}(x) = (x + 5)/3. Then g^{-1}(7) = (7 + 5)/3 = 12/3 = 4.

  2. For q: R -> R, let q(x) = kx + 4. An inverse exists exactly when k != 0. If k = 0, every input maps to 4; if k != 0, the inverse is q^{-1}(x) = (x - 4)/k.

  3. For the finite map in the first section, f^{-1}(4) = 3 because f(3) = 4.

Practise inverse-function questions only after you can justify bijectivity without guessing. Related set-and-relation questions reinforce the same mapping checks, while mixed tests add time pressure. Confirm the current syllabus and question format on the current organising institute's official site.

The short version and next step

Use this three-step decision rule:

  1. Declare the domain and codomain.

  2. Test whether the function is one-to-one and onto.

  3. Reverse the rule, state the inverse's domain, and verify both compositions.

A bijection has an inverse on its whole codomain. Injectivity alone gives an inverse only on the image. Use the GATE category to place this topic in your wider preparation, then study it systematically in the Engineering Mathematics course. Before attempting a practice set on functions, redo the restricted quadratic from memory, including both domains.