A function can be thought of as a machine that takes an input and produces a unique output. But how does this machine map its inputs to its outputs? Does every possible output get produced? Does any output get produced by more than one input? Answering these questions allows us to classify functions into distinct categories, which is crucial for understanding more advanced concepts like inverse functions and calculus.
{KEY: type=concept | title=The Four Fundamental Mappings | text=Every function f: A → B can be classified into one of four types based on how elements from the domain A are mapped to the codomain B. This classification depends on two independent properties: whether the mapping is one-to-one or many-to-one, and whether it is onto or into.}
| Mapping Type | Description | Diagrammatic Representation |
|---|---|---|
| One-one & Onto (Bijective) | Every element in B has exactly one pre-image in A. | A → B (Perfect pairing) |
| One-one & Into (Injective) | Every element in B has at most one pre-image in A. Some elements in B may have no pre-image. | A → B (Some in B are left out) |
| Many-one & Onto (Surjective) | Every element in B has at least one pre-image in A. Some elements in B have multiple pre-images. | A → B (All of B is covered, some by multiple arrows) |
| Many-one & Into | Some elements in B have multiple pre-images, and some have no pre-image at all. | A → B (The "messiest" case) |
Understanding these classifications is not just an academic exercise. In computer science, a bijective function is like a perfect encryption key—each plaintext has a unique ciphertext, and every possible ciphertext can be decrypted back to a unique plaintext. In contrast, a many-to-one function is like a hash function (e.g., MD5, SHA-256) where multiple different inputs (like files or passwords) can produce the same output hash, but you can't go backward.
One-to-One (Injective) vs. Many-to-One Functions
This classification focuses on the uniqueness of inputs for each output.
One-one Function (Injection)
A function f: A → B is called one-to-one or injective if different elements in the domain A have different images in the codomain B.
In simple terms, no two inputs map to the same output.
- Analytical Definition:
f(x₁) = f(x₂) ⇒ x₁ = x₂for allx₁, x₂inA. Alternatively,x₁ ≠ x₂ ⇒ f(x₁) ≠ f(x₂) - Calculus Method: If the function
f(x)is differentiable, it is one-one on an interval if it is strictly monotonic on that interval. This meansf'(x) > 0(strictly increasing) orf'(x) < 0(strictly decreasing) for allxin the interval. - Graphical Method: Horizontal Line Test. A function is one-one if and only if no horizontal line intersects its graph more than once.
Many-one Function
A function f: A → B is called many-to-one if there exist at least two distinct elements in the domain A which have the same image in B.
It's the logical opposite of a one-one function. If a function is not one-one, it must be many-one.
- Analytical Definition: There exist
x₁, x₂inAsuch thatx₁ ≠ x₂butf(x₁) = f(x₂). - Examples:
f(x) = x²: Here,f(-2) = 4andf(2) = 4. Different inputs (-2 and 2) lead to the same output (4).f(x) = |x|:f(-3) = 3andf(3) = 3.f(x) = sin(x):sin(0) = 0,sin(π) = 0,sin(2π) = 0.
{{VISUAL: diagram: Two arrow diagrams side-by-side. The left diagram shows a one-one function from set A={1,2,3} to B={a,b,c,d}, with 1→a, 2→c, 3→b. The right diagram shows a many-one function from A={1,2,3} to B={a,b}, with 1→a, 2→a, 3→b.}}
{CALLOUT: type=exam | text=For JEE, the calculus method is a powerful shortcut. If you can quickly find the derivative and check its sign, you can determine injectivity much faster than using the algebraic f(x₁) = f(x₂) method, especially for complex polynomial, trigonometric, or exponential functions.}
Onto (Surjective) vs. Into Functions
This classification focuses on the coverage of the codomain.
Onto Function (Surjection)
A function f: A → B is called onto or surjective if every element in the codomain B is the image of at least one element in the domain A.
In simpler terms, the function "covers" the entire codomain. No element in the codomain is left unused.
- Analytical Definition: The Range of the function is equal to its Codomain.
Range(f) = Codomain(f)
- Method to Check:
- Let
ybe an arbitrary element in the codomainB. - Put
f(x) = y. - Solve the equation for
xin terms ofy. - If for every value of
yin the codomainB, you can find a corresponding value ofxin the domainA, the function is onto.
- Let
Into Function
A function f: A → B is called into if there exists at least one element in the codomain B which is not the image of any element in the domain A.
It's the logical opposite of an onto function.
- Analytical Definition: The Range of the function is a proper subset of its Codomain.
Range(f) ⊂ Codomain(f)andRange(f) ≠ Codomain(f).
{{VISUAL: diagram: Two arrow diagrams side-by-side. The left diagram shows an onto function from set A={1,2,3,4} to B={a,b}, with 1→a, 2→a, 3→b, 4→b. The right diagram shows an into function from A={1,2,3} to B={a,b,c,d}, with 1→a, 2→c, 3→a. Elements 'b' and 'd' in B are not images.}}
Bijective Function (One-one and Onto)
A function that is both injective (one-one) and surjective (onto) is called a bijective function or a one-to-one correspondence. These functions create a perfect pairing between the elements of the domain and the codomain.
- Importance: A function
f: A → Bhas an inverse functionf⁻¹: B → Aif and only iffis bijective. This is a critical concept for many areas of mathematics.
Solved Examples
Let's apply these concepts to some problems.
Example 1: Linear Function
Given: A function f: R → R defined by f(x) = 3x + 5.
To Find: Determine if f(x) is one-one, many-one, onto, or into.
Solution:
-
Check for One-one / Many-one: Let
x₁, x₂be two elements in the domainRsuch thatf(x₁) = f(x₂).3x₁ + 5 = 3x₂ + 5 -
Subtracting 5 from both sides gives:
3x₁ = 3x₂ -
Dividing by 3 gives:
x₁ = x₂Since
f(x₁) = f(x₂)impliesx₁ = x₂, the function is one-one (injective). -
Check for Onto / Into: Let
ybe an arbitrary element in the codomainR. We setf(x) = y.y = 3x + 5 -
Now, we solve for
xin terms ofy.x = (y - 5) / 3 -
For any real number
yin the codomainR, the value(y - 5) / 3is also a real number, which is in the domainR. This means every element in the codomain has a pre-image. Therefore, Range = Codomain (R). The function is onto (surjective).
Final Answer: The function f(x) = 3x + 5 is one-one and onto, so it is a bijective function.
Example 2: Quadratic Function
Given: A function f: R → R defined by f(x) = x² + 2.
To Find: Classify the function.
Solution:
-
Check for One-one / Many-one: Let's test two distinct inputs. Consider
x₁ = -1andx₂ = 1.f(-1) = (-1)² + 2 = 1 + 2 = 3f(1) = (1)² + 2 = 1 + 2 = 3 -
We found two distinct inputs, -1 and 1, that map to the same output, 3. Since
-1 ≠ 1butf(-1) = f(1), the function is many-one. -
Check for Onto / Into: The codomain is given as
R(all real numbers). Let's find the range off(x). We know that for any real numberx,x² ≥ 0.x² + 2 ≥ 0 + 2f(x) ≥ 2 -
The range of the function is
[2, ∞). The codomain isR. Since[2, ∞)is a proper subset ofR, the Range ≠ Codomain. For example,y = 0is in the codomain but there is no realxsuch thatx² + 2 = 0. Therefore, the function is into.
Final Answer: The function f(x) = x² + 2 from R to R is many-one and into.
Example 3: Rational Function
Problem: Check if the function f: R - {-2} → R - {1} defined by f(x) = (x - 3) / (x + 2) is bijective.
Let's use the whiteboard to break this down step-by-step. This type of problem, with restricted domains and codomains, is very common in JEE. We need to be careful with our algebraic manipulation.
{{SOLVE: {"problem":"Check if f: R - {-2} → R - {1} defined by f(x) = (x - 3) / (x + 2) is bijective.","type":"derivation","subject":"math","intro":"Chalo, isse whiteboard pe solve karte hain. We need to check for injectivity and surjectivity separately.","outro":"So, the function is both one-one and onto. Therefore, it is bijective. Got it? Ab class mein wapas chalte hain.","steps":[{"explanation":"First, let's check for injectivity (one-one). We'll assume f(x₁) = f(x₂) and prove that x₁ must be equal to x₂.","write":"Check Injectivity: Assume f(x₁) = f(x₂).","tough":false},{"explanation":"Now, we substitute the function definition for x₁ and x₂.","write":"(x₁ - 3) / (x₁ + 2) = (x₂ - 3) / (x₂ + 2)","tough":false},{"explanation":"Let's cross-multiply to remove the denominators. Be careful with the expansion.","write":"(x₁ - 3)(x₂ + 2) = (x₂ - 3)(x₁ + 2)","tough":true,"alt_explanation":"We are multiplying the numerator of the left side with the denominator of the right, and vice versa."},{"explanation":"Now, we expand both sides of the equation.","write":"x₁x₂ + 2x₁ - 3x₂ - 6 = x₂x₁ + 2x₂ - 3x₁ - 6","tough":false},{"explanation":"The terms x₁x₂ and -6 appear on both sides, so they cancel out.","write":"2x₁ - 3x₂ = 2x₂ - 3x₁","tough":false},{"explanation":"Let's group the x₁ terms on one side and the x₂ terms on the other.","write":"2x₁ + 3x₁ = 2x₂ + 3x₂","tough":false},{"explanation":"Simplifying this gives us the final result for injectivity.","write":"5x₁ = 5x₂ ⇒ x₁ = x₂. So, f is one-one.","tough":false},{"explanation":"Next, let's check for surjectivity (onto). We'll set y = f(x) and try to express x in terms of y.","write":"Check Surjectivity: Let y = (x - 3) / (x + 2)","tough":false},{"explanation":"Our goal is to isolate x. First, multiply both sides by (x+2).","write":"y(x + 2) = x - 3","tough":false},{"explanation":"Expand the left side and gather all terms containing x on one side.","write":"yx + 2y = x - 3 ⇒ yx - x = -2y - 3","tough":true,"alt_explanation":"Move the 'x' term to the left and the '2y' term to the right, changing their signs."},{"explanation":"Factor out x on the left side to isolate it.","write":"x(y - 1) = -2y - 3","tough":false},{"explanation":"Finally, divide by (y - 1) to solve for x.","write":"x = (-2y - 3) / (y - 1) = (2y + 3) / (1 - y)","tough":true,"alt_explanation":"We divided by (y-1). Notice we also multiplied the numerator and denominator by -1 for a cleaner look."},{"explanation":"Now, we analyze this expression for x. The only value of y that makes x undefined is y = 1. But the codomain is R - {1}, so y can never be 1.","write":"For every y in R - {1}, x is a real number.","tough":false},{"explanation":"We also need to ensure that the x we found is never -2 (the value excluded from the domain). If x = -2, then (2y+3)/(1-y) = -2, which gives 2y+3 = -2+2y, or 3=-2, a contradiction. So x is never -2.","write":"x = (2y+3)/(1-y) is always in the domain R - {-2}.","tough":true,"alt_explanation":"So, for any y in the codomain, we can always find a valid x in the domain. This proves the function is onto."},{"explanation":"Since the function is both one-one and onto, it is bijective.","write":"f is injective and surjective. Hence, f is bijective.","tough":false}]}}}
Example 4: Trigonometric Function
Given: A function f: [0, π] → [-1, 1] defined by f(x) = cos(x).
To Find: Classify the function.
Solution:
-
Check for One-one / Many-one: We can use the calculus method.
f'(x) = -sin(x) -
In the interval
(0, π),sin(x)is always positive. Therefore,f'(x) = -sin(x)is always negative (< 0) in(0, π). -
Since
f'(x) < 0, the function is strictly decreasing on the interval[0, π]. A strictly monotonic function is always one-one (injective). -
Check for Onto / Into: The codomain is given as
[-1, 1]. We need to find the range ofcos(x)forxin[0, π]. -
As
xvaries from0toπ, the value ofcos(x)starts atcos(0) = 1, decreases, and ends atcos(π) = -1. The function covers all values between -1 and 1, inclusive.Range(f) = [-1, 1] -
Since Range = Codomain (
[-1, 1]), the function is onto (surjective).
Final Answer: The function f(x) = cos(x) on the given domain and codomain is bijective.
Tips & Tricks for Classification
| Tip | Description | Example |
|---|---|---|
| 1. Use Derivatives | For differentiable functions, check the sign of f'(x). If f'(x) is always positive or always negative in the domain, the function is one-one. | For f(x) = x³ - 3x² + 6x, f'(x) = 3x² - 6x + 6 = 3(x-1)² + 3 > 0. Always positive, so f(x) is one-one. |
| 2. Master Range Finding | The check for onto/into is always about comparing the range with the codomain. Get very good at finding the range of different types of functions. | For f: R → R, f(x) = 1/(x²+1). The range is (0, 1]. Since (0, 1] ≠ R, it is into. |
| 3. Look for Symmetry | Even functions (f(-x) = f(x)) defined on a symmetric domain (like R or [-a, a]) are almost always many-one. | f(x) = x⁴, f(x) = cos(x), `f(x) = |
Common Mistakes to Avoid
| ❌ Wrong Approach | ✅ Right Approach | Why it's a Mistake |
|---|---|---|
Assuming f: R → R is always onto. | Always find the range and compare it with the codomain R. | Many functions like f(x) = x² (Range [0, ∞)) or f(x) = sin(x) (Range [-1, 1]) do not cover all of R. |
| Confusing Codomain and Range. | The Codomain is given in the function definition (f: A → B, B is codomain). The Range is the set of all actual output values. | The entire classification of onto/into depends on the distinction between these two sets. |
| Applying the Horizontal Line Test incorrectly. | The Horizontal Line Test must be applied to the graph of the function over its entire specified domain. | A function like f(x) = x² is many-one on R but one-one on [0, ∞). The domain matters immensely. |
Forgetting domain restrictions when solving for x in the surjectivity test. | When you find x = g(y), you must verify that for every y in the codomain, the resulting x is in the domain. | As seen in Example 3, we had to verify x would never be -2. Failing this check means the function is not onto. |
Tricky Practice Problems
Problem 1
Let f: R → R be defined by f(x) = (eˣ - e⁻ˣ) / (eˣ + e⁻ˣ). The function f(x) is:
(A) one-one and into
(B) one-one and onto
(C) many-one and into
(D) many-one and onto
💡 Answer: (A) The function is
f(x) = tanh(x). Its derivativef'(x) = sech²(x)is always positive, so it is one-one. The range oftanh(x)is(-1, 1), which is a proper subset of the codomainR. Therefore, it is into.
Problem 2
Let A = {1, 2, 3} and B = {a, b}. The total number of surjective (onto) functions from A to B is:
(A) 8
(B) 6
(C) 2
(D) 0
💡 Answer: (B) Total functions from A to B =
|B|^|A| = 2³ = 8. Functions that are not onto (i.e., into) are those where all elements map to 'a' only (1 case) or all elements map to 'b' only (1 case). So, 2 functions are not onto. Number of onto functions = Total functions - Into functions = 8 - 2 = 6.
Problem 3
The function f: [2, ∞) → [5, ∞) is defined by f(x) = x² - 4x + 9. This function is:
(A) one-one and into
(B) bijective
(C) many-one and onto
(D) many-one and into
💡 Answer: (B) Complete the square:
f(x) = (x - 2)² + 5. The vertex of the parabola is at(2, 5). For the domainx ≥ 2, the function is strictly increasing, so it is one-one. The minimum value isf(2) = 5. The maximum value is∞. So the range is[5, ∞), which is equal to the codomain. Thus, it is onto. Since it's one-one and onto, it is bijective.
Mini Cheatsheet
| Concept | Test / Definition | Key Insight |
|---|---|---|
| One-one (Injective) | f(x₁) = f(x₂) ⇒ x₁ = x₂ or f'(x) has a constant sign. | Each output has a unique input. Horizontal line hits graph at most once. |
| Many-one | ∃ x₁ ≠ x₂ with f(x₁) = f(x₂) | At least one output comes from multiple inputs. Horizontal line hits graph more than once. |
| Onto (Surjective) | Range = Codomain | Every element in the codomain is "hit" by the function. |
| Into | Range ⊂ Codomain | At least one element in the codomain is "missed" by the function. |
| Bijective | One-one AND Onto | Perfect pairing. The function is invertible. |
{FLASHCARD: q="What are the three main ways to check if a function is one-one (injective)?" | a="1. Algebraic: Show f(x₁) = f(x₂) ⇒ x₁ = x₂. 2. Graphical: Use the Horizontal Line Test. 3. Calculus: Show the derivative f'(x) is either always positive or always negative in the domain."}

