Chapter 1 Relations And Functions

There is no permanent place in the world for ugly mathematics … . It may be very hard to define mathematical beauty but that is just as true of beauty of any kind, we may not know quite what we mean by a beautiful poem, but that does not prevent us from recognising one when we read it. - G. H. HARDY

1.1 Introduction

Recall that the notion of relations and functions, domain, co-domain and range have been introduced in Class XI along with different types of specific real valued functions and their graphs. The concept of 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 a recognisable connection or link between the two objects or quantities. Let A be the set of students of Class XII of a school and B be the set of students of Class XI of the same school. Then some of the examples of relations from $A$ to $B$ are

(i) $\{(a, b) \in A \times B: \text{a is brother of b}\}$

(ii) $\{(a, b) \in A \times B: \text{a is sister of b}\}$,

Lejeune Dirichlet (1805-1859)

(iii) $\{(a, b) \in A \times B : \text{age of a is greater than age of b}\}$,

(iv) $\{(a, b) \in A \times B$ : total marks obtained by a in the final examination is less than the total marks obtained by b in the final examination $\}$

(v) $\{(a, b) \in A \times B: a$ lives in the same locality as $b\}$. However, abstracting from this, we define mathematically a relation $R$ from $A$ to $B$ as an arbitrary subset of $A \times B$.

If $(a, b) \in R$, we say that $a$ is related to $b$ under the relation $R$ and we write as $a R b$. In general, $(a, b) \in R$, we do not bother whether there is a recognisable connection or link between $a$ and $b$. As seen in Class XI, functions are special kind of relations.

In this chapter, we will study different types of relations and functions, composition of functions, invertible functions and binary operations.

1.2 Types of Relations

In this section, we would like to study different types of relations. We know that a relation in a set $A$ is a subset of $A \times A$. Thus, the empty set $\phi$ and $A \times A$ are two extreme relations. For illustration, consider a relation $R$ in the set $A=\{1,2,3,4\}$ given by $R=\{(a, b): a-b=10\}$. This is the empty set, as no pair $(a, b)$ satisfies the condition $a-b=10$. Similarly, $R^{\prime}=\{(a, b):|a-b| \geq 0\}$ is the whole set $A \times A$, as all pairs $(a, b)$ in A $\times$ A satisfy $|a-b| \geq 0$. These two extreme examples lead us to the following definitions.

Definition 1 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=\phi \subset A \times A$.

Definition 2 A relation $R$ in a set $A$ is called universal relation, if each element of $A$ is related to every element of $A$, i.e., $R=A \times A$.

Both the empty relation and the universal relation are some times called trivial relations.

Example 1 Let $A$ be the set of all students of a boys school. Show that the relation $R$ in $A$ given by $R=\{(a, b): a$ is sister of $b\}$ is the empty relation and $R^{\prime}=\{(a, b):$ the difference between heights of $a$ and $b$ is less than 3 meters $\}$ is the universal relation.

Solution Since the school is boys school, no student of the school can be sister of any student of the school. Hence, $R=\phi$, showing that $R$ is the empty relation. It is 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^{\prime}=A \times A$ is the universal relation.

Remark In Class XI, we have seen two ways of representing a relation, namely raster method and set builder method. However, a relation $R$ in the set $\{1,2,3,4\}$ defined by $R$ $=\{(a, b): b=a+1\}$ is also expressed as $a R b$ if and only if $b=a+1$ by many authors. We may also use this notation, as and when convenient.

If $(a, b) \in R$, we say that $a$ is related to $b$ and we denote it as $a R b$.

One of the most important relation, which plays a significant role in Mathematics, is an equivalence relation. To study equivalence relation, we first consider three types of relations, namely reflexive, symmetric and transitive.

Definition 3 A relation $R$ in a set $A$ is called

(i) reflexive, if $(a, a) \in R$, for every $a \in A$,

(ii) symmetric, if $(a_{1}, a_{2}) \in R$ implies that $(a_{2}, a_{1}) \in R$, for all $a_{1}, a_{2} \in A$.

