Types of Functions and Composition

Special categories of functions, and how two functions can be combined into one.

Types of Functions and Composition

A function is a special type of relation in which every element of the domain has exactly one image in the codomain. In a function, किसी भी input का केवल एक निश्चित output होना चाहिए।

1. Function

Let A and B be two non-empty sets. A function f from A to B is written as:

f : A → B

It assigns every element of A to exactly one element of B. Here, A is called the domain, B is called the codomain, and the set of actual images in B is called the range.

यानी domain के हर element से एक arrow निकलना चाहिए और वह codomain के केवल एक element तक जाना चाहिए। लेकिन codomain के हर element तक arrow पहुँचना जरूरी नहीं है।

Example

Let A = {1, 2, 3} and B = {a, b, c}.

Suppose:

f = {(1,a), (2,b), (3,b)}

Then:

  • Domain = {1, 2, 3}
  • Codomain = {a, b, c}
  • Range = {a, b}

Since every element of A has exactly one image, f is a function.

Important: Range is always a subset of the codomain. इसलिए Range ⊆ Codomain.

2. One-One Function (Injective Function)

A function f : A → B is called one-one if distinct elements of A have distinct images in B.

Mathematically:

f(x1) = f(x2) ⇒ x1 = x2

इसका मतलब है कि दो अलग-अलग inputs का output समान नहीं होना चाहिए। यदि output समान मिल गया, तो function one-one नहीं होगा।

Example

Let f : R → R be defined by:

f(x) = 2x + 3

If f(x1) = f(x2), then:

2x1 + 3 = 2x2 + 3

Therefore, x1 = x2. Hence, f is one-one.

Non-Example

Consider f(x) = x2 on R.

Here:

f(2) = 4 and f(-2) = 4

But 2 ≠ -2. इसलिए अलग-अलग inputs का same output आ रहा है और function one-one नहीं है।

3. Many-One Function

A function is called many-one if two or more distinct elements of the domain can have the same image.

अर्थात यदि x1 ≠ x2 होते हुए भी f(x1) = f(x2) हो सकता है, तो function many-one है।

Example

Let:

f(x) = x2

Then:

f(2) = f(-2) = 4

Therefore, f is many-one on R.

Remember: Every function is either one-one or many-one according to whether distinct inputs can have the same image or not.

4. Onto Function (Surjective Function)

A function f : A → B is called onto if every element of the codomain B is the image of at least one element of A.

यानी codomain का कोई भी element ऐसा नहीं होना चाहिए जो किसी input का output न बने। इसलिए onto function में:

Range = Codomain

Example

Let:

f : {1,2,3} → {a,b,c}

and

f = {(1,a),(2,b),(3,c)}

Here, Range = {a,b,c} = Codomain. Therefore, f is onto.

5. Into Function

A function f : A → B is called into if at least one element of the codomain is not the image of any element of the domain.

इस स्थिति में range, codomain का proper subset होता है:

Range ⊂ Codomain

Example

Let:

f : {1,2,3} → {a,b,c,d}

be defined by:

f = {(1,a),(2,b),(3,c)}

Here:

  • Range = {a,b,c}
  • Codomain = {a,b,c,d}

Since d is not an image of any element of the domain, f is into.

6. One-One Onto Function (Bijective Function)

A function which is both one-one and onto is called a bijective function.

इसमें दो conditions एक साथ पूरी होती हैं: कोई दो अलग inputs same output नहीं देते और codomain का हर element किसी input का image होता है।

Bijective = One-One + Onto

Example

Let:

f : {1,2,3} → {a,b,c}

where:

f = {(1,a),(2,b),(3,c)}

All images are distinct and every element of the codomain is used. Hence, f is bijective.

7. Constant Function

A function f : A → B is called a constant function if every element of the domain has the same image.

It can be written as:

f(x) = c

where c is a fixed element of B.

यानी input कुछ भी हो, output हमेशा वही fixed value रहेगा।

Example

If:

f(x) = 5

then:

f(1) = f(2) = f(100) = 5

Thus, f is a constant function.

Note: A constant function is generally many-one when the domain has more than one element.

