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

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)) = xfor everyxin the domain off.f(f^{-1}(y)) = yfor everyyin the domain off^{-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.

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.

Common inverse-function traps and their corrections
Treating f^{-1}(x) as 1/f(x). For the worked function,
f^{-1}(5) = 2, while1/f(5) = 1/(5^2 + 1) = 1/26. An inverse undoes a mapping. A reciprocal divides1by a function value.Ignoring the inverse's domain. The formula
sqrt(x - 1)requiresx >= 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.Assuming a familiar formula is automatically invertible. Test injectivity and coverage of the declared codomain first. Restricting
x^2 + 1tox <= 0would produce the valid inverse branchf^{-1}(x) = -sqrt(x - 1), whose outputs are non-positive.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.
For
g: R -> R, withg(x) = 3x - 5, solvingy = 3x - 5givesg^{-1}(x) = (x + 5)/3. Theng^{-1}(7) = (7 + 5)/3 = 12/3 = 4.For
q: R -> R, letq(x) = kx + 4. An inverse exists exactly whenk != 0. Ifk = 0, every input maps to4; ifk != 0, the inverse isq^{-1}(x) = (x - 4)/k.For the finite map in the first section,
f^{-1}(4) = 3becausef(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:
Declare the domain and codomain.
Test whether the function is one-to-one and onto.
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.
Keep learning

Classification of Finite and Infinite Groups: Orders, Cyclicity and Worked Examples
Learn how group axioms, group order, element order and generators classify finite and infinite groups through complete, checkable examples.

Bipartite, Cycle, Regular and Complement Graphs: Tests, Formulas and a C6 Worked Example
Learn a dependable order for classifying simple graphs, then apply it to C6 and list, count and test every edge in its complement.

Basic Terminologies in Linear Programming: Feasible Solutions, BFS and an Optimal Solution Worked Step by Step
Separate feasible, basic feasible and optimal solutions through geometry, slack variables, vertex enumeration and concise counterexamples.

Assignment Problem and Hungarian Method: Formulation with a Complete Worked Example
Learn why greedy assignment fails, how matrix reductions preserve the optimum, and how the uncovered-value adjustment leads to a minimum cost of 140.