Introduction
Functions can be classified based on how they map elements from the domain to the co-domain. Understanding these types is crucial for function problems in JEE.
One-One (Injective) Function
Definition
A function $f: A \to B$ is one-one (or injective) if different inputs always give different outputs:
$$\boxed{f(x_1) = f(x_2) \Rightarrow x_1 = x_2}$$Equivalently: $x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2)$
Visual Representation
A B
1 ──────► a
2 ──────► b
3 ──────► c
d (unused)
Each element of $B$ has at most one pre-image.
How to Check
Method 1 (Algebraic): Assume $f(x_1) = f(x_2)$ and prove $x_1 = x_2$
Method 2 (Calculus): For differentiable functions, check if $f$ is strictly monotonic:
- $f'(x) > 0$ for all $x$ (strictly increasing) → one-one
- $f'(x) < 0$ for all $x$ (strictly decreasing) → one-one
Method 3 (Horizontal Line Test): Every horizontal line intersects the graph at most once.
Examples
One-one:
- $f(x) = 2x + 3$ (linear with non-zero slope)
- $f(x) = e^x$ (strictly increasing)
- $f(x) = x^3$ (strictly increasing)
Not one-one:
- $f(x) = x^2$ on $\mathbb{R}$ ✗ ($f(-2) = f(2) = 4$)
- $f(x) = \sin(x)$ on $\mathbb{R}$ ✗ ($f(0) = f(\pi) = 0$)
By restricting the domain, a non-injective function can become injective:
- $f(x) = x^2$ on $[0, \infty)$ is one-one
- $f(x) = \sin(x)$ on $[-\frac{\pi}{2}, \frac{\pi}{2}]$ is one-one
Onto (Surjective) Function
Definition
A function $f: A \to B$ is onto (or surjective) if every element of $B$ is an image of some element of $A$:
$$\boxed{\text{Range}(f) = \text{Co-domain } B}$$Equivalently: For every $b \in B$, there exists $a \in A$ such that $f(a) = b$.
Visual Representation
A B
1 ──────► a
2 ──────► b
3 ──────► a
4 ──────► c
Every element of $B$ is “hit” by at least one arrow.
How to Check
Method 1: Find the range and verify it equals the co-domain.
Method 2: For any $y \in B$, solve $f(x) = y$ for $x$. If a solution exists in $A$ for every $y$, then $f$ is onto.
Examples
Onto:
- $f: \mathbb{R} \to \mathbb{R}$, $f(x) = 2x + 3$ (range = $\mathbb{R}$)
- $f: \mathbb{R} \to \mathbb{R}^+$, $f(x) = e^x$ (range = $\mathbb{R}^+$)
Not onto:
- $f: \mathbb{R} \to \mathbb{R}$, $f(x) = x^2$ ✗ (range = $[0, \infty) \neq \mathbb{R}$)
- $f: \mathbb{R} \to \mathbb{R}$, $f(x) = e^x$ ✗ (range = $(0, \infty) \neq \mathbb{R}$)
The same function can be onto or not depending on the co-domain:
- $f(x) = x^2$, $f: \mathbb{R} \to \mathbb{R}$ is NOT onto
- $f(x) = x^2$, $f: \mathbb{R} \to [0, \infty)$ IS onto
Interactive Demo: Visualize Function Types
Plot and explore one-one, onto, and bijective functions.
Bijective Function (One-to-One Correspondence)
Definition
A function is bijective if it is both one-one AND onto:
$$\boxed{\text{Bijective} = \text{Injective} + \text{Surjective}}$$Visual Representation
A B
1 ──────► a
2 ──────► b
3 ──────► c
Perfect matching: each element of $A$ paired with exactly one element of $B$.
Key Property
Only bijective functions have inverses!
If $f: A \to B$ is bijective, then $f^{-1}: B \to A$ exists.
Examples
Bijective:
- $f: \mathbb{R} \to \mathbb{R}$, $f(x) = 2x + 3$ (bijective)
- $f: \mathbb{R}^+ \to \mathbb{R}^+$, $f(x) = x^2$ (bijective)
- $f: \mathbb{R} \to \mathbb{R}$, $f(x) = x^3$ (bijective)
Not bijective:
- $f: \mathbb{R} \to \mathbb{R}$, $f(x) = x^2$ ✗ (not one-one, not onto)
- $f: \mathbb{R}^+ \to \mathbb{R}$, $f(x) = x^2$ ✗ (one-one but not onto)
Summary Diagram
graph TD
F[Functions] --> O[One-One
Injective]
F --> ON[Onto
Surjective]
F --> B[Bijective]
O --> |"Different inputs → Different outputs"| O1[|A| ≤ |B|]
ON --> |"Range = Co-domain"| ON1[|A| ≥ |B|]
B --> |"One-One + Onto"| B1[|A| = |B|
Has inverse]Counting Functions
For finite sets $A$ and $B$ with $|A| = m$ and $|B| = n$:
Total Number of Functions
$$\boxed{\text{Total functions} = n^m}$$Each of $m$ elements can map to any of $n$ elements.
Number of One-One Functions
$$\boxed{\text{One-one functions} = \frac{n!}{(n-m)!} = P(n, m)}$$Valid only when $m \leq n$. (If $m > n$, there are 0 one-one functions.)
Number of Onto Functions
Using inclusion-exclusion:
$$\boxed{\text{Onto functions} = \sum_{r=0}^{n-1} (-1)^r \binom{n}{r}(n-r)^m}$$Valid only when $m \geq n$.
For small cases:
- Onto functions from $m$ to $2$: $2^m - 2$
- Onto functions from $m$ to $3$: $3^m - 3 \cdot 2^m + 3$
Number of Bijective Functions
$$\boxed{\text{Bijective functions} = n!}$$(only when $m = n$)
Summary Table
| Type | Formula | Condition |
|---|---|---|
| All functions | $n^m$ | Always |
| One-one | $\frac{n!}{(n-m)!}$ | $m \leq n$ |
| Onto | $\sum_{r=0}^{n-1} (-1)^r \binom{n}{r}(n-r)^m$ | $m \geq n$ |
| Bijective | $n!$ | $m = n$ |
Example Calculations
Example 1
Problem: Find the number of one-one functions from $\{1, 2, 3\}$ to $\{a, b, c, d, e\}$.
Solution: $m = 3$, $n = 5$
One-one functions = $\frac{5!}{(5-3)!} = \frac{5!}{2!} = \frac{120}{2} = 60$
Example 2
Problem: Find the number of onto functions from $\{1, 2, 3, 4\}$ to $\{a, b\}$.
Solution: $m = 4$, $n = 2$
Onto functions = $2^4 - 2 = 16 - 2 = 14$
(Total functions minus functions that miss one element)
Example 3
Problem: A function $f: \{1, 2, 3, 4, 5\} \to \{1, 2, 3, 4, 5\}$ is both one-one and onto. How many such functions exist?
Solution: Bijective functions = $5! = 120$
JEE Important Points
- For one-one: $|A| \leq |B|$ (can’t have more inputs than outputs)
- For onto: $|A| \geq |B|$ (can’t have more outputs than inputs)
- For bijective: $|A| = |B|$
- Only bijective functions have inverses
- Restricting domain can make a function one-one
- Restricting co-domain can make a function onto
Practice Problems
Check if $f(x) = x^3 - x$ is one-one on $\mathbb{R}$.
Find the number of functions from a set of 4 elements to a set of 3 elements that are onto.
If $f: A \to B$ is one-one and $|A| = |B| = 5$, prove $f$ is onto.