1. Algebra — Relations and Functions

Onto functions

An onto function (surjection) is a mapping where every element in the codomain possesses at least one pre-image in the domain, meaning the range equals the codomain. This topic covers surjectivity testing via range analysis, critical points, and degree arguments.

For: UP PGT Mathematics UP TGT Mathematics DSSSB PGT / TGT KVS / NVS PGT LT Grade
📖 Topic progress
○ Mark as complete

Definition and statement

Definition and Characterization of Onto Functions (Surjections)
A function $f: A \to B$ is said to be onto (or surjective) if and only if \forall y \in B, \exists x \in A \text{ such that } f(x) = y$. Equivalently, the range of $f$, denoted as $f(A)$, is identical to the codomain $B$

📐 Geometric Interpretation

Geometrically, a function $f: \mathbb{R} \to \mathbb{R}$ is onto if and only if every horizontal line $y = k$ (where $k \in B$) intersects the graph $y = f(x)$ at least once.

⚙️ Algebraic & Structural Meaning

Algebraically, surjectivity guarantees the right-invertibility of functions and establishes cardinality inequalities between domain and codomain for finite sets: $|A| \ge |B|$.

Conditions and hypotheses

Check each condition and what changes when it is omitted:

Hypothesis / Condition Domain / Interval Necessity What Fails If Condition Dropped
Codomain Explicit Specification Set $B$ (Codomain) Strictly Mandatory / Necessary Without a specified codomain, surjectivity is mathematically indeterminate, as a function is defined by its domain, codomain, and rule of assignment.
Continuity for Connected Intervals Continuous on $[a, b]$ Essential for Intermediate Value Property Discontinuous functions can skip values in their range, failing surjectivity even if bounds are spanned.
Range-Codomain Equality Image Set $f(A) = B$ Strictly Mandatory If the range is a strict subset of the codomain ($f(A) \subset B$), the function is into, not onto.

Useful results and shortcuts

Use these identities and results when their conditions apply:

01

Polynomial Degree Parity Rule

$$ \text{For } f: \mathbb{R} \to \mathbb{R}, \text{ polynomial of odd degree } \implies \text{ always onto.} $$

Rule: Any polynomial function of odd degree with real coefficients has range $\mathbb{R}$, hence it is always onto from $\mathbb{R}$ to $\mathbb{R}$.

Application: Use this to instantly identify onto polynomials without limit calculus.
02

Bounded Range Elimination for Even Degree

$$ \text{For } f: \mathbb{R} \to \mathbb{R}, \text{ polynomial of even degree } \implies \text{ never onto.} $$

Rule: Even degree polynomials have a global maximum or minimum, meaning their range is bounded below or above. Thus, they can never map $\mathbb{R}$ onto $\mathbb{R}$.

Application: Directly eliminates wrong options in TGT/PGT matching questions.
03

Surjectivity via Range Bounds ($y = f(x)$)

$$ \text{Solve } x \text{ in terms of } y \text{ and find domain of } y. $$

Rule: Express $x$ as a function of $y$. The set of all valid $y$ values for which real $x$ exists is the exact range. If Range = Codomain, it is onto.

Application: Standard methodology for rational and algebraic functions in DSSSB and KVS PGT.
04

Monotonic Continuous Functions on Closed Intervals

$$ \text{If } f: [a, b] \to [f(a), f(b)] \text{ is strictly monotonic, it is onto.} $$

Rule: A strictly increasing or decreasing continuous function on $[a,b]$ automatically covers every value between $f(a)$ and $f(b)$.

05

Finite Set Cardinality Test

$$ \text{If } |A| < |B|, \text{ then no function } f: A \to B \text{ can be onto.} $$

Rule: If the domain has fewer elements than the codomain, pigeonhole principle dictates that surjectivity is impossible.

Application: Quick elimination rule for discrete mathematics and relation-function set questions.
06

Exponential and Logarithmic Range Check

$$ f: \mathbb{R} \to (0, \infty), f(x) = e^x \implies \text{Onto.} $$

Rule: Check if the codomain matches the natural output bounds of transcendental functions (e.g., exponential range is strictly positive).

Application: Commonly framed with modified codomains to trick candidates.

Common errors and counterexamples

These examples show how a conclusion can fail when a condition is missing:

⚠️ COMMON ERROR #01

Ignoring the Codomain Specification

Common Pitfall: Candidates assume $f(x) = x^2$ is onto because 'all positive numbers are covered', forgetting to check if the codomain given is $\mathbb{R}$ or $[0, \infty)$.

Counterexample: $f: \mathbb{R} \to \mathbb{R}, f(x) = x^2$

Why it fails: Range is $[0, \infty)$, which is a proper subset of codomain $\mathbb{R}$. Negative real numbers have no pre-image.

🛡️ Exam Defense: Always examine the exact codomain set stated on the right side of $f: A \to B$ before judging surjectivity.
⚠️ COMMON ERROR #02

Assuming Continuous Range equals Codomain