(iii) transitive, if $(a_{1}, a_{2}) \in R$ and $(a_{2}, a_{3}) \in R$ implies that $(a_{1}, a_{3}) \in R$, for all $a_{1}, a_{2}$, $a_{3} \in A$.

Definition 4 A relation $R$ in a set $A$ is said to be an equivalence relation if $R$ is reflexive, symmetric and transitive.

Example 2 Let $T$ be the set of all triangles in a plane with $R$ a relation in $T$ given by $R=\{(T_{1}, T_{2}): T_{1}.$ is congruent to $.T_{2}\}$. Show that $R$ is an equivalence relation.

Solution $R$ is reflexive, since every triangle is congruent to itself. Further, $(T_{1}, T_{2}) \in R \Rightarrow T_{1}$ is congruent to $T_{2} \Rightarrow T_{2}$ is congruent to $T_{1} \Rightarrow(T_{2}, T_{1}) \in R$. Hence, $R$ is symmetric. Moreover, $(T_{1}, T_{2}),(T_{2}, T_{3}) \in R \Rightarrow T_{1}$ is congruent to $T_{2}$ and $T_{2}$ is congruent to $T_{3} \Rightarrow T_{1}$ is congruent to $T_{3} \Rightarrow(T_{1}, T_{3}) \in R$. Therefore, $R$ is an equivalence relation.

Example 3 $ Let L$ be the set of all lines in a plane and $R$ be the relation in $L$ defined as $R=\{(L_{1}, L_{2}): L_{1}.$ is perpendicular to $.L_{2}\}$. Show that $R$ is symmetric but neither reflexive nor transitive.

Solution $R$ is not reflexive, as a line $L_{1}$ can not be perpendicular to itself, i.e., $(L_{1}, L_{1})$ $\notin R$. R is symmetric as $(L_{1}, L_{2}) \in R$

$$ \begin{array}{ll} \Rightarrow & L_{1} \text { is perpendicular to } L_{2} \\ \Rightarrow & L_{2} \text { is perpendicular to } L_{1} \\ \Rightarrow & (L_{2}, L_{1}) \in R . \end{array} $$

$R$ is not transitive. Indeed, if $L_{1}$ is perpendicular to $L_{2}$ and $L_{2}$ is perpendicular to $L_{3}$, then $L_{1}$ can never be perpendicular to $L_{3}$. In fact, $L_{1}$ is parallel to $L_{3}$, i.e., $(L_{1}, L_{2}) \in R,(L_{2}, L_{3}) \in R$ but $(L_{1}, L_{3}) \notin R$.

Fig 1.1

Example 4 Show that the relation $R$ in the set $\{1,2,3\}$ given by R=$\{(1,1),(2,2), (3,3),(1,2),(2,3)\}$ is reflexive but neither symmetric nor transitive.

Solution $R$ is reflexive, since $(1,1),(2,2)$ and $(3,3)$ lie in $R$. Also, $R$ is not symmetric, as $(1,2) \in R$ but $(2,1) \notin R$. Similarly, $R$ is not transitive, as $(1,2) \in R$ and $(2,3) \in R$ but $(1,3) \notin R$.

Example 5 Show that the relation $R$ in the set $\mathbf{Z}$ of integers given by $R=\{(a, b): 2 \text { divides } a-b\}$ is an equivalence relation.

Solution $R$ is reflexive, as 2 divides $(a-a)$ for all $a \in \mathbf{Z}$. Further, if $(a, b) \in R$, then 2 divides $a-b$. Therefore, 2 divides $b-a$. Hence, $(b, a) \in R$, which shows that $R$ is symmetric. Similarly, if $(a, b) \in R$ and $(b, c) \in R$, then $a-b$ and $b-c$ are divisible by 2. Now, $a-c=(a-b)+(b-c)$ is even (Why?). So, $(a-c)$ is divisible by 2 . This shows that $R$ is transitive. Thus, $R$ is an equivalence relation in $\mathbf{Z}$.

In Example 5, note that all even integers are related to zero, as $(0, \pm 2),(0, \pm 4)$ etc., lie in $R$ and no odd integer is related to 0 , as $(0, \pm 1),(0, \pm 3)$ etc., do not lie in $R$. Similarly, all odd integers are related to one and no even integer is related to one. Therefore, the set $E$ of all even integers and the set $O$ of all odd integers are subsets of $\mathbf{Z}$ satisfying following conditions:

