Types of functions — injective, surjective, bijective with Venn diagram examples

medium CBSE JEE-MAIN 4 min read

Question

How do we classify a function as injective (one-one), surjective (onto), or bijective? Given f:RRf: \mathbb{R} \to \mathbb{R} defined by f(x)=2x+3f(x) = 2x + 3, determine its type.

(CBSE 11/12 + JEE Main — theory + application)


Solution — Step by Step

TypeAlso calledConditionVenn diagram idea
InjectiveOne-oneDifferent inputs give different outputs: f(a)=f(b)a=bf(a) = f(b) \Rightarrow a = bNo two arrows land on the same element in codomain
SurjectiveOntoEvery element in codomain is hit: for every yy, there exists xx such that f(x)=yf(x) = yEvery element in codomain has at least one arrow
BijectiveOne-one and ontoBoth injective AND surjectivePerfect pairing — each element maps to exactly one

Assume f(a)=f(b)f(a) = f(b):

2a+3=2b+3    2a=2b    a=b2a + 3 = 2b + 3 \implies 2a = 2b \implies a = b

Since f(a)=f(b)f(a) = f(b) forces a=ba = b, the function is injective (one-one).

For any yRy \in \mathbb{R}, we need to find xx such that f(x)=yf(x) = y:

2x+3=y    x=y322x + 3 = y \implies x = \frac{y - 3}{2}

Since y32R\frac{y-3}{2} \in \mathbb{R} for every yRy \in \mathbb{R}, every element in the codomain is achieved. The function is surjective (onto).

Since f(x)=2x+3f(x) = 2x + 3 is both injective and surjective, it is bijective.

A bijective function has an inverse: f1(y)=y32f^{-1}(y) = \frac{y - 3}{2}.

flowchart TD
    A["Given function f: A → B"] --> B["Test Injective: Does f(a)=f(b) imply a=b?"]
    B -- Yes --> C["Function is One-One"]
    B -- No --> D["Function is Many-One"]
    A --> E["Test Surjective: Is range = codomain?"]
    E -- Yes --> F["Function is Onto"]
    E -- No --> G["Function is Into"]
    C --> H{"Both One-One AND Onto?"}
    F --> H
    D --> I["Not Bijective"]
    G --> I
    H -- Yes --> J["BIJECTIVE — inverse exists"]
    H -- No --> K["One-One but not Onto, or vice versa"]

Why This Works

Injectivity ensures no information is lost — every output traces back to a unique input. Surjectivity ensures nothing in the codomain is “wasted” — every element gets mapped to. Together (bijection), they guarantee a perfect one-to-one correspondence, which is exactly when an inverse function exists.

For f(x)=2x+3f(x) = 2x + 3, it is a straight line with non-zero slope. Geometrically, any horizontal line cuts the graph at exactly one point (injective), and the line extends infinitely in both directions covering all of R\mathbb{R} (surjective).


Alternative Method

Horizontal Line Test (graphical method):

  • If every horizontal line intersects the graph at most once, the function is injective.
  • If every horizontal line intersects the graph at least once, the function is surjective.
  • If every horizontal line intersects exactly once, it is bijective.

For JEE Main, pay close attention to the domain and codomain. The function f(x)=x2f(x) = x^2 is NOT injective from RR\mathbb{R} \to \mathbb{R} (since f(2)=f(2)f(2) = f(-2)), but it IS injective from [0,)R[0, \infty) \to \mathbb{R}. The classification depends on the sets, not just the formula.


Common Mistake

Students confuse “range” with “codomain.” A function is surjective when range = codomain. For f:RRf: \mathbb{R} \to \mathbb{R} given by f(x)=x2f(x) = x^2, the range is [0,)[0, \infty) which is NOT all of R\mathbb{R}. So it is NOT surjective. But if we redefine the codomain as f:R[0,)f: \mathbb{R} \to [0, \infty), then the same formula becomes surjective. Always check what codomain is given in the question.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next