Common Pitfall: Assuming that because a function goes to $\infty$ and $-\infty$, its range is all of $\N$ or $\mathbb{R}$ without checking for gaps or domain restrictions.

Counterexample: $f: \mathbb{R} \setminus \{0\} \to \mathbb{R}, f(x) = \frac{1}{x}$

Why it fails: The value $y = 0$ has no pre-image in the domain $\mathbb{R} \setminus \{0\}$, so range is $\mathbb{R} \setminus \{0\} \neq \text{Codomain } \mathbb{R}$.

🛡️ Exam Defense: Find the inverse function $x = g(y)$ and determine its domain of definition to find the true range.

Comparison

Concept / TheoremHypotheses / AssumptionsKey Formula / OutcomeGeometric MeaningExam Identification Clue
One-to-One (Injectivity)$f(a) = f(b) \implies a = b$$f'(x)$ strictly of one signHorizontal line intersects graph at most onceStrictly monotonic functions
Onto (Surjectivity)Range = Codomain ($f(A) = B$)$\forall y \in B, \exists x \in A$Horizontal line intersects graph at least onceOdd degree polynomials, unbounded range
Bijective (One-to-One & Onto)Both injective and surjectiveInvertible function $f^{-1}$ existsHorizontal line intersects graph exactly onceStrictly monotonic on $\mathbb{R}$ with range $\mathbb{R}$
Into FunctionRange is a proper subset of Codomain$f(A) \subset B, f(A) \neq B$At least one horizontal line misses the graphEven degree polynomials with codomain $\mathbb{R}$

Solved examples

Each problem includes a full solution and a shorter method:

CANONICAL PROBLEM 01 Dual-Method Breakdown

Determine whether the function $f: \mathbb{R} \to \mathbb{R}$ defined by $f(x) = x^3 - 3x^2 + 5x - 2$ is injective, surjective, both, or neither.

(A) One-to-one and onto(B) One-to-one but not onto(C) Onto but not one-to-one(D) Neither one-to-one nor onto
✓ Correct Answer: (A)
📚 Method A: Formal Textbook Derivation
Step 1: Check derivative $f'(x) = 3x^2 - 6x + 5 = 3(x-1)^2 + 2 > 0$ for all $x \in \mathbb{R}$. Step 2: Since $f'(x) > 0$ everywhere, $f$ is strictly increasing, hence injective. Step 3: As $x \to \infty, f(x) \to \infty$ and as $x \to -\infty, f(x) \to -\infty$. By Intermediate Value Theorem and continuity, range is $\mathbb{R}$, hence onto.
⚡ Method B: 25-Second Exam Shortcut
Cubic polynomial with positive discriminant of derivative is strictly monotonic and spans $\mathbb{R}$, directly yielding a bijection.
💡 Tip: For cubic polynomials, always check $f'(x)$ using discriminant $b^2 - 4ac$. If $< 0$, the polynomial is strictly monotonic and thus bijective.
CANONICAL PROBLEM 02 Dual-Method Breakdown

Let $f: [0, \infty) \to [0, 1)$ be defined as $f(x) = \frac{x}{1+x}$. Then $f$ is:

(A) Surjective only(B) Injective only(C) Bijective(D) Neither injective nor surjective
✓ Correct Answer: (C)
📚 Method A: Formal Textbook Derivation
Step 1: Injectivity: Let $f(a) = f(b) \implies \frac{a}{1+a} = \frac{b}{1+b} \implies a+ab = b+ab \implies a=b$. Injectivity confirmed. Step 2: Surjectivity: Let $y = \frac{x}{1+x} \implies y + yx = x \implies x(1-y) = y \implies x = \frac{y}{1-y}$. For $y \in [0, 1)$, $x \ge 0$, which matches domain. Range equals codomain $[0, 1)$, hence surjective.
⚡ Method B: 25-Second Exam Shortcut
Rearrange to $x = \frac{y}{1-y}$. Observe that as $y$ ranges over $[0, 1)$, $x$ ranges over $[0, \infty)$. Perfect match confirms bijection.
💡 Tip: For rational functions mapping intervals, finding the inverse formula $x = g(y)$ is the fastest way to verify both range and injectivity simultaneously.

Practice questions

Choose an answer to check it and see the solution:

Q1
MCQ 1: The function $f: \mathbb{R} \to \mathbb{R}$ defined by $f(x) = |x|$ is:
A One-to-one and onto
B One-to-one but not onto
C Onto but not one-to-one
D Neither one-to-one nor onto
Derivation & Analysis:

Since $f(-1) = f(1) = 1$, $f$ is not one-to-one. Range is $[0, \infty) \neq \text{Codomain } \mathbb{R}$, so it is not onto. Thus, neither.

Q2
MCQ 2: Which of the following functions $f: \mathbb{R} \to \mathbb{R}$ is onto?
A $f(x) = x^2$
B $f(x) = e^x$
C $f(x) = x^3 - x$
D $f(x) = \frac{1}{x^2+1}$
Derivation & Analysis:

$f(x) = x^3 - x$ is an odd-degree polynomial with real coefficients, hence its range is $\mathbb{R}$, making it onto. Others have restricted ranges.