(i) All elements of $E$ are related to each other and all elements of $O$ are related to each other.

(ii) No element of $E$ is related to any element of $O$ and vice-versa.

(iii) $E$ and $O$ are disjoint and $\mathbf{Z}=E \cup O$.

The subset $E$ is called the equivalence class containing zero and is denoted by [0]. Similarly, $O$ is the equivalence class containing 1 and is denoted by [1]. Note that $[0] \neq[1],[0]=[2 r]$ and $[1]=[2 r+1], r \in \mathbf{Z}$. Infact, what we have seen above is true for an arbitrary equivalence relation $R$ in a set $X$. Given an arbitrary equivalence relation $R$ in an arbitrary set $X, R$ divides $X$ into mutually disjoint subsets $A_{i}$ called partitions or subdivisions of $X$ satisfying:

(i) all elements of $A_{i}$ are related to each other, for all $i$.

(ii) no element of $A_{i}$ is related to any element of $A_{j}, i \neq j$.

(iii) $\cup A_{j}=X$ and $A_{i} \cap A_{j}=\phi, i \neq j$.

The subsets $A_{i}$ are called equivalence classes. The interesting part of the situation is that we can go reverse also. For example, consider a subdivision of the set $\mathbf{Z}$ given by three mutually disjoint subsets $A_{1}, A_{2}$ and $A_{3}$ whose union is $\mathbf{Z}$ with

$$ \begin{aligned} & A_{1}=\{x \in \mathbf{Z}: x \text { is a multiple of } 3\}=\{\ldots,-6,-3,0,3,6, \ldots\} \\ & A_{2}=\{x \in \mathbf{Z}: x-1 \text { is a multiple of } 3\}=\{\ldots,-5,-2,1,4,7, \ldots\} \\ & A_{3}=\{x \in \mathbf{Z}: x-2 \text { is a multiple of } 3\}=\{\ldots,-4,-1,2,5,8, \ldots\} \end{aligned} $$

Define a relation $R$ in $\mathbf{Z}$ given by $R=\{(a, b): 3$ divides $a-b\}$. Following the arguments similar to those used in Example 5, we can show that $R$ is an equivalence relation. Also, $A_{1}$ coincides with the set of all integers in $\mathbf{Z}$ which are related to zero, $A_{2}$ coincides with the set of all integers which are related to 1 and $A_{3}$ coincides with the set of all integers in $\mathbf{Z}$ which are related to 2. Thus, $A_{1}=[0], A_{2}=[1]$ and $A_{3}=[2]$. In fact, $A_{1}=[3 r], A_{2}=[3 r+1]$ and $A_{3}=[3 r+2]$, for all $r \in \mathbf{Z}$.

Example 6 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, a) \in R$. Further, $(a, b) \in R \Rightarrow$ both $a$ and $b$ must be either odd or even $\Rightarrow(b, a) \in R$. Similarly, $(a, b) \in R$ and $(b, c) \in R \Rightarrow$ all elements $a, b, c$, must be either even or odd simultaneously $\Rightarrow(a, c) \in R$. Hence, $R$ is an equivalence 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 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.

1.3 Types of Functions

The notion of a function along with some special functions like identity function, constant function, polynomial function, rational function, modulus function, signum function etc. along with their graphs have been given in Class XI.

Addition, subtraction, multiplication and division of two functions have also been studied. As the concept of function is of paramount importance in mathematics and among other disciplines as well, we would like to extend our study about function from where we finished earlier. In this section, we would like to study different types of functions.

Consider the functions $f_{1}, f_{2}, f_{3}$ and $f_{4}$ given by the following diagrams.

In Fig 1.2, we observe that the images of distinct elements of $X_{1}$ under the function $f_{1}$ are distinct, but the image of two distinct elements 1 and 2 of $X_{1}$ under $f_{2}$ is same, namely $b$. Further, there are some elements like $e$ and $f$ in $X_{2}$ which are not images of any element of $X_{1}$ under $f_{1}$, while all elements of $X_{3}$ are images of some elements of $X_{1}$ under $f_{3}$. The above observations lead to the following definitions:

