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:

  1. Assume f(x1) = f(x2) for arbitrary elements x1, x2 in the domain.
  2. Algebraically manipulate the equation to see if it necessarily leads to x1 = x2. If it does, the function is one-one.
  3. If you can find at least one instance where f(x1) = f(x2) but x1 ≠ x2, then the function is not one-one (it's many-one).
  4. 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, where f: ℝ → ℝ. If f(x1) = f(x2), then 2x1 = 2x2, which implies x1 = x2.
  • f(x) = x³, where f: ℝ → ℝ. If x1³ = x2³, then taking the cube root of both sides gives x1 = x2.
  • f(x) = x + 1, where f: ℝ → ℝ. If x1 + 1 = x2 + 1, then x1 = x2.

Examples of Functions That Are NOT One-One (Many-One Functions):

  • f(x) = x², where f: ℝ → ℝ. Here, f(2) = 4 and f(-2) = 4, but 2 ≠ -2. So, it's not one-one.
  • f(x) = |x|, where f: ℝ → ℝ. For example, f(3) = 3 and f(-3) = 3, but 3 ≠ -3.
  • f(x) = cos(x), where f: ℝ → ℝ. cos(0) = 1 and cos(2π) = 1, but 0 ≠ 2π.
Shortcut for Checking One-One: For polynomial functions, if the powers of x are all odd (e.g., x³ + 2x), it's likely one-one over ℝ. If there are even powers (e.g., , 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:

  1. Determine the range of the function f. The range is the set of all possible output values of f(x) for x in the domain.
  2. Compare the range with the codomain. If the range is exactly the same as the codomain, the function is onto.
  3. 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).
  4. For functions f: ℝ → ℝ, you can often find the range by solving y = f(x) for x in terms of y. If you can find a real value of x for every real value of y, the function is onto.

Examples of Onto Functions:

  • f(x) = 2x, where f: ℝ → ℝ. For any real number y, we can find x = y/2 such that f(x) = 2(y/2) = y. The range is , which is equal to the codomain.
  • f(x) = x³, where f: ℝ → ℝ. For any real number y, we can find x = ³√y such that f(x) = (³√y)³ = y. The range is , which equals the codomain.
  • f(x) = x + 1, where f: ℝ → ℝ. For any y ∈ ℝ, let x = y - 1. Then f(x) = (y - 1) + 1 = y. The range is .

Examples of Functions That Are NOT Onto (Into Functions):

  • f(x) = x², where f: ℝ → ℝ. 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|, where f: ℝ → ℝ. The range is [0, ∞). Since this is not equal to the codomain , the function is not onto.
  • f(x) = eˣ, where f: ℝ → ℝ. The range is (0, ∞). This is not equal to the codomain , so it's not onto.
Shortcut for Checking Onto: For functions f: ℝ → ℝ, if the function is a polynomial of odd degree (like , x⁵ + 2x), it's generally onto. Polynomials of even degree (like , 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, then f(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, then f(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.

Key Relationships:
  • 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, ∞).
Exam Tip: Always check the domain and codomain carefully. If they are not explicitly stated, assume they are the largest possible set of real numbers for which the function is defined (e.g., for 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 f and g are both one-one, then h = g ∘ f is one-one. Proof: Suppose h(x1) = h(x2). This means g(f(x1)) = g(f(x2)). Since g is one-one, f(x1) = f(x2). Since f is one-one, x1 = x2. Thus, h is one-one.
  • If f and g are both onto, then h = g ∘ f is onto. Proof: Suppose z ∈ C. Since g is onto, there exists y ∈ B such that g(y) = z. Since f is onto, there exists x ∈ A such that f(x) = y. Substituting, we get g(f(x)) = z, which means h(x) = z. Thus, h is onto.
  • If h = g ∘ f is one-one, it does NOT necessarily mean that f and g are one-one. However, f must be one-one. (If f were many-one, say f(x1)=f(x2) for x1≠x2, then h(x1)=g(f(x1))=g(f(x2))=h(x2), making h many-one).
  • If h = g ∘ f is onto, it does NOT necessarily mean that f and g are onto. However, g must be onto. (If g were into, there would be some z ∈ C such that z is not in the range of g. Then z cannot be in the range of h = g ∘ f either, making h into).
Composition Rules Summary:
  • One-one + One-one = One-one
  • Onto + Onto = Onto
  • Bijective + Bijective = Bijective
  • If g ∘ f is one-one, then f is one-one.
  • If g ∘ f is onto, then g is 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.