8. Identity Function

The identity function on a set A is a function from A to A which maps every element to itself.

It is denoted by IA and defined as:

IA(x) = x

Identity function input को बदलता ही नहीं है। जो input दिया जाता है, वही output वापस मिलता है।

Example

If A = {1,2,3}, then:

IA = {(1,1),(2,2),(3,3)}

9. Composition of Functions

Suppose:

f : A → B

and

g : B → C

Then we can first apply f and then apply g. The resulting function from A to C is called the composition of g with f.

It is denoted by:

g ∘ f : A → C

and is defined by:

(g ∘ f)(x) = g(f(x))

Very Important: In g ∘ f, the function on the right acts first. यानी पहले f लगेगा और उसके बाद g।

Example

Let:

f(x) = 2x + 1

and

g(x) = x2

To find g ∘ f:

(g ∘ f)(x) = g(f(x))

First find f(x):

f(x) = 2x + 1

Now put this in g:

g(2x+1) = (2x+1)2

Therefore:

(g ∘ f)(x) = (2x+1)2

10. Composition in the Reverse Order

Now consider:

(f ∘ g)(x) = f(g(x))

Using the same functions:

f(x)=2x+1,   g(x)=x2

we get:

(f ∘ g)(x) = f(x2)

= 2x2 + 1

Notice:

(g ∘ f)(x) = (2x+1)2

but

(f ∘ g)(x) = 2x2+1

Therefore:

g ∘ f ≠ f ∘ g

इसलिए function composition generally commutative नहीं होता।

11. Associative Property of Composition

Composition of functions is associative whenever the compositions are defined.

f ∘ (g ∘ h) = (f ∘ g) ∘ h

इसका अर्थ है कि functions की grouping बदलने से final composition नहीं बदलता, लेकिन functions का order बदलना allowed नहीं है।

12. Identity Function and Composition

If f : A → B, then:

f ∘ IA = f

and

IB ∘ f = f

Identity function को composition में लगाने पर function का actual rule नहीं बदलता।

13. Composition and One-One Functions

If f : A → B and g : B → C are both one-one functions, then their composition g ∘ f is also one-one.

अर्थात दो one-one functions को compose करने पर resulting function भी one-one रहता है।

14. Composition and Onto Functions

If f : A → B and g : B → C are both onto functions, then g ∘ f is also onto.

यानी दोनों functions में codomain का हर element image बन रहा है, तो composition में भी final codomain का हर element प्राप्त होगा।

15. Composition of Bijective Functions

If f and g are bijective functions, then g ∘ f is also bijective.

क्योंकि composition one-one भी होगी और onto भी।

16. Invertible Function

A function f : A → B is called invertible if there exists a function g : B → A such that:

g ∘ f = IA

and

f ∘ g = IB

ऐसा function g, f का inverse कहलाता है और इसे f−1 से denote करते हैं।

Key Result: A function is invertible if and only if it is bijective.

17. Finding the Inverse of a Function

Suppose:

f(x) = 2x + 3

To find f−1, write:

y = 2x + 3

Interchange x and y:

x = 2y + 3

Now solve for y:

y = (x − 3)/2

Therefore:

f−1(x) = (x − 3)/2

18. How to Identify the Type of Function

  1. First check whether every domain element has exactly one image. If not, it is not a function.
  2. Check whether two different inputs can have the same output. If not, the function is one-one.
  3. Check whether every codomain element is used as an image. If yes, the function is onto.
  4. If it is both one-one and onto, it is bijective.
  5. If some codomain elements are unused, it is into.
  6. If different domain elements can have the same image, it is many-one.

19. Solved Example: Identify the Function

Let A = {1,2,3} and B = {a,b,c,d} and:

f = {(1,a),(2,b),(3,c)}

Step 1: Every element of A has exactly one image, so f is a function.

Step 2: All images a, b and c are different, so f is one-one.

Step 3: d has no pre-image, so Range ≠ Codomain.

Therefore, f is one-one and into.

20. Solved Example: Check Whether the Function is Onto

Let:

f : R → R,   f(x)=2x+5

To check onto, let y be any real number.

y = 2x+5

