You are on page 1of 8

NOTE

M A T H E M A T I C S

RELATIONS AND FUNCTIONS


ONTO FUNCTIONS

What you already know What you will learn

• One-one and many-one functions • Onto functions and into functions


• Methods to identify one-one and many-one • Number of onto and into functions
functions

Onto function (Surjective function)

If f : A → B, is a function such that each and every element in B (co-domain) has at least one
pre-image in A, then we say that f is an onto function.
In other words, iff ∀ b ∊ B, there exists some a ∈ A such that f(a) = b, then f is an onto function. An
onto function is also known as a surjective function.

Note

• A function, f, is said to be an onto function if the range of f = co-domain of function f


• If not given, the co-domain of the function is always taken as ℝ.

Examples
f(x) = sin x : ℝ → [-1, 1] f(x) = cos x : ℝ → [-1, 2]

Y Y

(0, 1)
(0, 1)

X X
(0, -1) (0, -1)

Here, the domain of the function is ℝ and the Here, the domain of the function is ℝ and
co-domain is [-1, 1]. The range of the function co-domain is [-1, 2], but the range of the function
from the graph is [-1, 1]. Since the co-domain is from the graph is [-1, 1]. Since the co-domain
equal to the range of the function, it is an onto is not equal to the range of the function, it is not
function. an onto function.

© 2020, BYJU'S. All rights reserved


02

Into function

If a function, f : A → B, is such that there exists at least one element in B (co-domain) that is not the
image of any element of A, then function f is known as an into function.
In other words , if the range of the function is a proper subset of its co-domain, then the function is
said to be an “into function”.

Note

For an into function


• Range of f ≠ Co-domain of f
• Range ⊂ Co-domain

Examples
f(x) = x2 + x - 2 , x ∊ ℝ f(x) = [x], x ∊ ℝ (Greatest integer function)
Y Y

2
 1  1
 - 2 , 0
 
X -2 -1 1 2 3 X
 9 -1
 0, - 4 
  -2

Here, the domain of the given function is ℝ and Here, the domain of the function is ℝ and
the co-domain is not given. So, it is assumed as co-domain is not given. So, it is assumed as ℝ,
ℝ, and the range of the function from the graph and the range of the function from the graph
is  -9 , ∞  . As the range is a proper subset of the is the set of integers. As the range is a proper
4  subset of co-domain, the given function is an
 
into function.
co-domain, the given function is an into function.

f(x) = sgn x, x ∊ ℝ (Signum function) f(x) = {x}, x ∊ ℝ (Fractional part function)

Y
Y

y=1
1

X -3 -2 -1 0 1 2 3 X
-1
y = -1

© 2020, BYJU'S. All rights reserved


03

Here, the domain of the function is ℝ and Here, the domain of the function is ℝ and
co-domain is not given. So, it is assumed as ℝ, co-domain is not given. So, it is assumed as
and the range of the function from the graph ℝ, and the range of the function from the graph
is {-1, 0, 1}. As the range is a proper subset of is [0, 1). As the range is a proper subset of
co-domain, the given function is an into function. co-domain, the given function is an into function.

Note

A function can be one of the following four types:


• One-one (injective) and onto(surjective) = Bijective function
• Many-one (not injective) and onto (surjective) function
• One-one (injective) and into (not surjective) function
• Many-one (not injective) and into (not surjective) function

APRIL 2019
x2
If the function, f : ℝ -{-1, 1} → A, defined by f ( x ) = , is surjective,
1 - x2
then what is A equal to?
(a) ℝ - [-1, 0 ) (b) ℝ - {-1} (c) ℝ - (-1, 0) (d) [0, ∞)

Solution
Step 1: Step 2:
x2 We know that x2 ≥ 0 for any real value of x.
y= y
1 - x2 ⇒ ≥ 0 ⇒ y ∈ - [-1, 0)
1+y
⇒ y - yx2 = x2
For the given function to be surjective,
⇒ y = x 2 (1 + y )
Range = Co-domain
y ⇒y=A
⇒ x2 =
1+y ⇒ A = ℝ - [-1, 0)
Option (a) is the correct answer.

What is f(x) = x|x|: ℝ → ℝ?


(a) One-one, onto (b) Many-one, onto (c) One-one, into (d) Many-one, into

Y
Solution
Step 1:
-x2, x ≤ 0 y = x2 if x > 0
f(x) = x|x| =
x2, x > 0
From the graph, the range of the given function is ℝ,
which is the same as the co-domain. X
Therefore, the given function is an onto function.
y = -x2 if x ≤ 0

© 2020, BYJU'S. All rights reserved


04

Step 2: Y
On drawing a horizontal line parallel to the X - axis
y = x2
(horizontal line test), we observe that it cuts the
graph of the function at only one point.
Therefore, the given function is a one-one function.
Option (a) is the correct answer.
X

y = -x2

Principle of inclusion and exclusion

• For set A and set B,


Include Exclude

= + -

n(A U B) n(A) n(B) n(A ∩ B)

n(A U B) = n(A) + n(B) - n(A ∩ B)


n(A’ ∩ B’) = n(U) - n(A U B)

• For set A, set B, and set C

n(A U B U C)

= n(A) + n(B) + n(C) - (n(A ∩ B) + n(A ∩ C) + n(B ∩ C)) + n(A ∩ B ∩ C)

Include Exclude Include