Definition 5 $ A$ function $f: X \rightarrow 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 $x_{1}, x_{2} \in X, f(x_{1})=f(x_{2})$ implies $x_{1}=x_{2}$. Otherwise, $f$ is called many-one.

The function $f_{1}$ and $f_{4}$ in Fig 1.2 (i) and (iv) are one-one and the function $f_{2}$ and $f_{3}$ in Fig 1.2 (ii) and (iii) are many-one.

Definition 6 A function $f: X \rightarrow Y$ is said to be onto (or surjective), if every element of $Y$ is the image of some element of $X$ under $f$, i.e., for every $y \in Y$, there exists an element $x$ in $X$ such that $f(x)=y$.

The function $f_{3}$ and $f_{4}$ in Fig 1.2 (iii), (iv) are onto and the function $f_{1}$ in Fig 1.2 (i) is not onto as elements $e, f$ in $X_{2}$ are not the image of any element in $X_{1}$ under $f_{1}$.

Fig 1.2 (i) to (iv)

Remark $f: X \rightarrow Y$ is onto if and only if Range of $f=Y$.

Definition 7 A function $f: X \rightarrow Y$ is said to be one-one and onto (or bijective), if $f$ is both one-one and onto.

The function $f_{4}$ in Fig 1.2 (iv) is one-one and onto.