Then:

x = (y−5)/2

Since (y−5)/2 is real for every real y, every element of the codomain has a pre-image.

Therefore, f is onto.

21. Solved Example: Find Composition

Let:

f(x)=x+2

and

g(x)=3x

Then:

(g ∘ f)(x)=g(x+2)=3(x+2)=3x+6

Similarly:

(f ∘ g)(x)=f(3x)=3x+2

Hence:

g ∘ f ≠ f ∘ g

22. Important Comparison Table

Type Main Condition
One-One f(x1) = f(x2) ⇒ x1 = x2
Many-One Different inputs may have the same image
Onto Range = Codomain
Into Range is a proper subset of Codomain
Bijective One-One + Onto
Constant f(x) = c
Identity IA(x) = x

23. Important Points for Examination

  • Every function is a relation, but every relation need not be a function.
  • Every element of the domain must have exactly one image.
  • Range is always a subset of codomain.
  • One-one means distinct inputs have distinct images.
  • Onto means Range = Codomain.
  • Bijective means both one-one and onto.
  • In g ∘ f, first apply f and then g.
  • Generally, g ∘ f ≠ f ∘ g.
  • Composition of functions is associative.
  • The composition of two one-one functions is one-one.
  • The composition of two onto functions is onto.
  • The composition of two bijective functions is bijective.
  • A function has an inverse if and only if it is bijective.

24. Multiple Choice Questions

1. A function f : A → B assigns:

  1. Every element of B to exactly one element of A
  2. Every element of A to exactly one element of B
  3. Some elements of A to no element of B
  4. Every element of A to every element of B

Answer: (b)

2. For an onto function:

  1. Range ⊂ Codomain
  2. Range = Codomain
  3. Domain = Range
  4. Domain = Codomain always

Answer: (b)

3. A function which is both one-one and onto is called:

  1. Constant
  2. Into
  3. Bijective
  4. Many-one

Answer: (c)

4. If f : A → B and g : B → C, then g ∘ f is a function from:

  1. B to A
  2. A to C
  3. C to A
  4. B to C

Answer: (b)

5. In g ∘ f, which function is applied first?

  1. g
  2. f
  3. Both simultaneously
  4. Neither

Answer: (b)

6. A function has an inverse if and only if it is:

  1. Constant
  2. Many-one
  3. Bijective
  4. Into

Answer: (c)

25. Fill in the Blanks

  1. The set of actual images of a function is called its range.
  2. For an onto function, range is equal to the codomain.
  3. A function which is both one-one and onto is called bijective.
  4. The identity function is denoted by IA.
  5. In g ∘ f, the function f acts first.
  6. An invertible function is necessarily bijective.

26. True or False

  1. Every function is a relation. True
  2. Range can contain elements outside the codomain. False
  3. Every onto function is necessarily one-one. False
  4. Every bijective function is both one-one and onto. True
  5. Generally, f ∘ g = g ∘ f. False
  6. Composition of two bijective functions is bijective. True
  7. Every invertible function is bijective. True

27. Practice Questions

  1. Define a function and explain domain, codomain and range with an example.
  2. Define a one-one function. Give a suitable example.
  3. What is a many-one function?
  4. Define an onto function and state its important condition.
  5. Differentiate between into and onto functions.
  6. What is a bijective function?
  7. Define a constant function and identity function.
  8. If f : A → B and g : B → C, define g ∘ f.
  9. Explain why function composition is generally not commutative.
  10. State the associative property of composition.
  11. Find g ∘ f and f ∘ g for f(x)=x+1 and g(x)=2x.
  12. Show that f(x)=3x−4 is one-one on R.
  13. Check whether f(x)=x2 is one-one on R.
  14. Find the inverse of f(x)=5x+2.
  15. State the necessary and sufficient condition for a function to be invertible.

Quick Revision

One-One → Different inputs give different outputs

Many-One → Different inputs may give the same output

Onto → Range = Codomain

Into → Range ⊂ Codomain

Bijective → One-One + Onto

g ∘ f → First f, then g

Inverse exists ⇔ Function is Bijective

Lesson 2 of 32
On This Page