Relations and Functions
Relations and Functions
AND FUNCTIONS
Relations
The term ‘relation’ in mathematics has been drawn from the meaning of relation in
English language, according to which two objects or quantities are related if there is
Types of Relations
Empty relation:
A relation R in a set A is called empty relation, if no element of A is related to
any element of A, i.e., R = φ ⊂ A × A.
Universal relation:
A relation R in a set A is called universal relation, if each element of A is related
relations.
Reflexive, symmetric and transitive.
(i) reflexive, if (a, a) ∈ R, for every a ∈ A,
for all a1 , a2 , a3 ∈ A.
Equivalence relation
Example:
Let A be the set of all students of a boys school. Show that the relation R in A
also obvious that the difference between heights of any two students of the
school has to be less than 3 meters. This shows that R′ = A × A is the universal
relation.
Example:
Show that the relation R in the set {1, 2, 3} given by R = {(1, 1), (2, 2), (3, 3), (1,
Solution:
R is reflexive, since (1, 1), (2, 2) and (3, 3) lie in R. Also, R is not symmetric, as (1,
but (1, 3) ∉ R.
Example:
Show that the relation R in the set Z of integers given by
R = {(a, b) : 2 divides a – b}
is an equivalence relation.
Solution:
R is reflexive, as 2 divides (a – a) for all a ∈ Z. Further, if (a, b) ∈ R, then 2
divides a – b. Therefore, 2 divides b – a. Hence, (b, a) ∈ R, which shows that R is
Example:
Let R be the relation defined in the set A = {1, 2, 3, 4, 5, 6, 7} by R = {(a, b) :
both a and b are either odd or even}. Show that R is an equivalence relation.
Further, show that all the elements of the subset {1, 3, 5, 7} are related to each
other and all the elements of the subset {2, 4, 6} are related to each other, but
no element of the subset {1, 3, 5, 7} is related to any element of the subset {2, 4,
6}.
Solution:
Given any element a in A, both a and a must be either odd or even, so that (a,
relation. Further, all the elements of {1, 3, 5, 7} are related to each other, as all
the elements of this subset are odd. Similarly, all the elements of the
the subset {2, 4, 6} are related to each other, as all of them are even. Also, no
element of the subset {1, 3, 5, 7} can be related to any element of {2, 4, 6}, as
elements of {1, 3, 5, 7} are odd, while elements of {2, 4, 6} are even.
Functions
and no two distinct ordered pairs in f have the same first element. Also, A and
B are two non-empty sets.
Types of Relations
one-one (or injective):
A function f : X → Y is defined to be one-one (or injective), if the images of
distinct elements of X under f are distinct, i.e., for every x1 , x2 ∈ X, f(x1 ) = f(x2
the image of some element of X under f, i.e., for every y ∈ Y, there exists an
function defined by f(x) = roll number of the student x. Show that f is one-one
but not onto.
Solution:
No two different students of the class can have same roll number. Therefore, f
must be one-one. We can assume without any loss of generality that roll
numbers of students are from 1 to 50. This implies that 51 in N is not roll
number of any student of the class, so that 51 can not be image of any element
of X under f. Hence, f is not onto.
Example:
Show that the function f : N → N, given by f(x) = 2x, is one-one but not onto.
Solution:
The function f is one-one, for f(x1 ) = f(x2 ) ⇒ 2x1 = 2x2 ⇒ x1 = x2 . Further, f is
not onto, as for 1 ∈ N, there does not exist any x in N such that f(x) = 2x = 1.
Example:
Show that the function f : N → N, given by f(1) = f(2) = 1 and f(x) = x – 1, for
Solution:
Suppose f is not one-one. Then there exists two elements, say 1 and 2 in the
domain whose image in the co-domain is same. Also, the image of 3 under f can
be only one element. Therefore, the range set can have at the most two elements
of the co-domain {1, 2, 3}, showing that f is not onto, a contradiction. Hence, f
must be one-one.
Example:
Show that a one-one function f : {1, 2, 3} → {1, 2, 3} must be onto
Solution:
Since f is one-one, three elements of {1, 2, 3} must be taken to 3 different
elements of the co-domain {1, 2, 3} under f. Hence, f has to be onto.
gof(x) = g(f(x)), ∀ x ∈ A.
Invertible Function
A function f : X → Y is defined to be invertible, if there exists a function
g : Y → X such that gof = Ix and fog = Iy . The function g is called the inverse of
-1
f and is denoted by f . Thus, if f is invertible, then f must be one-one and onto
and conversely, if f is one-one and onto, then f must be invertible. This fact
significantly helps for proving a function f to be invertible by showing that f is
Example:
Solution:
For every a ∈ X, (a, a) ∈ R, since f(a) = f(a), showing that R is reflexive.
Similarly, (a, b) ∈ R ⇒ f(a) = f(b) ⇒ f(b) = f(a) ⇒ (b, a) ∈ R. Therefore, R is
symmetric. Further, (a, b) ∈ R and (b, c) ∈ R ⇒ f(a) = f(b) and f(b) = f(c) ⇒
f(a) = f(c) ⇒ (a, c) ∈ R, which implies that R is transitive. Hence, R is an
equivalence relation.
Example:
Find the number of all one-one functions from set A = {1, 2, 3} to itself.
Solution:
One-one function from {1, 2, 3} to itself is simply a permutation on three