Functions: One-One, Into, and Onto
In mathematics, a function is a fundamental concept that describes a relationship between two sets. Specifically, it's a rule that assigns to each element of a first set (called the domain) exactly one element of a second set (called the codomain). We've already established the basics of functions, their types like identity, constant, polynomial, and rational functions. Now, we'll delve into a more detailed classification of functions based on how they map elements from the domain to the codomain: one-one (injective), into (injective), and onto (surjective) functions. Understanding these distinctions is crucial for solving problems involving function composition, inverse functions, and graph analysis, especially in competitive exams like JEE Main.
One-One Functions (Injective Functions)
A function f: A → B is said to be one-one (or injective) if distinct elements in the domain A are mapped to distinct elements in the codomain B. In simpler terms, no two different inputs produce the same output.
Mathematically, a function f: A → B is one-one if for any two elements x1 and x2 in A, the condition f(x1) = f(x2) implies that x1 = x2.
Alternatively, we can state that if x1 ≠ x2, then f(x1) ≠ f(x2).
How to Check if a Function is One-One:
-
Assume
f(x1) = f(x2)for arbitrary elementsx1, x2in the domain. -
Algebraically manipulate the equation to see if it necessarily leads to
x1 = x2. If it does, the function is one-one. -
If you can find at least one instance where
f(x1) = f(x2)butx1 ≠ x2, then the function is not one-one (it's many-one). - For functions defined on real numbers, you can also use the horizontal line test. If any horizontal line intersects the graph of the function at more than one point, the function is not one-one.
Examples of One-One Functions:
-
f(x) = 2x, wheref: ℝ → ℝ. Iff(x1) = f(x2), then2x1 = 2x2, which impliesx1 = x2. -
f(x) = x³, wheref: ℝ → ℝ. Ifx1³ = x2³, then taking the cube root of both sides givesx1 = x2. -
f(x) = x + 1, wheref: ℝ → ℝ. Ifx1 + 1 = x2 + 1, thenx1 = x2.
Examples of Functions That Are NOT One-One (Many-One Functions):
-
f(x) = x², wheref: ℝ → ℝ. Here,f(2) = 4andf(-2) = 4, but2 ≠ -2. So, it's not one-one. -
f(x) = |x|, wheref: ℝ → ℝ. For example,f(3) = 3andf(-3) = 3, but3 ≠ -3. -
f(x) = cos(x), wheref: ℝ → ℝ.cos(0) = 1andcos(2π) = 1, but0 ≠ 2π.
x³ + 2x), it's likely one-one over ℝ. If there are even powers (e.g., x², x⁴ + x²), it's likely many-one. For trigonometric functions, consider their periodic nature.
Onto Functions (Surjective Functions)
A function f: A → B is said to be onto (or surjective) if every element in the codomain B is the image of at least one element in the domain A. In other words, the range of the function is equal to its codomain. There are no "unassigned" elements in the codomain.
Mathematically, a function f: A → B is onto if for every element y in B, there exists at least one element x in A such that f(x) = y.
This means: Range(f) = Codomain(f).
How to Check if a Function is Onto:
-
Determine the range of the function
f. The range is the set of all possible output values off(x)forxin the domain. - Compare the range with the codomain. If the range is exactly the same as the codomain, the function is onto.
- If the range is a proper subset of the codomain (i.e., there are elements in the codomain that are not in the range), the function is not onto (it's an into function).
-
For functions
f: ℝ → ℝ, you can often find the range by solvingy = f(x)forxin terms ofy. If you can find a real value ofxfor every real value ofy, the function is onto.
Examples of Onto Functions:
-
f(x) = 2x, wheref: ℝ → ℝ. For any real numbery, we can findx = y/2such thatf(x) = 2(y/2) = y. The range isℝ, which is equal to the codomain. -
f(x) = x³, wheref: ℝ → ℝ. For any real numbery, we can findx = ³√ysuch thatf(x) = (³√y)³ = y. The range isℝ, which equals the codomain. -
f(x) = x + 1, wheref: ℝ → ℝ. For anyy ∈ ℝ, letx = y - 1. Thenf(x) = (y - 1) + 1 = y. The range isℝ.
Examples of Functions That Are NOT Onto (Into Functions):
-
f(x) = x², wheref: ℝ → ℝ. The range of this function is[0, ∞), because the square of any real number is non-negative. The codomain isℝ. Since[0, ∞) ≠ ℝ(e.g., -1 is in the codomain but not in the range), this function is not onto. It is an into function. -
f(x) = |x|, wheref: ℝ → ℝ. The range is[0, ∞). Since this is not equal to the codomainℝ, the function is not onto. -
f(x) = eˣ, wheref: ℝ → ℝ. The range is(0, ∞). This is not equal to the codomainℝ, so it's not onto.
f: ℝ → ℝ, if the function is a polynomial of odd degree (like x³, x⁵ + 2x), it's generally onto. Polynomials of even degree (like x², x⁴) are usually not onto because their range is restricted (either [min, ∞) or (-∞, max]).
One-One Into and Onto Functions
Now, let's combine these concepts. A function can be classified based on whether it is one-one and whether it is onto.
One-One Into Functions
A function f: A → B is one-one into if it is both one-one and not onto. This means distinct elements in A map to distinct elements in B, but there are some elements in B that are not the image of any element in A.
For a function f: A → B to be one-one into:
-
If
x1 ≠ x2, thenf(x1) ≠ f(x2)(one-one property). - Range(f) is a proper subset of Codomain(f) (into property).
Example: f(x) = x², where f: ℝ → ℝ. This function is one-one for x ≥ 0 and x ≤ 0 separately, but not for all of ℝ. Let's consider a restricted domain and codomain for clarity.
Example: Let f: ℝ → ℝ be defined by f(x) = x². This is not one-one (e.g., f(2)=4, f(-2)=4). Let's refine this.
Consider f: {1, 2, 3} → {1, 2, 3, 4} defined by f(1)=1, f(2)=2, f(3)=3.
This function is one-one because 1, 2, and 3 are mapped to distinct values.
This function is into because the element 4 in the codomain is not mapped to by any element in the domain.
Example: f(x) = eˣ, where f: ℝ → ℝ. This function is one-one. However, its range is (0, ∞), which is a proper subset of the codomain ℝ. Thus, it's a one-one into function.
One-One Onto Functions (Bijective Functions)
A function f: A → B is one-one onto (or bijective) if it is both one-one and onto. This is a very important type of function because it establishes a perfect pairing between the elements of the domain and the codomain. If a function is bijective, it means that every element in the domain maps to a unique element in the codomain, and every element in the codomain is mapped to by exactly one element from the domain.
For a function f: A → B to be one-one onto:
-
If
x1 ≠ x2, thenf(x1) ≠ f(x2)(one-one property). - Range(f) = Codomain(f) (onto property).
If a function is bijective, it has an inverse function.
Example: f(x) = 2x, where f: ℝ → ℝ. We've seen this is one-one and onto. Thus, it's bijective.
Example: f(x) = x³, where f: ℝ → ℝ. This is one-one and onto, hence bijective.
Example: Let f: {1, 2, 3} → {a, b, c} be defined by f(1)=a, f(2)=b, f(3)=c. This is one-one and onto.
Many-One Into Functions
A function f: A → B is many-one into if it is not one-one (i.e., it's many-one) and it is not onto (i.e., it's into). This means at least two elements in the domain map to the same element in the codomain, and there are elements in the codomain that are not mapped to.
Example: Let f: {1, 2, 3} → {a, b, c, d} be defined by f(1)=a, f(2)=a, f(3)=b.
This function is many-one because f(1) = f(2) but 1 ≠ 2.
This function is into because c and d in the codomain are not images of any element in the domain.
Example: f(x) = x², where f: ℝ → ℝ. This is many-one (e.g., f(2)=f(-2)) and into (range is [0, ∞), not ℝ).
Many-One Onto Functions
A function f: A → B is many-one onto if it is many-one and onto. This means at least two elements in the domain map to the same element in the codomain, but every element in the codomain is mapped to by at least one element from the domain.
Example: Let f: {1, 2, 3, 4} → {a, b} be defined by f(1)=a, f(2)=a, f(3)=b, f(4)=b.
This function is many-one because f(1)=f(2) and f(3)=f(4).
This function is onto because both a and b in the codomain are mapped to.
Note: For finite sets A and B, if |A| > |B|, any function f: A → B must be many-one (by the Pigeonhole Principle). If |A| = |B|, a function f: A → B is one-one if and only if it is onto.
- A function is either one-one or many-one.
- A function is either onto or into.
- Therefore, any function must fall into one of these four categories: One-One Into, One-One Onto (Bijective), Many-One Into, Many-One Onto.
Summary Table of Function Types
| One-One? | Onto? | Type | Description | Example (f: ℝ → ℝ) |
|---|---|---|---|---|
| Yes | No | One-One Into | Distinct inputs map to distinct outputs; some codomain elements are missed. | f(x) = eˣ (Range: (0, ∞)) |
| Yes | Yes | Bijective (One-One Onto) | Distinct inputs map to distinct outputs; all codomain elements are covered. | f(x) = 2x + 1 |
| No | No | Many-One Into | Different inputs can map to the same output; some codomain elements are missed. | f(x) = x² |
| No | Yes | Many-One Onto | Different inputs can map to the same output; all codomain elements are covered. | f(x) = x³ - x (This is a bit more complex, requires calculus to prove onto for ℝ → ℝ, but illustrates the idea) or consider f: ℤ → {0, 1} where f(x) = x mod 2. |
Domain and Codomain Restrictions
It's crucial to pay close attention to the specified domain and codomain of a function. Changing these can alter whether a function is one-one or onto.
Consider the function f(x) = x².
-
If
f: ℝ → ℝ, it is Many-One Into. -
If
f: [0, ∞) → [0, ∞), it is One-One Onto (Bijective). Here, we restricted the domain to non-negative numbers, making it one-one. We also restricted the codomain to non-negative numbers, making it onto. -
If
f: ℝ → [0, ∞), it is Many-One Onto. It's onto because the codomain is now the range, but it's still many-one. -
If
f: [0, ∞) → ℝ, it is One-One Into. It's one-one due to the restricted domain, but into because the codomainℝcontains negative numbers not covered by the range[0, ∞).
f(x) = 1/x, domain is ℝ\{0} and codomain is ℝ). However, in JEE problems, domain and codomain are often specified or implied by the context.
Composition of Functions and Injectivity/Surjectivity
Let f: A → B and g: B → C be two functions. Let h = g ∘ f be their composition, so h: A → C.
-
If
fandgare both one-one, thenh = g ∘ fis one-one. Proof: Supposeh(x1) = h(x2). This meansg(f(x1)) = g(f(x2)). Sincegis one-one,f(x1) = f(x2). Sincefis one-one,x1 = x2. Thus,his one-one. -
If
fandgare both onto, thenh = g ∘ fis onto. Proof: Supposez ∈ C. Sincegis onto, there existsy ∈ Bsuch thatg(y) = z. Sincefis onto, there existsx ∈ Asuch thatf(x) = y. Substituting, we getg(f(x)) = z, which meansh(x) = z. Thus,his onto. -
If
h = g ∘ fis one-one, it does NOT necessarily mean thatfandgare one-one. However,fmust be one-one. (Iffwere many-one, sayf(x1)=f(x2)forx1≠x2, thenh(x1)=g(f(x1))=g(f(x2))=h(x2), makinghmany-one). -
If
h = g ∘ fis onto, it does NOT necessarily mean thatfandgare onto. However,gmust be onto. (Ifgwere into, there would be somez ∈ Csuch thatzis not in the range ofg. Thenzcannot be in the range ofh = g ∘ feither, makinghinto).
- One-one + One-one = One-one
- Onto + Onto = Onto
- Bijective + Bijective = Bijective
- If
g ∘ fis one-one, thenfis one-one. - If
g ∘ fis onto, thengis onto.
Example Problem:
Let f: ℝ → ℝ be defined by f(x) = 2x and g: ℝ → ℝ be defined by g(x) = x + 1. Determine the type of function for g ∘ f.
Solution:
f(x) = 2x is one-one and onto (bijective).
g(x) = x + 1 is one-one and onto (bijective).
The composition h(x) = (g ∘ f)(x) = g(f(x)) = g(2x) = 2x + 1.
Since both f and g are bijective, their composition g ∘ f must also be bijective (one-one onto).
Let's verify:
For one-one: If h(x1) = h(x2), then 2x1 + 1 = 2x2 + 1, which implies 2x1 = 2x2, so x1 = x2. Thus, it is one-one.
For onto: For any y ∈ ℝ, let x = (y - 1)/2. Then h(x) = 2((y - 1)/2) + 1 = (y - 1) + 1 = y. Thus, it is onto.
So, g ∘ f is indeed bijective.
Example Problem 2:
Let f: A → B and g: B → C be functions. If g ∘ f: A → C is one-one, what can we say about f and g?
Solution:
As discussed, if the composition g ∘ f is one-one, then the first function, f, must be one-one.
We cannot conclude anything definitive about g being one-one or onto. For instance, if f: {1, 2} → {a, b, c} is f(1)=a, f(2)=b (one-one, into) and g: {a, b, c} → {x, y} is g(a)=x, g(b)=x, g(c)=y (many-one, onto), then g ∘ f: {1, 2} → {x, y} is (g ∘ f)(1) = g(a) = x and (g ∘ f)(2) = g(b) = x. This composition is many-one.
Let's adjust the example for g ∘ f to be one-one.
Let f: {1, 2} → {a, b} be f(1)=a, f(2)=b (one-one, onto).
Let g: {a, b} → {x, y} be g(a)=x, g(b)=y (one-one, onto).
Then g ∘ f: {1, 2} → {x, y} is (g ∘ f)(1) = x, (g ∘ f)(2) = y. This is one-one. Here both f and g are one-one.
Consider f: {1, 2} → {a, b, c} with f(1)=a, f(2)=b (one-one, into).
Consider g: {a, b, c} → {x, y} with g(a)=x, g(b)=y, g(c)=x. (many-one, onto).
g ∘ f: {1, 2} → {x, y}.
(g ∘ f)(1) = g(f(1)) = g(a) = x.
(g ∘ f)(2) = g(f(2)) = g(b) = y.
Here, g ∘ f is one-one. f is one-one. g is not necessarily one-one.
So, if g ∘ f is one-one, we know f is one-one. We cannot say anything about g.
Example Problem 3:
Let f: A → B and g: B → C be functions. If g ∘ f: A → C is onto, what can we say about f and g?
Solution:
As discussed, if the composition g ∘ f is onto, then the second function, g, must be onto.
We cannot conclude anything definitive about f being onto or one-one.
Let f: {1, 2} → {a, b} with f(1)=a, f(2)=a (many-one, into).
Let g: {a, b} → {x} with g(a)=x, g(b)=x (many-one, onto).
g ∘ f: {1, 2} → {x}.
(g ∘ f)(1) = g(f(1)) = g(a) = x.
(g ∘ f)(2) = g(f(2)) = g(a) = x.
Here, g ∘ f is onto (and many-one). g is onto. f is not necessarily onto.
Consider f: {1, 2} → {a, b} with f(1)=a, f(2)=b (one-one, onto).
Consider g: {a, b} → {x} with g(a)=x, g(b)=x (many-one, onto).
g ∘ f: {1, 2} → {x}.
(g ∘ f)(1) = g(a) = x.
(g ∘ f)(2) = g(b) = x.
Here, g ∘ f is onto. g is onto. f is one-one and onto.
So, if g ∘ f is onto, we know g is onto. We cannot say anything about f.