• For n number of sets


n ( A1 U A 2 U A3 U .......... U A n )
= ∑ n ( Ai ) - ∑n(A  Aj ) + ∑n(A  A j  A k ) - ........... + ( -1 ) n ( A1  A 2  A3  ..........  A n )
n
i i

© 2020, BYJU'S. All rights reserved


05

Number of onto functions

Let the function be f : A → B,


Where n(A) = m and n(B) = n
Case 1: When m > n
• n(Ai) = Total number of functions when yi is excluded = nC1(n - 1)m
• n(Ai ⋂ Aj) = Total number of functions when yi and yj are excluded = nC2(n - 2)m
• Total number of functions where at least one element is excluded
= n(A1 U A2 U A3 U ..... U An)
= ∑n(Ai) -∑n(Ai ⋂ Aj) + ∑n(Ai ⋂ Aj ⋂ Ak)...
= nC1(n - 1)m - nC2(n - 2)m +...
Number of onto functions = nm -n(A1 U A2 U A3 U ..... U An)
= nm - (nC1(n - 1)m - nC2(n - 2)m +..)
Case 2: When m = n, number of onto functions = n!
Case 3: When n > m, no onto functions exist.

Note

Number of into functions = (Total number of functions) - (Number of onto functions).

Find the number of ways of distributing 5 balls into three distinct boxes considering the
following conditions:
(a) Any number of balls can go to any number of boxes
(b) Each box has at least one ball

Solution

5 balls represent set A.


3 boxes represent set B.
Mapping has to happen from A to B for the given conditions.
(a) Since each ball has 3 choices,
Number of ways = Total number of functions = 35
(b) Here, we want the number of onto functions as none of the boxes is empty in this case.
Therefore, Total number of onto functions = 35 - [3C1(2)5 - 3C2(1)5] =150

Concept Check

1. If f :ℝ → B , f(x) = 2 sinx - 2 3 cosx +1 is an onto function and the interval of B is [α, β], then find
the value of β - α.
 πx 
2. f(x) = sin   , f:[-1, 1] → [-1, 1] is
 2 
(a) One-one, onto (b) Many-one, onto (c) One-one, into (d) Many-one, into

© 2020, BYJU'S. All rights reserved


06

Summary Sheet

Key Takeaways

• f : A→ B is known as an onto function iff ∀ b ∊ B, there exists some a ∊ A such that f(a) = b.
• A function that is both one-one and onto is known as a bijective function.
• If the function is f : A → B, where n(A) = m and n(B) = n, then
Case 1: When m > n,
Number of onto functions = nm - (nC1(n - 1)m - nC2(n - 2)m + ..)
Case 2: When m = n,
Number of onto functions = n!
Case 3: When n > m,
No onto functions exist.
• Number of into functions = Total number of functions - Number of onto functions

Mind Map

Number
Onto functions of onto
functions

Domain, Number
Classification Into functions of into
Co-domain, Function
of functions functions
Range

Number of functions

Self-Assessment

Determine whether the following functions are into or onto functions.


(a) f(x) =|x| , where x ∊ ℝ+
(b) f(x) = c , where c is a constant real number

© 2020, BYJU'S. All rights reserved


07

Answers

Concept Check

1.
f : R → B, f ( x ) = 2 sin x - 2 3 cos x + 1 - Onto function ( given )
= 2 sin x - 2 3 cos x + 1 ∈ [ α , β]
We know, - a2 + b2 ≤ a cos θ + b sin θ ≤ a2 + b2

( )
⇒ -  22 + 2 3  ≤ 2 sin x - 2 3 cos x ≤  22 + 2 3  ( )
2 2

   
⇒ - 16 ≤ 2 sin x - 2 3 cos ≤ 16
⇒ - 4 ≤ 2 sin x - 2 3 cos ≤ 4
⇒ -3 ≤ 2 sin x - 2 3 cos + 1 ≤ 5
⇒ 2 sin x - 2 3 cos + 1 ∈ [ α , β] , where α = -3, and β = 5
∴ β-α =8

2.
 πx 
f ( x ) = sin   : [-1, 1] → [-1, 1]
 2 
 -π 
For x = - 1, f ( x ) = sin   = - 1
2
For x = 0, f ( x ) = sin ( 0) = 0
π
For x = 1, f ( x ) = sin   = 1
2

Y Y
(1, 1) y=1
1
1
(1, 1)

-1 1 X -1 1 X

y = -1
-1
(-1, -1) (-1, -1)

© 2020, BYJU'S. All rights reserved


08

On plotting the graph, we observe that the On performing the horizontal line test, we
range of the function is [-1, 1], which is the observe only one point of intersection for any
same as the co-domain. Therefore, it is an onto horizontal line and the graph. Therefore, it is a
function. one-one function.

Option (a) is the correct answer.

Self-Assessment

(a) f(x) =|x| , where x ∊ ℝ+ Y


For x ∊ ℝ+, f(x) = x
For the domain, x ∊ ℝ+, the range of the function is
y ∊ ℝ+.
As the co-domain is not given, it is taken as ℝ.
Since the range and the co-domain of the given y=x
function are not equal, the given function is an into
function.

(b) f(x) = c , where c is a constant real number


Y

f(x) = c

The range of the function is {c}, while the co-domain is ℝ. Therefore, the given function
is an into function.

© 2020, BYJU'S. All rights reserved

You might also like