Q3
MCQ 3: Let $A = \{1, 2, 3\}$ and $B = \{4, 5\}$. The number of onto functions from $A$ to $B$ is:
A 6
B 8
C 14
D 9
Derivation & Analysis:

Total functions = $2^3 = 8$. Functions missing element 4: 1 function ($f(x) = 5$). Functions missing element 5: 1 function ($f(x) = 4$). Onto functions = $8 - 2 = 6$ (or using formula $2^3 - \binom{2}{1}(1)^3 = 8 - 2 = 6$).

Q4
MCQ 4: If $f: [1, \infty) \to [1, \infty)$ is defined by $f(x) = 2^{x(x-1)}$, then $f$ is:
A Injective only
B Surjective only
C C) Bijective
D Neither
Derivation & Analysis:

For $x \ge 1$, $x(x-1) \ge 0$, making $2^{x(x-1)} \ge 1$. As $x$ increases from $1$ to $\infty$, $x(x-1)$ goes from $0$ to $\infty$, so range is $[1, \infty)$ (Onto). Also strictly increasing for $x \ge 1$ (Injective). Hence bijective.

Q5
MCQ 5: The function $f: \mathbb{Z} \to \mathbb{Z}$ given by $f(x) = x + 2$ is:
A Onto but not one-to-one
B One-to-one but not onto
C Bijective
D Neither one-to-one nor onto
Derivation & Analysis:

For any $y \in \mathbb{Z}$, $x = y - 2 \in \mathbb{Z}$ such that $f(x) = y$ (Onto). If $x_1 + 2 = x_2 + 2 \implies x_1 = x_2$ (One-to-one). Hence bijective.

Q6
MCQ 6: Let $f(x) = \frac{x-2}{x-3}$. Then $f: \mathbb{R} \setminus \{3\} \to \mathbb{R} \setminus \{1\}$ is:
A Onto
B Into
C Many-one
D Not a function
Derivation & Analysis:

Let $y = \frac{x-2}{x-3} \implies yx - 3y = x - 2 \implies x(y-1) = 3y - 2 \implies x = \frac{3y-2}{y-1}$. For any $y \in \mathbb{R} \setminus \{1\}$, $x$ is well-defined and $x \neq 3$. Thus range equals codomain, so $f$ is onto.

Q7
MCQ 7: If $f: \mathbb{R} \to \mathbb{R}$ is defined by $f(x) = \sin x$, then $f$ is:
A Onto
B Into
C Bijective
D One-to-one
Derivation & Analysis:

The range of $f(x) = \sin x$ is $[-1, 1]$, which is a proper subset of the codomain $\mathbb{R}$. Therefore, it is an into function (not onto).

Q8
MCQ 8: The number of surjective functions from a set of 4 elements to a set of 3 elements is:
A 36
B 14
C 24
D 81
Derivation & Analysis:

Using the formula for onto functions from set of size $m$ to size $n$: $\sum_{k=0}^{n} (-1)^{n-k} \binom{n}{k} k^m = \binom{3}{3}3^4 - \binom{3}{2}2^4 + \binom{3}{1}1^4 = 81 - 48 + 3 = 36$.

Q9
MCQ 9: Consider the function $f: [0, 1] \to [0, 1]$ defined by $f(x) = x^2$. This function is:
A Onto only
B One-to-one only
C Bijective
D Neither one-to-one nor onto
Derivation & Analysis:

Range of $f(x) = x^2$ on $[0,1]$ is $[0,1]$, which equals the codomain, so it is onto. Wait, $f(x) = x^2$ on $[0,1]$: for $y \in [0,1]$, $x = \sqrt{y} \in [0,1]$. Thus range equals codomain. Also injective ($x_1^2 = x_2^2 \implies x_1 = x_2$ since $x \ge 0$). Thus it is Bijective. Option C is mathematically correct.

Q10
MCQ 10: If $f: \mathbb{R} \to \mathbb{R}$ is a polynomial function such that $f(x) = a_n x^n + \dots + a_0$ with $a_n \neq 0$, then $f$ is guaranteed to be onto if:
A $n$ is even
B $n$ is odd
C $a_n > 0$
D $a_n < 0$
Derivation & Analysis:

Polynomials of odd degree have limits $\pm \infty$ as $x \to \pm \infty$ respectively, and being continuous, their intermediate value property ensures they cover all real numbers $\mathbb{R}$. Thus odd degree guarantees surjectivity onto $\mathbb{R}$.

Common questions

Express $x$ in terms of $y$ ($y = f(x)$). The domain of the resulting inverse expression gives the exact range of $f$. If this range matches the given codomain, the function is onto.

Candidates forget that standard trigonometric functions like $\sin x$ or $\cos x$ have restricted ranges $[-1, 1]$. Unless the codomain is explicitly defined as $[-1, 1]$, they are into, not onto.

No. Even degree polynomials always possess an absolute extremum (maximum or minimum), meaning their range is bounded on one side and can never cover the entire codomain $\mathbb{R}$.