Example 7 Let A be the set of all 50 students of Class $X$ in a school. Let $f: A \rightarrow \mathbf{N}$ be 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 $\mathbf{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 8 Show that the function $f: \mathbf{N}\rightarrow \mathbf{N}$, given by $f(x)=2 x$, is one-one but not onto.

Solution The function $f$ is one-one, for $f(x_{1})=f(x_{2}) \Rightarrow 2 x_{1}=2 x_{2} \Rightarrow x_{1}=x_{2}$. Further, $f$ is not onto, as for $1 \in \mathbf{N}$, there does not exist any $x$ in $\mathbf{N}$ such that $f(x)=2 x=1$.

Example 9 Prove that the function $f: \mathbf{R} \rightarrow \mathbf{R}$, given by $f(x)=2 x$, is one-one and onto. Solution $f$ is one-one, as $f(x_{1})=f(x_{2}) \Rightarrow 2 x_{1}=2 x_{2} \Rightarrow x_{1}=x_{2}$. Also, given any real number $y$ in $R$, there exists $\frac{y}{2}$ in $R$ such that $f(\frac{y}{2})=2 .(\frac{y}{2})=y$. Hence, $f$ is onto.

Fig 1.3

Example 10 Show that the function $f: \mathbf{N} \rightarrow \mathbf{N}$, given by $f(1)=f(2)=1$ and $f(x)=x-1$, for every $x>2$, is onto but not one-one.

Solution $f$ is not one-one, as $f(1)=f(2)=1$. But $f$ is onto, as given any $y \in \mathbf{N}, y \neq 1$, we can choose $x$ as $y+1$ such that $f(y+1)=y+1-1=y$. Also for $1 \in \mathbf{N}$, we have $f(1)=1$.

Example 11 Show that the function $f: \mathbf{R} \rightarrow \mathbf{R}$, defined as $f(x)=x^{2}$, is neither one-one nor onto.

Solution Since $f(-1)=1=f(1), f$ is not oneone. Also, the element -2 in the co-domain $\mathbf{R}$ is not image of any element $x$ in the domain $\mathbf{R}$ (Why?). Therefore $f$ is not onto.

Example 12 Show that $f: \mathbf{N} \rightarrow \mathbf{N}$, given by

$$ f(x)=\begin{aligned} & x+1, \text { if } x \text { is odd, } \\ & x-1, \text { if } x \text { is even } \end{aligned} $$ is both one-one and onto.

Fig 1.4

Solution Suppose $f(x_{1})=f(x_{2})$. Note that if $x_{1}$ is odd and $x_{2}$ is even, then we will have $x_{1}+1=x_{2}-1$, i.e., $x_{2}-x_{1}=2$ which is impossible. Similarly, the possibility of $x_{1}$ being even and $x_{2}$ being odd can also be ruled out, using the similar argument. Therefore, both $x_{1}$ and $x_{2}$ must be either odd or even. Suppose both $x_{1}$ and $x_{2}$ are odd. Then $f(x_{1})=f(x_{2}) \Rightarrow x_{1}+1=x_{2}+1 \Rightarrow x_{1}=x_{2}$. Similarly, if both $x_{1}$ and $x_{2}$ are even, then also $f(x_{1})=f(x_{2}) \Rightarrow x_{1}-1=x_{2}-1 \Rightarrow x_{1}=x_{2}$. Thus, $f$ is one-one. Also, any odd number $2 r+1$ in the co-domain $\mathbf{N}$ is the image of $2 r+2$ in the domain $\mathbf{N}$ and any even number $2 r$ in the co-domain $\mathbf{N}$ is the image of $2 r-1$ in the domain $\mathbf{N}$. Thus, $f$ is onto.

Example 13 Show that an onto function $f:\{1,2,3\} \Rightarrow\{1,2,3\}$ is always one-one.

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 14 Show that a one-one function $f:\{1,2,3\} \rightarrow\{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.

Remark The results mentioned in Examples 13 and 14 are also true for an arbitrary finite set $X$, i.e., a one-one function $f: X \rightarrow X$ is necessarily onto and an onto map $f: X \rightarrow X$ is necessarily one-one, for every finite set $X$. In contrast to this, Examples 8 and 10 show that for an infinite set, this may not be true. In fact, this is a characteristic difference between a finite and an infinite set.

1.4 Composition of Functions and Invertible Function

Definition 8 Let $f: A \rightarrow B$ and $g: B \rightarrow C$ be two functions. Then the composition of $f$ and $g$, denoted by $g \circ f$, is defined as the function $g \circ f: A \rightarrow C$ given by $$g o f(x)=g(f(x)), \forall x \in A$$

Fig 1.5

Example 15 Let $f:\{2,3,4,5\} \rightarrow\{3,4,5,9\}$ and $g:\{3,4,5,9\} \rightarrow\{7,11,15\}$ be functions defined as $f(2)=3, f(3)=4, f(4)=f(5)=5$ and $g(3)=g(4)=7$ and $g(5)=g(9)=11$. Find $g \circ f$.

Solution We have $g \circ f(2)=g(f(2))=g(3)=7, g \circ f(3)=g(f(3))=g(4)=7$, $g \circ f(4)=g(f(4))=g(5)=11$ and $g \circ f(5)=g(5)=11$.

Example 16 Find $g$ of and $f \circ g$, if $f: \mathbf{R} \rightarrow \mathbf{R}$ and $g: \mathbf{R} \rightarrow \mathbf{R}$ are given by $f(x)=\cos x$ and $g(x)=3 x^{2}$. Show that $g \circ f \neq f \circ g$.

Solution We have $g \circ f(x)=g(f(x))=g(\cos x)=3(\cos x)^{2}=3 \cos ^{2} x$. Similarly, $f \circ g(x)=f(g(x))=f(3 x^{2})=\cos (3 x^{2})$. Note that $3 \cos ^{2} x \neq \cos 3 x^{2}$, for $x=0$. Hence, gof $\neq$ fog.

Definition 9 A function $f: X \rightarrow Y$ is defined to be invertible, if there exists a function $g: Y \rightarrow X$ such that $g \circ f=I_{X}$ and $f \circ g=I_{Y}$. The function $g$ is called the inverse of $f$ and is denoted by $f^{-1}$.

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 one-one and onto, specially when the actual inverse of $f$ is not to be determined.

Example 17 Let $f: \mathbf{N} \rightarrow Y$ be a function defined as $f(x)=4 x+3$, where, $Y=\{y \in \mathbf{N}: y=4 x+3$ for some $x \in \mathbf{N}\}$. Show that $f$ is invertible. Find the inverse.

Solution Consider an arbitrary element $y$ of Y. By the definition of Y, $y=4 x+3$, for some $x$ in the domain $\mathbf{N}$. This shows that $x=\frac{(y-3)}{4}$. Define $g: Y \rightarrow \mathbf{N}$ by $g(y)=\frac{(y-3)}{4}$. Now, $g \circ f(x)=g(f(x))=g(4 x+3)=\frac{(4 x+3-3)}{4}=x$ and

$f \circ g(y)=f(g(y))=f(\frac{(y-3)}{4})=\frac{4(y-3)}{4}+3=y-3+3=y$. This shows that $g \circ f=I_{N}$ and $f o g=I_{Y}$, which implies that $f$ is invertible and $g$ is the inverse of $f$.

Miscellaneous Examples

Example 18 If $R_{1}$ and $R_{2}$ are equivalence relations in a set $A$, show that $R_{1} \cap R_{2}$ is also an equivalence relation.

Solution Since $R_{1}$ and $R_{2}$ are equivalence relations, $(a, a) \in R_{1}$, and $(a, a) \in R_{2} \forall a \in A$. This implies that $(a, a) \in R_{1} \cap R_{2}, \forall a$, showing $R_{1} \cap R_{2}$ is reflexive. Further, $(a, b) \in R_{1} \cap R_{2} \Rightarrow(a, b) \in R_{1}$ and $(a, b) \in R_{2} \Rightarrow(b, a) \in R_{1}$ and $(b, a) \in R_{2} \Rightarrow$ $(b, a) \in R_{1} \cap R_{2}$, hence, $R_{1} \cap R_{2}$ is symmetric. Similarly, $(a, b) \in R_{1} \cap R_{2}$ and $(b, c) \in R_{1} \cap R_{2} \Rightarrow(a, c) \in R_{1}$ and $(a, c) \in R_{2} \Rightarrow(a, c) \in R_{1} \cap R_{2}$. This shows that $R_{1} \cap R_{2}$ is transitive. Thus, $R_{1} \cap R_{2}$ is an equivalence relation.

Example 19 Let $R$ be a relation on the set $A$ of ordered pairs of positive integers defined by $(x, y) R(u, v)$ if and only if $x v=y u$. Show that $R$ is an equivalence relation.

Solution Clearly, $(x, y) R(x, y), \forall(x, y) \in A$, since $x y=y x$. This shows that $R$ is reflexive. Further, $(x, y) R(u, v) \Rightarrow x v=y u \Rightarrow u y=v x$ and hence $(u, v) R(x, y)$. This shows that $R$ is symmetric. Similarly, $(x, y) R(u, v)$ and $(u, v) R(a, b) \Rightarrow x v=y u$ and $u b=v a \Rightarrow x v \frac{a}{u}=y u \frac{a}{u} \Rightarrow x v \frac{b}{v}=y u \frac{a}{u} \Rightarrow x b=y a$ and hence $(x, y) R(a, b)$. Thus, $R$ is transitive. Thus, $R$ is an equivalence relation.

Example 20 Let $X=\{1,2,3,4,5,6,7,8,9\}$. Let $R_{1}$ be a relation in $X$ given by $R_{1}=\{(x, y): x-y$ is divisible by 3 and $R _{2}$ be another relation on $X$ given by $R _{2}= \{(x, y):\{x, y \} \subset \{1,4,7 \}\}$ or $\{x, y \} \subset \{2,5,8 \}$ or $\{x, y\} \subset \{3,6,9 \}\}$. Show that $R _{1}=R _{2}$.

Solution Note that the characteristic of sets $\{1,4,7\},\{2,5,8\}$ and $\{3,6,9\}$ is that difference between any two elements of these sets is a multiple of 3 . Therefore, $(x, y) \in R_{1} \Rightarrow x-y$ is a multiple of $3 \Rightarrow\{x, y\} \subset\{1,4,7\}$ or $\{x, y\} \subset\{2,5,8\}$ or $\{x, y\} \subset\{3,6,9\} \Rightarrow(x, y) \in R_{2}$. Hence, $R_{1} \subset R_{2}$. Similarly, $\{x, y\} \in R_{2} \Rightarrow\{x, y\}$ $\subset\{1,4,7\}$ or $\{x, y\} \subset\{2,5,8\}$ or $\{x, y\} \subset\{3,6,9\} \Rightarrow x-y$ is divisible by $3 \Rightarrow\{x, y\} \in R_{1}$. This shows that $R_{2} \subset R_{1}$. Hence, $R_{1}=R_{2}$.

Example 21 Let $f: X \rightarrow Y$ be a function. Define a relation $R$ in $X$ given by $R=\{(a, b): f(a)=f(b)\}$. Examine whether $R$ is an equivalence relation or not.

Solution For every $a \in X,(a, a) \in R$, since $f(a)=f(a)$, showing that $R$ is reflexive. Similarly, $(a, b) \in R \Rightarrow f(a)=f(b) \Rightarrow f(b)=f(a) \Rightarrow(b, a) \in R$. Therefore, $R$ is symmetric. Further, $(a, b) \in R$ and $(b, c) \in R \Rightarrow f(a)=f(b)$ and $f(b)=f(c) \Rightarrow f(a)$ $=f(c) \Rightarrow(a, c) \in R$, which implies that $R$ is transitive. Hence, $R$ is an equivalence relation.

Example 22 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 symbols $1,2,3$. Therefore, total number of one-one maps from $\{1,2,3\}$ to itself is same as total number of permutations on three symbols $1,2,3$ which is $3 !=6$.

Example 23 Let $A=\{1,2,3\}$. Then show that the number of relations containing $(1,2)$ and $(2,3)$ which are reflexive and transitive but not symmetric is three.

Solution The smallest relation $R_{1}$ containing $(1,2)$ and $(2,3)$ which is reflexive and transitive but not symmetric is $\{(1,1),(2,2),(3,3),(1,2),(2,3),(1,3)\}$. Now, if we add the pair $(2,1)$ to $R_{1}$ to get $R_{2}$, then the relation $R_{2}$ will be reflexive, transitive but not symmetric. Similarly, we can obtain $R_{3}$ by adding $(3,2)$ to $R_{1}$ to get the desired relation. However, we can not add two pairs $(2,1),(3,2)$ or single pair $(3,1)$ to $R_{1}$ at a time, as by doing so, we will be forced to add the remaining pair in order to maintain transitivity and in the process, the relation will become symmetric also which is not required. Thus, the total number of desired relations is three.

Example 24 Show that the number of equivalence relation in the set $\{1,2,3\}$ containing $(1,2)$ and $(2,1)$ is two.

Solution The smallest equivalence relation $R_{1}$ containing $(1,2)$ and $(2,1)$ is $\{(1,1)$, $(2,2),(3,3),(1,2),(2,1)\}$. Now we are left with only 4 pairs namely $(2,3),(3,2)$, $(1,3)$ and $(3,1)$. If we add any one, say $(2,3)$ to $R_{1}$, then for symmetry we must add $(3,2)$ also and now for transitivity we are forced to add $(1,3)$ and $(3,1)$. Thus, the only equivalence relation bigger than $R_{1}$ is the universal relation. This shows that the total number of equivalence relations containing $(1,2)$ and $(2,1)$ is two.

Example 25 Consider the identity function $I_{\mathbf{N}}: \mathbf{N} \rightarrow \mathbf{N}$ defined as $I_{\mathbf{N}}(x)=x \forall x \in \mathbf{N}$. Show that although $I_{\mathbf{N}}$ is onto but $I_{\mathbf{N}}+I_{\mathbf{N}}: \mathbf{N} \rightarrow \mathbf{N}$ defined as

$$ (I_{N}+I_{N})(x)=I_{N}(x)+I_{N}(x)=x+x=2 x \text { is not onto. } $$

Solution Clearly $I_{N}$ is onto. But $I_{N}+I_{N}$ is not onto, as we can find an element 3 in the co-domain $\mathbf{N}$ such that there does not exist any $x$ in the domain $\mathbf{N}$ with $(I_{N}+I_{N})(x)=2 x=3$.

Example 26 Consider a function $f:[0, \frac{\pi}{2}] \rightarrow \mathbf{R}$ given by $f(x)=\sin x$ and $g:[0, \frac{\pi}{2}] \rightarrow \mathbf{R}$ given by $g(x)=\cos x$. Show that $f$ and $g$ are one-one, but $f+g$ is not one-one.

Solution Since for any two distinct elements $x_{1}$ and $x_{2}$ in $[0, \frac{\pi}{2}], \sin x_{1} \neq \sin x_{2}$ and $\cos x_{1} \neq \cos x_{2}$, both $f$ and $g$ must be one-one. But $(f+g)(0)=\sin 0+\cos 0=1$ and $(f+g)(\frac{\pi}{2})=\sin \frac{\pi}{2}+\cos \frac{\pi}{2}=1$. Therefore, $f+g$ is not one-one.

Summary

In this chapter, we studied different types of relations and equivalence relation, composition of functions, invertible functions and binary operations. The main features of this chapter are as follows:

  • Empty relation is the relation $R$ in $X$ given by $R=\phi \subset X \times X$.

  • Universal relation is the relation $R$ in $X$ given by $R=X \times X$.

  • Reflexive relation $R$ in $X$ is a relation with $(a, a) \in R \forall a \in X$.

  • Symmetric relation $R$ in $X$ is a relation satisfying $(a, b) \in R$ implies $(b, a) \in R$.

  • Transitive relation $R$ in $X$ is a relation satisfying $(a, b) \in R$ and $(b, c) \in R$ implies that $(a, c) \in R$.

  • Equivalence relation $R$ in $X$ is a relation which is reflexive, symmetric and transitive.

  • Equivalence class $[a]$ containing $a \in X$ for an equivalence relation $R$ in $X$ is the subset of $X$ containing all elements $b$ related to $a$.

  • A function $f: X \rightarrow Y$ is one-one (or injective) if $f(x_{1})=f(x_{2}) \Rightarrow x_{1}=x_{2} \forall x_{1}, x_{2} \in X$.

  • A function $f: X \rightarrow Y$ is onto (or surjective) if given any $y \in Y, \exists x \in X$ such that $f(x)=y$.

  • A function $f: X \rightarrow Y$ is one-one and onto (or bijective), if $f$ is both one-one and onto.

  • Given a finite set $X$, a function $f: X \rightarrow X$ is one-one (respectively onto) if and only if $f$ is onto (respectively one-one). This is the characteristic property of a finite set. This is not true for infinite set

Historical Note

The concept of function has evolved over a long period of time starting from R. Descartes (1596-1650), who used the word ‘function’ in his manuscript “Geometrie” in 1637 to mean some positive integral power $x^{n}$ of a variable $x$ while studying geometrical curves like hyperbola, parabola and ellipse. James Gregory (1636-1675) in his work " Vera Circuli et Hyperbolae Quadratura" (1667) considered function as a quantity obtained from other quantities by successive use of algebraic operations or by any other operations. Later G. W. Leibnitz (1646-1716) in his manuscript “Methodus tangentium inversa, seu de functionibus” written in 1673 used the word ‘function’ to mean a quantity varying from point to point on a curve such as the coordinates of a point on the curve, the slope of the curve, the tangent and the normal to the curve at a point. However, in his manuscript “Historia” (1714), Leibnitz used the word ‘function’ to mean quantities that depend on a variable. He was the first to use the phrase ‘function of $x^{\prime}$. John Bernoulli (1667-1748) used the notation $\phi x$ for the first time in 1718 to indicate a function of $x$. But the general adoption of symbols like $f, F, \phi, \psi \ldots$ to represent functions was made by Leonhard Euler (1707-1783) in 1734 in the first part of his manuscript “Analysis Infinitorium”. Later on, Joeph Louis Lagrange (1736-1813) published his manuscripts “Theorie des functions analytiques” in 1793, where he discussed about analytic function and used the notion $f(x), F(x)$, $\phi(x)$ etc. for different function of $x$. Subsequently, Lejeunne Dirichlet (1805-1859) gave the definition of function which was being used till the set theoretic definition of function presently used, was given after set theory was developed by Georg Cantor (1845-1918). The set theoretic definition of function known to us presently is simply an abstraction of the definition given by Dirichlet in a rigorous manner.

ICAR AIEEA (UG) Exam