Join WhatsApp Icon JEE WhatsApp Group
NCERT Solutions for Class 12 Maths

Chapter 1: Relations and Functions

Download Solutions PDF
Daily JEE Updates, Tips & Important Alerts
Join 30,000+ students and stay updated with JEE notifications and preparation insights.
Join Now!
Free PDF
Complete NCERT Solution PDF for Chapter 1: Relations and Functions

NCERT Solutions For Class 12 Maths Chapter 1 Relations and Functions helps students understand the advanced concepts of mathematical relationships between sets and mappings. The page provides detailed NCERT Solutions that explain topics such as types of relations, functions, domain, codomain, range, and different types of functions. NCERT Solutions For Class 12 Maths simplify these concepts through clear explanations, examples, and step-by-step solutions. The chapter strengthens students’ understanding of mathematical connections and prepares them for calculus and other advanced topics. These solutions help learners solve textbook exercises, revise important concepts, and improve problem-solving skills. Students can access the chapter PDF for revision, practice, and exam preparation. The structured explanations make relations and functions easier to understand and apply.

Download Solutions PDF

Examples 1-6

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 \text{ is sister of } b\}$$ is the empty relation and $$R' = \{(a, b) : \text{the difference between heights of } a \text{ and } b \text{ is less than 3 meters}\}$$ is the universal relation.

Solution

Recall that a relation $$R$$ in a set $$A$$ is the empty relation if $$R = \phi \subset A \times A$$, and the universal relation if $$R = A \times A$$.

Showing $$R$$ is the empty relation. Here $$A$$ is the set of all students of a boys school. Take any two students $$a, b \in A$$. Since every member of $$A$$ is a boy, $$a$$ can never be the sister of $$b$$. So no ordered pair $$(a, b)$$ satisfies the defining condition of $$R$$.

Hence $$R$$ contains no element, i.e. $$R = \phi$$. Therefore $$R$$ is the empty relation.

Showing $$R'$$ is the universal relation. The height of any student of the school is certainly less than $$3$$ metres. Hence for any two students $$a, b \in A$$, the difference between their heights is also less than $$3$$ metres.

So every ordered pair $$(a, b)$$ with $$a, b \in A$$ satisfies the defining condition, i.e. $$(a, b) \in R'$$ for all $$a, b \in A$$.

Therefore $$R' = A \times A$$, which means $$R'$$ is the universal relation.

Answer

$$R = \phi$$ is the empty relation and $$R' = A \times A$$ is the universal relation.

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 \text{ is congruent to } T_2\}$$. Show that $$R$$ is an equivalence relation.

Solution

We verify the three properties of an equivalence relation for $$R = \{(T_1, T_2) : T_1 \text{ is congruent to } T_2\}$$ on the set $$T$$ of all triangles.

Reflexive: Every triangle is congruent to itself, since it has exactly the same sides and angles as itself. So $$(T_1, T_1) \in R$$ for every $$T_1 \in T$$. Hence $$R$$ is reflexive.

Symmetric: Let $$(T_1, T_2) \in R$$. Then $$T_1$$ is congruent to $$T_2$$. If $$T_1$$ is congruent to $$T_2$$, then $$T_2$$ is congruent to $$T_1$$. So $$(T_2, T_1) \in R$$. Hence $$R$$ is symmetric.

Transitive: Let $$(T_1, T_2) \in R$$ and $$(T_2, T_3) \in R$$. Then $$T_1$$ is congruent to $$T_2$$ and $$T_2$$ is congruent to $$T_3$$. It follows that $$T_1$$ is congruent to $$T_3$$, i.e. $$(T_1, T_3) \in R$$. Hence $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Answer

$$R$$ is reflexive, symmetric and transitive, hence 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 \text{ is perpendicular to } L_2\}$$. Show that $$R$$ is symmetric but neither reflexive nor transitive.

Solution

Let $$R = \{(L_1, L_2) : L_1 \text{ is perpendicular to } L_2\}$$ on the set $$L$$ of all lines in a plane.

Symmetric: Let $$(L_1, L_2) \in R$$, so $$L_1$$ is perpendicular to $$L_2$$. Perpendicularity is a mutual property, so $$L_2$$ is also perpendicular to $$L_1$$. Hence $$(L_2, L_1) \in R$$, and $$R$$ is symmetric.

Not reflexive: A line cannot be perpendicular to itself, because perpendicular lines meet at $$90^\circ$$ while a line makes an angle $$0^\circ$$ with itself. So $$(L_1, L_1) \notin R$$, and $$R$$ is not reflexive.

Not transitive: Take three lines $$L_1, L_2, L_3$$ in the plane with $$L_1$$ perpendicular to $$L_2$$ and $$L_2$$ perpendicular to $$L_3$$. In a plane, if both $$L_1$$ and $$L_3$$ are perpendicular to the same line $$L_2$$, then $$L_1$$ is parallel to $$L_3$$, so $$L_1$$ is not perpendicular to $$L_3$$. Thus $$(L_1, L_2) \in R$$ and $$(L_2, L_3) \in R$$ but $$(L_1, L_3) \notin R$$. Hence $$R$$ is not transitive.

Therefore $$R$$ is symmetric but neither reflexive nor transitive.

Answer

$$R$$ is symmetric but neither reflexive nor transitive.

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

The set is $$A = \{1, 2, 3\}$$ and $$R = \{(1, 1), (2, 2), (3, 3), (1, 2), (2, 3)\}$$.

Reflexive: For $$R$$ to be reflexive we need $$(a, a) \in R$$ for every $$a \in A$$. Here $$(1, 1), (2, 2)$$ and $$(3, 3)$$ all belong to $$R$$. Hence $$R$$ is reflexive.

Not symmetric: We have $$(1, 2) \in R$$, but the reverse pair $$(2, 1) \notin R$$. Since a required reverse pair is missing, $$R$$ is not symmetric.

Not transitive: We have $$(1, 2) \in R$$ and $$(2, 3) \in R$$. Transitivity would require $$(1, 3) \in R$$, but $$(1, 3) \notin R$$. Hence $$R$$ is not transitive.

Therefore $$R$$ is reflexive but neither symmetric nor transitive.

Answer

$$R$$ is reflexive but neither symmetric nor transitive.

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

Let $$R = \{(a, b) : 2 \text{ divides } a - b\}$$ on the set $$\mathbf{Z}$$ of integers.

Reflexive: For any $$a \in \mathbf{Z}$$, $$a - a = 0$$ and $$2$$ divides $$0$$. So $$(a, a) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(a, b) \in R$$. Then $$2$$ divides $$a - b$$, so $$a - b = 2k$$ for some integer $$k$$. Hence $$b - a = -(a - b) = -2k = 2(-k)$$, and since $$-k$$ is an integer, $$2$$ divides $$b - a$$. So $$(b, a) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$2$$ divides $$a - b$$ and $$2$$ divides $$b - c$$, so $$a - b = 2k$$ and $$b - c = 2l$$ for some integers $$k, l$$. Adding these, $$a - c = (a - b) + (b - c) = 2k + 2l = 2(k + l)$$. Since $$k + l$$ is an integer, $$2$$ divides $$a - c$$. So $$(a, c) \in R$$, and $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Answer

$$R$$ is an equivalence relation.

Example 6 Let $$R$$ be the relation defined in the set $$A = \{1, 2, 3, 4, 5, 6, 7\}$$ by $$R = \{(a, b) : \text{both } a \text{ and } b \text{ 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

Here $$A = \{1, 2, 3, 4, 5, 6, 7\}$$ and $$R = \{(a, b) : a \text{ and } b \text{ are both odd or both even}\}$$.

Reflexive: For any $$a \in A$$, the elements $$a$$ and $$a$$ are obviously of the same parity (both odd or both even). So $$(a, a) \in R$$, and $$R$$ is reflexive.

Symmetric: If $$(a, b) \in R$$, then $$a$$ and $$b$$ are of the same parity. This is the same statement as "$$b$$ and $$a$$ are of the same parity". So $$(b, a) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$a, b$$ have the same parity and $$b, c$$ have the same parity. Hence $$a$$ and $$c$$ both share the parity of $$b$$, so they have the same parity. So $$(a, c) \in R$$, and $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Elements of $$\{1, 3, 5, 7\}$$: All elements of this subset are odd. Any two of them are both odd, hence related. So all elements of $$\{1, 3, 5, 7\}$$ are related to each other.

Elements of $$\{2, 4, 6\}$$: All elements of this subset are even. Any two of them are both even, hence related. So all elements of $$\{2, 4, 6\}$$ are related to each other.

Cross pairs: Take any element of $$\{1, 3, 5, 7\}$$ (odd) and any element of $$\{2, 4, 6\}$$ (even). One is odd and the other is even, so they are not of the same parity. Hence no element of $$\{1, 3, 5, 7\}$$ is related to any element of $$\{2, 4, 6\}$$.

Answer

$$R$$ is an equivalence relation; $$\{1, 3, 5, 7\}$$ (all odd) form one related class and $$\{2, 4, 6\}$$ (all even) another, with no element of one class related to any element of the other.

Exercise 1.1

1 Determine whether each of the following relations are reflexive, symmetric and transitive:

(i) Relation $$R$$ in the set $$A = \{1, 2, 3, \ldots, 13, 14\}$$ defined as $$R = \{(x, y) : 3x - y = 0\}$$

Solution

Here $$A = \{1, 2, \ldots, 14\}$$ and $$R = \{(x, y) : 3x - y = 0\}$$, i.e. $$y = 3x$$ with $$x, y \in A$$. Listing the pairs: $$R = \{(1, 3), (2, 6), (3, 9), (4, 12)\}$$, since for $$x \ge 5$$ we get $$y = 3x > 14$$.

Reflexive: $$(1, 1) \notin R$$ because $$3(1) - 1 = 2 \neq 0$$. So $$R$$ is not reflexive.

Symmetric: $$(1, 3) \in R$$, but $$(3, 1) \notin R$$ since $$3(3) - 1 = 8 \neq 0$$. So $$R$$ is not symmetric.

Transitive: $$(1, 3) \in R$$ and $$(3, 9) \in R$$, but $$(1, 9) \notin R$$ since $$3(1) - 9 = -6 \neq 0$$. So $$R$$ is not transitive.

Hence $$R$$ is neither reflexive, nor symmetric, nor transitive.

Answer

$$R$$ is neither reflexive, nor symmetric, nor transitive.

(ii) Relation $$R$$ in the set $$\mathbf{N}$$ of natural numbers defined as $$R = \{(x, y) : y = x + 5 \text{ and } x < 4\}$$

Solution

Since $$x \in \mathbf{N}$$ and $$x < 4$$, we have $$x \in \{1, 2, 3\}$$, and $$y = x + 5$$. So $$R = \{(1, 6), (2, 7), (3, 8)\}$$.

Reflexive: $$(1, 1) \notin R$$ because $$1 \neq 1 + 5$$. So $$R$$ is not reflexive.

Symmetric: $$(1, 6) \in R$$, but $$(6, 1) \notin R$$ because its first coordinate $$6$$ does not satisfy $$x < 4$$. So $$R$$ is not symmetric.

Transitive: The second coordinates of the pairs in $$R$$ are $$6, 7, 8$$, and none of these ever occurs as a first coordinate. So there is no pair $$(x, y) \in R$$ and $$(y, z) \in R$$, and the condition for transitivity holds vacuously. Hence $$R$$ is transitive.

Therefore $$R$$ is transitive but neither reflexive nor symmetric.

Answer

$$R$$ is transitive but neither reflexive nor symmetric.

(iii) Relation $$R$$ in the set $$A = \{1, 2, 3, 4, 5, 6\}$$ as $$R = \{(x, y) : y \text{ is divisible by } x\}$$

Solution

Here $$A = \{1, 2, 3, 4, 5, 6\}$$ and $$R = \{(x, y) : y \text{ is divisible by } x\}$$.

Reflexive: Every number $$x$$ is divisible by itself, so $$(x, x) \in R$$ for all $$x \in A$$. Hence $$R$$ is reflexive.

Symmetric: $$(1, 2) \in R$$ because $$2$$ is divisible by $$1$$. But $$(2, 1) \notin R$$ because $$1$$ is not divisible by $$2$$. So $$R$$ is not symmetric.

Transitive: Let $$(x, y) \in R$$ and $$(y, z) \in R$$. Then $$y$$ is divisible by $$x$$ and $$z$$ is divisible by $$y$$, so $$y = xm$$ and $$z = yn$$ for some natural numbers $$m, n$$. Hence $$z = (xm)n = x(mn)$$, so $$z$$ is divisible by $$x$$, giving $$(x, z) \in R$$. So $$R$$ is transitive.

Therefore $$R$$ is reflexive and transitive but not symmetric.

Answer

$$R$$ is reflexive and transitive but not symmetric.

(iv) Relation $$R$$ in the set $$\mathbf{Z}$$ of all integers defined as $$R = \{(x, y) : x - y \text{ is an integer}\}$$

Solution

Here $$R = \{(x, y) : x - y \text{ is an integer}\}$$ on the set $$\mathbf{Z}$$ of integers.

Reflexive: For any $$x \in \mathbf{Z}$$, $$x - x = 0$$, which is an integer. So $$(x, x) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(x, y) \in R$$, so $$x - y$$ is an integer. Then $$y - x = -(x - y)$$ is also an integer. So $$(y, x) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(x, y) \in R$$ and $$(y, z) \in R$$. Then $$x - y$$ and $$y - z$$ are integers, so their sum $$(x - y) + (y - z) = x - z$$ is an integer. So $$(x, z) \in R$$, and $$R$$ is transitive.

Therefore $$R$$ is reflexive, symmetric and transitive. (In fact the difference of any two integers is always an integer, so $$R$$ is the universal relation on $$\mathbf{Z}$$.)

Answer

$$R$$ is reflexive, symmetric and transitive.

(v)

Relation $$R$$ in the set $$A$$ of human beings in a town at a particular time given by

  1. $$R = \{(x, y) : x \text{ and } y \text{ work at the same place}\}$$
  2. $$R = \{(x, y) : x \text{ and } y \text{ live in the same locality}\}$$
  3. $$R = \{(x, y) : x \text{ is exactly 7 cm taller than } y\}$$
  4. $$R = \{(x, y) : x \text{ is wife of } y\}$$
  5. $$R = \{(x, y) : x \text{ is father of } y\}$$

Solution

(1) $$x$$ and $$y$$ work at the same place: A person works at the same place as himself, so $$R$$ is reflexive. If $$x$$ works at the same place as $$y$$, then $$y$$ works at the same place as $$x$$, so $$R$$ is symmetric. If $$x, y$$ work at the same place and $$y, z$$ work at the same place, then $$x, z$$ work at the same place, so $$R$$ is transitive. Hence $$R$$ is reflexive, symmetric and transitive.

(2) $$x$$ and $$y$$ live in the same locality: By exactly the same reasoning as in (1), $$R$$ is reflexive, symmetric and transitive.

(3) $$x$$ is exactly 7 cm taller than $$y$$: $$x$$ is not $$7$$ cm taller than himself, so $$R$$ is not reflexive. If $$x$$ is $$7$$ cm taller than $$y$$, then $$y$$ is $$7$$ cm shorter than $$x$$, so $$(y, x) \notin R$$ and $$R$$ is not symmetric. If $$x$$ is $$7$$ cm taller than $$y$$ and $$y$$ is $$7$$ cm taller than $$z$$, then $$x$$ is $$14$$ cm taller than $$z$$, so $$(x, z) \notin R$$ and $$R$$ is not transitive. Hence $$R$$ is neither reflexive, nor symmetric, nor transitive.

(4) $$x$$ is wife of $$y$$: A person cannot be his/her own wife, so $$R$$ is not reflexive. If $$x$$ is the wife of $$y$$, then $$y$$ is the husband of $$x$$, so $$(y, x) \notin R$$ and $$R$$ is not symmetric. For transitivity, $$(x, y) \in R$$ and $$(y, z) \in R$$ would mean $$x$$ is the wife of $$y$$ and $$y$$ is the wife of $$z$$; but $$y$$ cannot be a wife and a husband at the same time, so no such pair exists and the condition for transitivity is satisfied vacuously. Hence $$R$$ is transitive but neither reflexive nor symmetric.

(5) $$x$$ is father of $$y$$: $$x$$ is not the father of himself, so $$R$$ is not reflexive. If $$x$$ is the father of $$y$$, then $$y$$ is the son/daughter of $$x$$, so $$(y, x) \notin R$$ and $$R$$ is not symmetric. If $$x$$ is the father of $$y$$ and $$y$$ is the father of $$z$$, then $$x$$ is the grandfather of $$z$$, so $$(x, z) \notin R$$ and $$R$$ is not transitive. Hence $$R$$ is neither reflexive, nor symmetric, nor transitive.

Answer

(1) and (2) are reflexive, symmetric and transitive. (3) and (5) are neither reflexive, nor symmetric, nor transitive. (4) is transitive but neither reflexive nor symmetric.

2 Show that the relation $$R$$ in the set $$\mathbf{R}$$ of real numbers, defined as $$R = \{(a, b) : a \leq b^2\}$$ is neither reflexive nor symmetric nor transitive.

Solution

Let $$R = \{(a, b) : a \leq b^2\}$$ on the set $$\mathbf{R}$$ of real numbers.

Not reflexive: Reflexivity would require $$a \leq a^2$$ for every real $$a$$. Take $$a = \dfrac{1}{2}$$. Then $$a^2 = \dfrac{1}{4}$$, and $$\dfrac{1}{2} \leq \dfrac{1}{4}$$ is false. So $$\left(\dfrac{1}{2}, \dfrac{1}{2}\right) \notin R$$, and $$R$$ is not reflexive.

Not symmetric: Take $$a = 1$$, $$b = 2$$. Then $$a \leq b^2$$ becomes $$1 \leq 4$$, which is true, so $$(1, 2) \in R$$. But $$(2, 1)$$ requires $$2 \leq 1^2 = 1$$, which is false, so $$(2, 1) \notin R$$. Hence $$R$$ is not symmetric.

Not transitive: Take $$a = 5$$, $$b = -3$$, $$c = 2$$. Then $$(5, -3) \in R$$ since $$5 \leq (-3)^2 = 9$$, and $$(-3, 2) \in R$$ since $$-3 \leq 2^2 = 4$$. But $$(5, 2)$$ requires $$5 \leq 2^2 = 4$$, which is false, so $$(5, 2) \notin R$$. Hence $$R$$ is not transitive.

Therefore $$R$$ is neither reflexive, nor symmetric, nor transitive.

Answer

$$R$$ is neither reflexive, nor symmetric, nor transitive.

3 Check whether the relation $$R$$ defined in the set $$\{1, 2, 3, 4, 5, 6\}$$ as $$R = \{(a, b) : b = a + 1\}$$ is reflexive, symmetric or transitive.

Solution

Here the set is $$A = \{1, 2, 3, 4, 5, 6\}$$ and $$R = \{(a, b) : b = a + 1\}$$. Listing the pairs, $$R = \{(1, 2), (2, 3), (3, 4), (4, 5), (5, 6)\}$$.

Reflexive: For $$(a, a) \in R$$ we would need $$a = a + 1$$, which is impossible. For example $$(1, 1) \notin R$$. So $$R$$ is not reflexive.

Symmetric: $$(1, 2) \in R$$ since $$2 = 1 + 1$$. But $$(2, 1) \notin R$$ since $$1 \neq 2 + 1$$. So $$R$$ is not symmetric.

Transitive: $$(1, 2) \in R$$ and $$(2, 3) \in R$$, but $$(1, 3) \notin R$$ since $$3 \neq 1 + 1$$. So $$R$$ is not transitive.

Therefore $$R$$ is neither reflexive, nor symmetric, nor transitive.

Answer

$$R$$ is neither reflexive, nor symmetric, nor transitive.

4 Show that the relation $$R$$ in $$\mathbf{R}$$ defined as $$R = \{(a, b) : a \leq b\}$$, is reflexive and transitive but not symmetric.

Solution

Let $$R = \{(a, b) : a \leq b\}$$ on the set $$\mathbf{R}$$ of real numbers.

Reflexive: For every real number $$a$$, $$a \leq a$$ is true. So $$(a, a) \in R$$, and $$R$$ is reflexive.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$a \leq b$$ and $$b \leq c$$. Combining these inequalities gives $$a \leq c$$. So $$(a, c) \in R$$, and $$R$$ is transitive.

Not symmetric: Take $$a = 1$$, $$b = 2$$. Then $$1 \leq 2$$, so $$(1, 2) \in R$$. But $$(2, 1)$$ requires $$2 \leq 1$$, which is false, so $$(2, 1) \notin R$$. Hence $$R$$ is not symmetric.

Therefore $$R$$ is reflexive and transitive but not symmetric.

Answer

$$R$$ is reflexive and transitive but not symmetric.

5 Check whether the relation $$R$$ in $$\mathbf{R}$$ defined by $$R = \{(a, b) : a \leq b^3\}$$ is reflexive, symmetric or transitive.

Solution

Let $$R = \{(a, b) : a \leq b^3\}$$ on the set $$\mathbf{R}$$.

Not reflexive: Reflexivity would require $$a \leq a^3$$ for every real $$a$$. Take $$a = \dfrac{1}{2}$$. Then $$a^3 = \dfrac{1}{8}$$, and $$\dfrac{1}{2} \leq \dfrac{1}{8}$$ is false. So $$\left(\dfrac{1}{2}, \dfrac{1}{2}\right) \notin R$$, and $$R$$ is not reflexive.

Not symmetric: Take $$a = 1$$, $$b = 2$$. Then $$1 \leq 2^3 = 8$$, so $$(1, 2) \in R$$. But $$(2, 1)$$ requires $$2 \leq 1^3 = 1$$, which is false, so $$(2, 1) \notin R$$. Hence $$R$$ is not symmetric.

Not transitive: Take $$a = 3$$, $$b = \dfrac{3}{2}$$, $$c = \dfrac{6}{5}$$. Then $$\left(3, \dfrac{3}{2}\right) \in R$$ since $$3 \leq \left(\dfrac{3}{2}\right)^3 = \dfrac{27}{8} = 3.375$$, and $$\left(\dfrac{3}{2}, \dfrac{6}{5}\right) \in R$$ since $$\dfrac{3}{2} = 1.5 \leq \left(\dfrac{6}{5}\right)^3 = \dfrac{216}{125} = 1.728$$. But $$\left(3, \dfrac{6}{5}\right)$$ requires $$3 \leq \left(\dfrac{6}{5}\right)^3 = 1.728$$, which is false, so $$\left(3, \dfrac{6}{5}\right) \notin R$$. Hence $$R$$ is not transitive.

Therefore $$R$$ is neither reflexive, nor symmetric, nor transitive.

Answer

$$R$$ is neither reflexive, nor symmetric, nor transitive.

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

Solution

The set is $$A = \{1, 2, 3\}$$ and $$R = \{(1, 2), (2, 1)\}$$.

Symmetric: $$(1, 2) \in R$$ and its reverse $$(2, 1) \in R$$; $$(2, 1) \in R$$ and its reverse $$(1, 2) \in R$$. Since every pair of $$R$$ has its reverse in $$R$$, $$R$$ is symmetric.

Not reflexive: For $$R$$ to be reflexive we would need $$(1, 1), (2, 2), (3, 3) \in R$$. But $$(1, 1) \notin R$$. So $$R$$ is not reflexive.

Not transitive: $$(1, 2) \in R$$ and $$(2, 1) \in R$$. Transitivity would require $$(1, 1) \in R$$, but $$(1, 1) \notin R$$. So $$R$$ is not transitive.

Therefore $$R$$ is symmetric but neither reflexive nor transitive.

Answer

$$R$$ is symmetric but neither reflexive nor transitive.

7 Show that the relation $$R$$ in the set $$A$$ of all the books in a library of a college, given by $$R = \{(x, y) : x \text{ and } y \text{ have same number of pages}\}$$ is an equivalence relation.

Solution

Let $$R = \{(x, y) : x \text{ and } y \text{ have the same number of pages}\}$$ on the set $$A$$ of all books in the library.

Reflexive: Any book $$x$$ has the same number of pages as itself. So $$(x, x) \in R$$ for every $$x \in A$$, and $$R$$ is reflexive.

Symmetric: Let $$(x, y) \in R$$. Then $$x$$ and $$y$$ have the same number of pages, which is the same as saying $$y$$ and $$x$$ have the same number of pages. So $$(y, x) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(x, y) \in R$$ and $$(y, z) \in R$$. Then $$x$$ and $$y$$ have the same number of pages, and $$y$$ and $$z$$ have the same number of pages. Hence $$x$$ and $$z$$ have the same number of pages, so $$(x, z) \in R$$, and $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Answer

$$R$$ is an equivalence relation.

8 Show that the relation $$R$$ in the set $$A = \{1, 2, 3, 4, 5\}$$ given by $$R = \{(a, b) : |a - b| \text{ is even}\}$$, is an equivalence relation. Show that all the elements of $$\{1, 3, 5\}$$ are related to each other and all the elements of $$\{2, 4\}$$ are related to each other. But no element of $$\{1, 3, 5\}$$ is related to any element of $$\{2, 4\}$$.

Solution

Here $$A = \{1, 2, 3, 4, 5\}$$ and $$R = \{(a, b) : |a - b| \text{ is even}\}$$. Note that $$|a - b|$$ is even exactly when $$a$$ and $$b$$ have the same parity (both odd or both even).

Reflexive: For any $$a \in A$$, $$|a - a| = 0$$, which is even. So $$(a, a) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(a, b) \in R$$, so $$|a - b|$$ is even. Since $$|b - a| = |a - b|$$, $$|b - a|$$ is also even. So $$(b, a) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$|a - b|$$ is even and $$|b - c|$$ is even, so $$a, b$$ have the same parity and $$b, c$$ have the same parity. Hence $$a$$ and $$c$$ have the same parity, so $$|a - c|$$ is even, giving $$(a, c) \in R$$. So $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Elements of $$\{1, 3, 5\}$$: These are all odd. For any two of them the difference is even, so each pair is related. Hence all elements of $$\{1, 3, 5\}$$ are related to each other.

Elements of $$\{2, 4\}$$: These are both even, and $$|2 - 4| = 2$$ is even, so $$2$$ and $$4$$ are related to each other.

Cross pairs: Take an element of $$\{1, 3, 5\}$$ (odd) and an element of $$\{2, 4\}$$ (even). Their difference is odd, hence not even. So no element of $$\{1, 3, 5\}$$ is related to any element of $$\{2, 4\}$$.

Answer

$$R$$ is an equivalence relation; the odd numbers $$\{1, 3, 5\}$$ are all related to each other, the even numbers $$\{2, 4\}$$ are related to each other, and no odd element is related to any even element.

9 Show that each of the relation $$R$$ in the set $$A = \{x \in \mathbf{Z} : 0 \leq x \leq 12\}$$, given by is an equivalence relation. Find the set of all elements related to 1 in each case.

(i) $$R = \{(a, b) : |a - b| \text{ is a multiple of } 4\}$$

Solution

The set is $$A = \{x \in \mathbf{Z} : 0 \leq x \leq 12\} = \{0, 1, 2, \ldots, 12\}$$ and $$R = \{(a, b) : |a - b| \text{ is a multiple of } 4\}$$.

Reflexive: For any $$a \in A$$, $$|a - a| = 0 = 4 \times 0$$, a multiple of $$4$$. So $$(a, a) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(a, b) \in R$$, so $$|a - b|$$ is a multiple of $$4$$. Since $$|b - a| = |a - b|$$, $$|b - a|$$ is also a multiple of $$4$$. So $$(b, a) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$a - b = \pm 4m$$ and $$b - c = \pm 4n$$ for some non-negative integers $$m, n$$. Adding, $$a - c = (a - b) + (b - c)$$ is a multiple of $$4$$, so $$|a - c|$$ is a multiple of $$4$$. Hence $$(a, c) \in R$$, and $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Elements related to $$1$$: We need all $$a \in A$$ with $$|a - 1|$$ a multiple of $$4$$, i.e. $$|a - 1| \in \{0, 4, 8, 12, \ldots\}$$. This gives $$a - 1 \in \{0, \pm 4, \pm 8, \ldots\}$$, so $$a \in \{1, 5, 9, \ldots\}$$ or $$a \in \{-3, -7, \ldots\}$$. Keeping only values in $$A = \{0, \ldots, 12\}$$, we get $$a \in \{1, 5, 9\}$$.

Hence the set of all elements related to $$1$$ is $$\{1, 5, 9\}$$.

Answer

$$R$$ is an equivalence relation; the set of elements related to $$1$$ is $$\{1, 5, 9\}$$.

(ii) $$R = \{(a, b) : a = b\}$$

Solution

The set is $$A = \{0, 1, 2, \ldots, 12\}$$ and $$R = \{(a, b) : a = b\}$$.

Reflexive: For any $$a \in A$$, $$a = a$$ is true. So $$(a, a) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(a, b) \in R$$, so $$a = b$$. Then $$b = a$$, so $$(b, a) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$a = b$$ and $$b = c$$, hence $$a = c$$. So $$(a, c) \in R$$, and $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Elements related to $$1$$: We need all $$a \in A$$ with $$a = 1$$. The only such element is $$1$$ itself.

Hence the set of all elements related to $$1$$ is $$\{1\}$$.

Answer

$$R$$ is an equivalence relation; the set of elements related to $$1$$ is $$\{1\}$$.

10 Give an example of a relation. Which is

(i) Symmetric but neither reflexive nor transitive.

Solution

Consider the set $$A = \{1, 2, 3\}$$ and the relation $$R = \{(1, 2), (2, 1)\}$$.

Symmetric: $$(1, 2) \in R$$ and its reverse $$(2, 1) \in R$$; $$(2, 1) \in R$$ and its reverse $$(1, 2) \in R$$. So $$R$$ is symmetric.

Not reflexive: $$(1, 1) \notin R$$, so $$R$$ is not reflexive.

Not transitive: $$(1, 2) \in R$$ and $$(2, 1) \in R$$, but $$(1, 1) \notin R$$. So $$R$$ is not transitive.

Hence $$R = \{(1, 2), (2, 1)\}$$ on $$\{1, 2, 3\}$$ is symmetric but neither reflexive nor transitive.

Answer

$$R = \{(1, 2), (2, 1)\}$$ on the set $$\{1, 2, 3\}$$.

(ii) Transitive but neither reflexive nor symmetric.

Solution

Consider the relation $$R = \{(a, b) : a < b\}$$ on the set $$\mathbf{R}$$ of real numbers.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$a < b$$ and $$b < c$$, hence $$a < c$$. So $$(a, c) \in R$$, and $$R$$ is transitive.

Not reflexive: $$a < a$$ is never true, so $$(a, a) \notin R$$ for every $$a$$. Hence $$R$$ is not reflexive.

Not symmetric: Take $$a = 1$$, $$b = 2$$. Then $$1 < 2$$, so $$(1, 2) \in R$$. But $$2 < 1$$ is false, so $$(2, 1) \notin R$$. Hence $$R$$ is not symmetric.

Hence $$R = \{(a, b) : a < b\}$$ is transitive but neither reflexive nor symmetric.

Answer

$$R = \{(a, b) : a < b\}$$ on $$\mathbf{R}$$.

(iii) Reflexive and symmetric but not transitive.

Solution

Consider the set $$A = \{1, 2, 3\}$$ and the relation $$R = \{(1, 1), (2, 2), (3, 3), (1, 2), (2, 1), (2, 3), (3, 2)\}$$.

Reflexive: $$(1, 1), (2, 2), (3, 3) \in R$$, so $$R$$ is reflexive.

Symmetric: Every pair in $$R$$ has its reverse in $$R$$: $$(1, 2)$$ with $$(2, 1)$$, and $$(2, 3)$$ with $$(3, 2)$$ (and the pairs $$(a, a)$$ are their own reverses). So $$R$$ is symmetric.

Not transitive: $$(1, 2) \in R$$ and $$(2, 3) \in R$$, but $$(1, 3) \notin R$$. So $$R$$ is not transitive.

Hence this relation $$R$$ is reflexive and symmetric but not transitive.

Answer

$$R = \{(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2)\}$$ on the set $$\{1, 2, 3\}$$.

(iv) Reflexive and transitive but not symmetric.

Solution

Consider the relation $$R = \{(a, b) : a \leq b\}$$ on the set $$\mathbf{R}$$ of real numbers.

Reflexive: For every real $$a$$, $$a \leq a$$ is true, so $$(a, a) \in R$$. Hence $$R$$ is reflexive.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$a \leq b$$ and $$b \leq c$$, hence $$a \leq c$$. So $$(a, c) \in R$$, and $$R$$ is transitive.

Not symmetric: Take $$a = 1$$, $$b = 2$$. Then $$1 \leq 2$$, so $$(1, 2) \in R$$, but $$2 \leq 1$$ is false, so $$(2, 1) \notin R$$. Hence $$R$$ is not symmetric.

Hence $$R = \{(a, b) : a \leq b\}$$ is reflexive and transitive but not symmetric.

Answer

$$R = \{(a, b) : a \leq b\}$$ on $$\mathbf{R}$$.

(v) Symmetric and transitive but not reflexive.

Solution

Consider the set $$A = \{1, 2, 3\}$$ and the relation $$R = \{(1, 1), (2, 2), (1, 2), (2, 1)\}$$.

Symmetric: Every pair in $$R$$ has its reverse in $$R$$: $$(1, 2)$$ with $$(2, 1)$$, and $$(1, 1), (2, 2)$$ are their own reverses. So $$R$$ is symmetric.

Transitive: The only ways to form a chain $$(a, b), (b, c)$$ from $$R$$ all give a pair already in $$R$$. For instance $$(1, 2), (2, 1) \Rightarrow (1, 1) \in R$$; $$(2, 1), (1, 2) \Rightarrow (2, 2) \in R$$; $$(1, 2), (2, 2) \Rightarrow (1, 2) \in R$$, and so on. So $$R$$ is transitive.

Not reflexive: $$(3, 3) \notin R$$, although $$3 \in A$$. So $$R$$ is not reflexive.

Hence $$R = \{(1, 1), (2, 2), (1, 2), (2, 1)\}$$ is symmetric and transitive but not reflexive.

Answer

$$R = \{(1,1),(2,2),(1,2),(2,1)\}$$ on the set $$\{1, 2, 3\}$$.

11 Show that the relation $$R$$ in the set $$A$$ of points in a plane given by $$R = \{(P, Q) : \text{distance of the point } P \text{ from the origin is same as the distance of the point } Q \text{ from the origin}\}$$, is an equivalence relation. Further, show that the set of all points related to a point $$P \neq (0, 0)$$ is the circle passing through $$P$$ with origin as centre.

Solution

Let $$O$$ denote the origin, and for a point $$P$$ let $$d(P)$$ be the distance of $$P$$ from $$O$$. The relation is $$R = \{(P, Q) : d(P) = d(Q)\}$$ on the set $$A$$ of all points of the plane.

Reflexive: For any point $$P$$, $$d(P) = d(P)$$. So $$(P, P) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(P, Q) \in R$$, so $$d(P) = d(Q)$$. Then $$d(Q) = d(P)$$, so $$(Q, P) \in R$$, and $$R$$ is symmetric.

Transitive: Let $$(P, Q) \in R$$ and $$(Q, S) \in R$$. Then $$d(P) = d(Q)$$ and $$d(Q) = d(S)$$, hence $$d(P) = d(S)$$. So $$(P, S) \in R$$, and $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Set of points related to a fixed point $$P \neq (0, 0)$$: A point $$Q$$ is related to $$P$$ if and only if $$d(Q) = d(P)$$, i.e. $$Q$$ is at a fixed distance $$d(P)$$ from the origin.

Let $$k = d(P) > 0$$ (since $$P \neq (0,0)$$). The set of all points $$Q$$ with $$d(Q) = k$$ is precisely the circle of radius $$k$$ with centre at the origin. Since $$d(P) = k$$, this circle passes through $$P$$.

Hence the set of all points related to $$P$$ is the circle passing through $$P$$ with the origin as centre.

Answer

$$R$$ is an equivalence relation; the set of points related to a point $$P \neq (0,0)$$ is the circle through $$P$$ centred at the origin.

12 Show that the relation $$R$$ defined in the set $$A$$ of all triangles as $$R = \{(T_1, T_2) : T_1 \text{ is similar to } T_2\}$$, is equivalence relation. Consider three right angle triangles $$T_1$$ with sides $$3, 4, 5$$, $$T_2$$ with sides $$5, 12, 13$$ and $$T_3$$ with sides $$6, 8, 10$$. Which triangles among $$T_1$$, $$T_2$$ and $$T_3$$ are related?

Solution

Let $$R = \{(T_1, T_2) : T_1 \text{ is similar to } T_2\}$$ on the set $$A$$ of all triangles.

Reflexive: Every triangle is similar to itself, so $$(T, T) \in R$$ for every triangle $$T$$. Hence $$R$$ is reflexive.

Symmetric: If $$T_1$$ is similar to $$T_2$$, then $$T_2$$ is similar to $$T_1$$. So $$(T_1, T_2) \in R \Rightarrow (T_2, T_1) \in R$$, and $$R$$ is symmetric.

Transitive: If $$T_1$$ is similar to $$T_2$$ and $$T_2$$ is similar to $$T_3$$, then $$T_1$$ is similar to $$T_3$$. So $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Which of $$T_1, T_2, T_3$$ are related: Two triangles are similar if their corresponding sides are in the same ratio. Arrange the sides of each triangle in increasing order.

$$T_1 : 3, 4, 5$$ and $$T_3 : 6, 8, 10$$. The ratios of corresponding sides are $$\dfrac{3}{6} = \dfrac{4}{8} = \dfrac{5}{10} = \dfrac{1}{2}$$. All three ratios are equal, so $$T_1$$ is similar to $$T_3$$.

$$T_1 : 3, 4, 5$$ and $$T_2 : 5, 12, 13$$. The ratios are $$\dfrac{3}{5}, \dfrac{4}{12} = \dfrac{1}{3}, \dfrac{5}{13}$$. These are not all equal, so $$T_1$$ is not similar to $$T_2$$ (and likewise $$T_2$$ is not similar to $$T_3$$).

Hence $$T_1$$ and $$T_3$$ are related to each other, while $$T_2$$ is related to neither.

Answer

$$R$$ is an equivalence relation; $$T_1$$ and $$T_3$$ are related (similar), but $$T_2$$ is not related to $$T_1$$ or $$T_3$$.

13 Show that the relation $$R$$ defined in the set $$A$$ of all polygons as $$R = \{(P_1, P_2) : P_1 \text{ and } P_2 \text{ have same number of sides}\}$$, is an equivalence relation. What is the set of all elements in $$A$$ related to the right angle triangle $$T$$ with sides $$3, 4$$ and $$5$$?

Solution

Let $$R = \{(P_1, P_2) : P_1 \text{ and } P_2 \text{ have the same number of sides}\}$$ on the set $$A$$ of all polygons.

Reflexive: Any polygon $$P$$ has the same number of sides as itself, so $$(P, P) \in R$$. Hence $$R$$ is reflexive.

Symmetric: If $$P_1$$ and $$P_2$$ have the same number of sides, then $$P_2$$ and $$P_1$$ have the same number of sides. So $$(P_1, P_2) \in R \Rightarrow (P_2, P_1) \in R$$, and $$R$$ is symmetric.

Transitive: If $$P_1, P_2$$ have the same number of sides and $$P_2, P_3$$ have the same number of sides, then $$P_1, P_3$$ have the same number of sides. So $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Elements related to the triangle $$T$$: The triangle $$T$$ with sides $$3, 4, 5$$ has $$3$$ sides. A polygon $$P$$ is related to $$T$$ if and only if $$P$$ has the same number of sides as $$T$$, i.e. $$3$$ sides.

Hence the set of all elements related to $$T$$ is the set of all triangles in $$A$$ (all three-sided polygons).

Answer

$$R$$ is an equivalence relation; the set of polygons related to $$T$$ is the set of all triangles (all three-sided polygons).

14 Let $$L$$ be the set of all lines in XY plane and $$R$$ be the relation in $$L$$ defined as $$R = \{(L_1, L_2) : L_1 \text{ is parallel to } L_2\}$$. Show that $$R$$ is an equivalence relation. Find the set of all lines related to the line $$y = 2x + 4$$.

Solution

Let $$R = \{(L_1, L_2) : L_1 \text{ is parallel to } L_2\}$$ on the set $$L$$ of all lines in the XY-plane. (Here a line is taken to be parallel to itself.)

Reflexive: Every line is parallel to itself, so $$(L_1, L_1) \in R$$. Hence $$R$$ is reflexive.

Symmetric: If $$L_1$$ is parallel to $$L_2$$, then $$L_2$$ is parallel to $$L_1$$. So $$(L_1, L_2) \in R \Rightarrow (L_2, L_1) \in R$$, and $$R$$ is symmetric.

Transitive: If $$L_1$$ is parallel to $$L_2$$ and $$L_2$$ is parallel to $$L_3$$, then $$L_1$$ is parallel to $$L_3$$. So $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Lines related to $$y = 2x + 4$$: The line $$y = 2x + 4$$ has slope $$2$$. A line is parallel to it precisely when it has the same slope $$2$$. Every line of slope $$2$$ can be written as $$y = 2x + c$$ for some real constant $$c$$.

Hence the set of all lines related to $$y = 2x + 4$$ is $$\{y = 2x + c : c \in \mathbf{R}\}$$, i.e. the family of all lines with slope $$2$$.

Answer

$$R$$ is an equivalence relation; the set of lines related to $$y = 2x + 4$$ is $$\{y = 2x + c : c \in \mathbf{R}\}$$ (all lines of slope $$2$$).

15

Let $$R$$ be the relation in the set $$\{1, 2, 3, 4\}$$ given by $$R = \{(1, 2), (2, 2), (1, 1), (4, 4), (1, 3), (3, 3), (3, 2)\}$$. Choose the correct answer.

  1. $$R$$ is reflexive and symmetric but not transitive.
  2. $$R$$ is reflexive and transitive but not symmetric.
  3. $$R$$ is symmetric and transitive but not reflexive.
  4. $$R$$ is an equivalence relation.

Solution

The set is $$A = \{1, 2, 3, 4\}$$ and $$R = \{(1, 2), (2, 2), (1, 1), (4, 4), (1, 3), (3, 3), (3, 2)\}$$.

Reflexive: $$(1, 1), (2, 2), (3, 3), (4, 4)$$ are all present in $$R$$. So $$R$$ is reflexive.

Symmetric: $$(1, 2) \in R$$, but $$(2, 1) \notin R$$. So $$R$$ is not symmetric.

Transitive: We check every chain $$(a, b), (b, c)$$ in $$R$$:

  • $$(1, 1), (1, 2) \Rightarrow (1, 2) \in R$$ ✓
  • $$(1, 1), (1, 3) \Rightarrow (1, 3) \in R$$ ✓
  • $$(1, 2), (2, 2) \Rightarrow (1, 2) \in R$$ ✓
  • $$(1, 3), (3, 3) \Rightarrow (1, 3) \in R$$ ✓
  • $$(1, 3), (3, 2) \Rightarrow (1, 2) \in R$$ ✓
  • $$(3, 3), (3, 2) \Rightarrow (3, 2) \in R$$ ✓
  • $$(3, 2), (2, 2) \Rightarrow (3, 2) \in R$$ ✓

Every required pair is present, so $$R$$ is transitive.

Thus $$R$$ is reflexive and transitive but not symmetric. The correct answer is (B).

Answer

(B) $$R$$ is reflexive and transitive but not symmetric.

16

Let $$R$$ be the relation in the set $$\mathbf{N}$$ given by $$R = \{(a, b) : a = b - 2, b > 6\}$$. Choose the correct answer.

  1. $$(2, 4) \in R$$
  2. $$(3, 8) \in R$$
  3. $$(6, 8) \in R$$
  4. $$(8, 7) \in R$$

Solution

A pair $$(a, b)$$ belongs to $$R$$ if and only if both conditions hold: $$a = b - 2$$ and $$b > 6$$. We test each option.

(A) $$(2, 4)$$: Here $$b = 4$$, and $$b > 6$$ is false. So $$(2, 4) \notin R$$.

(B) $$(3, 8)$$: Here $$b = 8 > 6$$ ✓, but $$a = b - 2 = 8 - 2 = 6$$, while the given $$a = 3 \neq 6$$. So $$(3, 8) \notin R$$.

(C) $$(6, 8)$$: Here $$b = 8 > 6$$ ✓, and $$a = b - 2 = 8 - 2 = 6$$, which matches the given $$a = 6$$ ✓. So $$(6, 8) \in R$$.

(D) $$(8, 7)$$: Here $$b = 7 > 6$$ ✓, but $$a = b - 2 = 7 - 2 = 5$$, while the given $$a = 8 \neq 5$$. So $$(8, 7) \notin R$$.

The correct answer is (C).

Answer

(C) $$(6, 8) \in R$$.

Examples 7-14

Example 7 Let $$A$$ be the set of all 50 students of Class X in a school. Let $$f : A \to \mathbf{N}$$ be function defined by $$f(x) = \text{roll number of the student } x$$. Show that $$f$$ is one-one but not onto.

Solution

Here $$A$$ has $$50$$ students and $$f : A \to \mathbf{N}$$ sends each student to his/her roll number.

One-one: No two different students of a class can be assigned the same roll number. So if $$x_1$$ and $$x_2$$ are two students with $$f(x_1) = f(x_2)$$, then they have the same roll number, which forces $$x_1 = x_2$$. Hence $$f$$ is one-one.

Not onto: The codomain is $$\mathbf{N}$$, which is infinite, but only $$50$$ roll numbers (those of the $$50$$ students) actually occur as images. So at least one natural number, for instance $$51$$, is not the roll number of any student in $$A$$. Thus there is an element of the codomain $$\mathbf{N}$$ that has no preimage, and $$f$$ is not onto.

Therefore $$f$$ is one-one but not onto.

Answer

$$f$$ is one-one but not onto.

Example 8 Show that the function $$f : \mathbf{N} \to \mathbf{N}$$, given by $$f(x) = 2x$$, is one-one but not onto.

Solution

The function is $$f : \mathbf{N} \to \mathbf{N}$$ with $$f(x) = 2x$$.

One-one: Let $$x_1, x_2 \in \mathbf{N}$$ with $$f(x_1) = f(x_2)$$. Then $$2x_1 = 2x_2$$, and dividing by $$2$$ gives $$x_1 = x_2$$. Hence $$f$$ is one-one.

Not onto: The image $$f(x) = 2x$$ is always an even natural number. Consider $$1 \in \mathbf{N}$$ (the codomain). If $$1$$ had a preimage, we would need $$2x = 1$$, i.e. $$x = \dfrac{1}{2}$$, which is not a natural number. So $$1$$ has no preimage in $$\mathbf{N}$$, and $$f$$ is not onto.

Therefore $$f$$ is one-one but not onto.

Answer

$$f$$ is one-one but not onto.

Example 9 Prove that the function $$f : \mathbf{R} \to \mathbf{R}$$, given by $$f(x) = 2x$$, is one-one and onto.

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = 2x$$.

One-one: Let $$x_1, x_2 \in \mathbf{R}$$ with $$f(x_1) = f(x_2)$$. Then $$2x_1 = 2x_2$$, so $$x_1 = x_2$$. Hence $$f$$ is one-one.

Onto: Let $$y$$ be any element of the codomain $$\mathbf{R}$$. We must find $$x \in \mathbf{R}$$ with $$f(x) = y$$, i.e. $$2x = y$$. Choosing $$x = \dfrac{y}{2}$$, which is a real number, we get $$f\left(\dfrac{y}{2}\right) = 2 \cdot \dfrac{y}{2} = y$$. So every $$y \in \mathbf{R}$$ has a preimage, and $$f$$ is onto.

Therefore $$f$$ is one-one and onto, i.e. $$f$$ is a bijection.

Answer

$$f$$ is one-one and onto (a bijection).

Example 10 Show that the function $$f : \mathbf{N} \to \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

The function $$f : \mathbf{N} \to \mathbf{N}$$ is defined by $$f(1) = f(2) = 1$$ and $$f(x) = x - 1$$ for every $$x > 2$$.

Not one-one: We have $$f(1) = 1$$ and $$f(2) = 1$$, so $$f(1) = f(2)$$, yet $$1 \neq 2$$. Hence $$f$$ is not one-one.

Onto: Let $$y$$ be any element of the codomain $$\mathbf{N}$$.

  • If $$y = 1$$, then $$f(1) = 1 = y$$, so $$y$$ has the preimage $$1$$.
  • If $$y \geq 2$$, take $$x = y + 1$$. Then $$x = y + 1 > 2$$, so $$f(x) = x - 1 = (y + 1) - 1 = y$$. Thus $$y$$ has the preimage $$y + 1$$.

So every $$y \in \mathbf{N}$$ has a preimage in $$\mathbf{N}$$, and $$f$$ is onto.

Therefore $$f$$ is onto but not one-one.

Answer

$$f$$ is onto but not one-one.

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

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = x^2$$.

Not one-one: Take $$x_1 = 1$$ and $$x_2 = -1$$. Then $$f(1) = 1^2 = 1$$ and $$f(-1) = (-1)^2 = 1$$, so $$f(1) = f(-1)$$, but $$1 \neq -1$$. Hence $$f$$ is not one-one.

Not onto: For every real $$x$$, $$f(x) = x^2 \geq 0$$. Consider the element $$-2$$ of the codomain $$\mathbf{R}$$. If $$-2$$ had a preimage, we would need $$x^2 = -2$$, which is impossible for a real $$x$$. So $$-2$$ has no preimage, and $$f$$ is not onto.

Therefore $$f$$ is neither one-one nor onto.

Answer

$$f$$ is neither one-one nor onto.

Example 12 Show that $$f : \mathbf{N} \to \mathbf{N}$$, given by $$f(x) = \begin{cases} x+1, & \text{if } x \text{ is odd} \\ x-1, & \text{if } x \text{ is even} \end{cases}$$ is both one-one and onto.

Solution

The function $$f : \mathbf{N} \to \mathbf{N}$$ is $$f(x) = x + 1$$ if $$x$$ is odd, and $$f(x) = x - 1$$ if $$x$$ is even. Note that if $$x$$ is odd then $$x + 1$$ is even, and if $$x$$ is even then $$x - 1$$ is odd. So $$f$$ sends odd numbers to even numbers and even numbers to odd numbers.

One-one: Suppose $$f(x_1) = f(x_2)$$.

  • If one of $$x_1, x_2$$ is odd and the other is even, then one image is even and the other is odd, so they cannot be equal. Hence $$x_1$$ and $$x_2$$ must have the same parity.
  • If both are odd: $$f(x_1) = f(x_2)$$ gives $$x_1 + 1 = x_2 + 1$$, so $$x_1 = x_2$$.
  • If both are even: $$f(x_1) = f(x_2)$$ gives $$x_1 - 1 = x_2 - 1$$, so $$x_1 = x_2$$.

In every case $$x_1 = x_2$$, so $$f$$ is one-one.

Onto: Let $$y$$ be any element of the codomain $$\mathbf{N}$$.

  • If $$y$$ is odd, then $$y + 1$$ is even, and $$f(y + 1) = (y + 1) - 1 = y$$.
  • If $$y$$ is even, then $$y \geq 2$$, so $$y - 1 \in \mathbf{N}$$ and $$y - 1$$ is odd; then $$f(y - 1) = (y - 1) + 1 = y$$.

So every $$y \in \mathbf{N}$$ has a preimage, and $$f$$ is onto.

Therefore $$f$$ is both one-one and onto.

Answer

$$f$$ is both one-one and onto (a bijection).

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

Solution

Let $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ be an onto function.

Suppose, on the contrary, that $$f$$ is not one-one. Then at least two distinct elements of the domain have the same image. So among the three values $$f(1), f(2), f(3)$$, at least two are equal, which means the set of images $$\{f(1), f(2), f(3)\}$$ contains at most $$2$$ distinct elements.

Hence the range of $$f$$ has at most $$2$$ elements, so it cannot equal the codomain $$\{1, 2, 3\}$$ which has $$3$$ elements. This contradicts the assumption that $$f$$ is onto.

Therefore our supposition is wrong, and $$f$$ must be one-one. Hence every onto function $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ is one-one.

Answer

Proved: every onto function $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ is one-one.

Example 14 Show that a one-one function $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ must be onto.

Solution

Let $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ be a one-one function.

Since $$f$$ is one-one, the three elements $$1, 2, 3$$ of the domain have three distinct images $$f(1), f(2), f(3)$$.

So the range $$\{f(1), f(2), f(3)\}$$ contains exactly $$3$$ distinct elements, all lying in the codomain $$\{1, 2, 3\}$$. But the codomain itself has only $$3$$ elements. A $$3$$-element subset of a $$3$$-element set must be the whole set.

Hence the range equals the codomain $$\{1, 2, 3\}$$, which means $$f$$ is onto.

Therefore every one-one function $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ must be onto.

Answer

Proved: every one-one function $$f : \{1, 2, 3\} \to \{1, 2, 3\}$$ is onto.

Exercise 1.2

1 Show that the function $$f : \mathbf{R}_* \to \mathbf{R}_*$$ defined by $$f(x) = \dfrac{1}{x}$$ is one-one and onto, where $$\mathbf{R}_*$$ is the set of all non-zero real numbers. Is the result true, if the domain $$\mathbf{R}_*$$ is replaced by $$\mathbf{N}$$ with co-domain being same as $$\mathbf{R}_*$$?

Solution

The function is $$f : \mathbf{R}_* \to \mathbf{R}_*$$ with $$f(x) = \dfrac{1}{x}$$, where $$\mathbf{R}_*$$ is the set of all non-zero real numbers.

One-one: Let $$x_1, x_2 \in \mathbf{R}_*$$ with $$f(x_1) = f(x_2)$$. Then $$\dfrac{1}{x_1} = \dfrac{1}{x_2}$$. Taking reciprocals, $$x_1 = x_2$$. Hence $$f$$ is one-one.

Onto: Let $$y \in \mathbf{R}_*$$ be any element of the codomain. Take $$x = \dfrac{1}{y}$$, which is a non-zero real number, so $$x \in \mathbf{R}_*$$. Then $$f(x) = \dfrac{1}{x} = \dfrac{1}{1/y} = y$$. So every $$y$$ has a preimage, and $$f$$ is onto.

Hence $$f$$ is one-one and onto.

When the domain is replaced by $$\mathbf{N}$$: Consider $$g : \mathbf{N} \to \mathbf{R}_*$$ defined by $$g(x) = \dfrac{1}{x}$$.

One-one: The same argument as above shows $$g(x_1) = g(x_2) \Rightarrow x_1 = x_2$$, so $$g$$ is still one-one.

Onto: Take $$y = 2 \in \mathbf{R}_*$$. If $$2$$ had a preimage, we would need $$\dfrac{1}{x} = 2$$, i.e. $$x = \dfrac{1}{2}$$, which is not a natural number. So $$2$$ has no preimage in $$\mathbf{N}$$, and $$g$$ is not onto.

Therefore the result is not true when the domain is replaced by $$\mathbf{N}$$: $$g$$ is one-one but not onto.

Answer

$$f : \mathbf{R}_* \to \mathbf{R}_*$$ is one-one and onto. With domain replaced by $$\mathbf{N}$$, the function is one-one but not onto, so the result does not hold.

2 Check the injectivity and surjectivity of the following functions:

(i) $$f : \mathbf{N} \to \mathbf{N}$$ given by $$f(x) = x^2$$

Solution

The function is $$f : \mathbf{N} \to \mathbf{N}$$ with $$f(x) = x^2$$.

Injectivity: Let $$x_1, x_2 \in \mathbf{N}$$ with $$f(x_1) = f(x_2)$$. Then $$x_1^2 = x_2^2$$, so $$x_1^2 - x_2^2 = 0$$, i.e. $$(x_1 - x_2)(x_1 + x_2) = 0$$. Since $$x_1, x_2 \in \mathbf{N}$$, we have $$x_1 + x_2 > 0$$, so $$x_1 - x_2 = 0$$, giving $$x_1 = x_2$$. Hence $$f$$ is injective (one-one).

Surjectivity: Consider $$2 \in \mathbf{N}$$ (the codomain). If $$2$$ had a preimage, we would need $$x^2 = 2$$, i.e. $$x = \sqrt{2}$$, which is not a natural number. So $$2$$ has no preimage, and $$f$$ is not surjective (not onto).

Hence $$f$$ is injective but not surjective.

Answer

$$f$$ is injective but not surjective.

(ii) $$f : \mathbf{Z} \to \mathbf{Z}$$ given by $$f(x) = x^2$$

Solution

The function is $$f : \mathbf{Z} \to \mathbf{Z}$$ with $$f(x) = x^2$$.

Injectivity: Take $$x_1 = 1$$ and $$x_2 = -1$$, both in $$\mathbf{Z}$$. Then $$f(1) = 1^2 = 1$$ and $$f(-1) = (-1)^2 = 1$$, so $$f(1) = f(-1)$$ but $$1 \neq -1$$. Hence $$f$$ is not injective.

Surjectivity: For every integer $$x$$, $$f(x) = x^2 \geq 0$$. Consider $$-2 \in \mathbf{Z}$$ (the codomain). It cannot be written as $$x^2$$ for any integer $$x$$, so it has no preimage. Hence $$f$$ is not surjective.

Therefore $$f$$ is neither injective nor surjective.

Answer

$$f$$ is neither injective nor surjective.

(iii) $$f : \mathbf{R} \to \mathbf{R}$$ given by $$f(x) = x^2$$

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = x^2$$.

Injectivity: Take $$x_1 = 1$$ and $$x_2 = -1$$, both in $$\mathbf{R}$$. Then $$f(1) = 1$$ and $$f(-1) = 1$$, so $$f(1) = f(-1)$$ but $$1 \neq -1$$. Hence $$f$$ is not injective.

Surjectivity: For every real $$x$$, $$f(x) = x^2 \geq 0$$. Consider $$-2 \in \mathbf{R}$$ (the codomain). Since $$x^2 = -2$$ has no real solution, $$-2$$ has no preimage. Hence $$f$$ is not surjective.

Therefore $$f$$ is neither injective nor surjective.

Answer

$$f$$ is neither injective nor surjective.

(iv) $$f : \mathbf{N} \to \mathbf{N}$$ given by $$f(x) = x^3$$

Solution

The function is $$f : \mathbf{N} \to \mathbf{N}$$ with $$f(x) = x^3$$.

Injectivity: Let $$x_1, x_2 \in \mathbf{N}$$ with $$f(x_1) = f(x_2)$$. Then $$x_1^3 = x_2^3$$. Taking cube roots (the cube root of a positive number is unique), $$x_1 = x_2$$. Hence $$f$$ is injective.

Surjectivity: Consider $$2 \in \mathbf{N}$$ (the codomain). If $$2$$ had a preimage, we would need $$x^3 = 2$$, i.e. $$x = \sqrt[3]{2}$$, which is not a natural number. So $$2$$ has no preimage, and $$f$$ is not surjective.

Therefore $$f$$ is injective but not surjective.

Answer

$$f$$ is injective but not surjective.

(v) $$f : \mathbf{Z} \to \mathbf{Z}$$ given by $$f(x) = x^3$$

Solution

The function is $$f : \mathbf{Z} \to \mathbf{Z}$$ with $$f(x) = x^3$$.

Injectivity: Let $$x_1, x_2 \in \mathbf{Z}$$ with $$f(x_1) = f(x_2)$$. Then $$x_1^3 = x_2^3$$. Since the cube function $$t \mapsto t^3$$ is strictly increasing on $$\mathbf{R}$$, equal cubes force equal numbers, so $$x_1 = x_2$$. Hence $$f$$ is injective.

Surjectivity: Consider $$2 \in \mathbf{Z}$$ (the codomain). If $$2$$ had a preimage, we would need $$x^3 = 2$$, i.e. $$x = \sqrt[3]{2}$$, which is not an integer. So $$2$$ has no preimage, and $$f$$ is not surjective.

Therefore $$f$$ is injective but not surjective.

Answer

$$f$$ is injective but not surjective.

3 Prove that the Greatest Integer Function $$f : \mathbf{R} \to \mathbf{R}$$, given by $$f(x) = [x]$$, is neither one-one nor onto, where $$[x]$$ denotes the greatest integer less than or equal to $$x$$.

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = [x]$$, where $$[x]$$ is the greatest integer not exceeding $$x$$.

Not one-one: Take $$x_1 = 1.2$$ and $$x_2 = 1.7$$. Then $$f(1.2) = [1.2] = 1$$ and $$f(1.7) = [1.7] = 1$$, so $$f(1.2) = f(1.7)$$, but $$1.2 \neq 1.7$$. Hence $$f$$ is not one-one. (In fact every $$x$$ in $$1 \leq x < 2$$ has image $$1$$.)

Not onto: The value $$[x]$$ is always an integer. So the range of $$f$$ is the set of integers $$\mathbf{Z}$$. Consider a non-integer element of the codomain, say $$0.5 \in \mathbf{R}$$. Since $$[x]$$ can never equal $$0.5$$, the number $$0.5$$ has no preimage. Hence $$f$$ is not onto.

Therefore the greatest integer function is neither one-one nor onto.

Answer

$$f$$ is neither one-one nor onto.

4 Show that the Modulus Function $$f : \mathbf{R} \to \mathbf{R}$$, given by $$f(x) = |x|$$, is neither one-one nor onto, where $$|x|$$ is $$x$$, if $$x$$ is positive or $$0$$ and $$|x|$$ is $$-x$$, if $$x$$ is negative.

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = |x|$$, where $$|x| = x$$ for $$x \geq 0$$ and $$|x| = -x$$ for $$x < 0$$.

Not one-one: Take $$x_1 = -1$$ and $$x_2 = 1$$. Then $$f(-1) = |-1| = 1$$ and $$f(1) = |1| = 1$$, so $$f(-1) = f(1)$$, but $$-1 \neq 1$$. Hence $$f$$ is not one-one.

Not onto: For every real $$x$$, $$f(x) = |x| \geq 0$$. So the range of $$f$$ consists only of non-negative reals. Consider $$-1 \in \mathbf{R}$$ (the codomain). Since $$|x|$$ can never be negative, $$-1$$ has no preimage. Hence $$f$$ is not onto.

Therefore the modulus function is neither one-one nor onto.

Answer

$$f$$ is neither one-one nor onto.

5 Show that the Signum Function $$f : \mathbf{R} \to \mathbf{R}$$, given by $$f(x) = \begin{cases} 1, & \text{if } x > 0 \\ 0, & \text{if } x = 0 \\ -1, & \text{if } x < 0 \end{cases}$$ is neither one-one nor onto.

Solution

The signum function $$f : \mathbf{R} \to \mathbf{R}$$ takes the value $$1$$ for $$x > 0$$, $$0$$ for $$x = 0$$, and $$-1$$ for $$x < 0$$.

Not one-one: Take $$x_1 = 1$$ and $$x_2 = 2$$. Both are positive, so $$f(1) = 1$$ and $$f(2) = 1$$, giving $$f(1) = f(2)$$, but $$1 \neq 2$$. Hence $$f$$ is not one-one. (Indeed, all positive reals share the image $$1$$.)

Not onto: The function takes only three values, so its range is $$\{-1, 0, 1\}$$. Consider $$2 \in \mathbf{R}$$ (the codomain). Since $$f(x)$$ is never equal to $$2$$, the number $$2$$ has no preimage. Hence $$f$$ is not onto.

Therefore the signum function is neither one-one nor onto.

Answer

$$f$$ is neither one-one nor onto.

6 Let $$A = \{1, 2, 3\}$$, $$B = \{4, 5, 6, 7\}$$ and let $$f = \{(1, 4), (2, 5), (3, 6)\}$$ be a function from $$A$$ to $$B$$. Show that $$f$$ is one-one.

Solution

The function $$f : A \to B$$ is given by the pairs $$f = \{(1, 4), (2, 5), (3, 6)\}$$, that is, $$f(1) = 4$$, $$f(2) = 5$$ and $$f(3) = 6$$.

A function is one-one if distinct elements of the domain have distinct images. The three images are

$$f(1) = 4, \qquad f(2) = 5, \qquad f(3) = 6.$$

These three values $$4, 5, 6$$ are all different from one another. So no two distinct elements of $$A$$ have the same image; equivalently, if $$f(x_1) = f(x_2)$$ then it must be the same pair, forcing $$x_1 = x_2$$.

Hence $$f$$ is one-one.

Answer

$$f$$ is one-one, since the images $$f(1)=4,\ f(2)=5,\ f(3)=6$$ are all distinct.

7 In each of the following cases, state whether the function is one-one, onto or bijective. Justify your answer.

(i) $$f : \mathbf{R} \to \mathbf{R}$$ defined by $$f(x) = 3 - 4x$$

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = 3 - 4x$$.

One-one: Let $$x_1, x_2 \in \mathbf{R}$$ with $$f(x_1) = f(x_2)$$. Then $$3 - 4x_1 = 3 - 4x_2$$. Subtracting $$3$$ from both sides gives $$-4x_1 = -4x_2$$, and dividing by $$-4$$ gives $$x_1 = x_2$$. Hence $$f$$ is one-one.

Onto: Let $$y \in \mathbf{R}$$ be any element of the codomain. We solve $$f(x) = y$$: $$3 - 4x = y$$, so $$4x = 3 - y$$, giving $$x = \dfrac{3 - y}{4}$$, which is a real number. Then $$f\left(\dfrac{3 - y}{4}\right) = 3 - 4 \cdot \dfrac{3 - y}{4} = 3 - (3 - y) = y$$. So every $$y$$ has a preimage, and $$f$$ is onto.

Since $$f$$ is both one-one and onto, $$f$$ is bijective.

Answer

$$f$$ is one-one and onto, hence bijective.

(ii) $$f : \mathbf{R} \to \mathbf{R}$$ defined by $$f(x) = 1 + x^2$$

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = 1 + x^2$$.

One-one: Take $$x_1 = 1$$ and $$x_2 = -1$$. Then $$f(1) = 1 + 1^2 = 2$$ and $$f(-1) = 1 + (-1)^2 = 2$$, so $$f(1) = f(-1)$$, but $$1 \neq -1$$. Hence $$f$$ is not one-one.

Onto: For every real $$x$$, $$x^2 \geq 0$$, so $$f(x) = 1 + x^2 \geq 1$$. Thus the range of $$f$$ is contained in $$[1, \infty)$$. Consider $$0 \in \mathbf{R}$$ (the codomain). Since $$f(x) \geq 1 > 0$$ for all $$x$$, the value $$0$$ has no preimage. Hence $$f$$ is not onto.

Therefore $$f$$ is neither one-one nor onto (and hence not bijective).

Answer

$$f$$ is neither one-one nor onto (not bijective).

8 Let $$A$$ and $$B$$ be sets. Show that $$f : A \times B \to B \times A$$ such that $$f(a, b) = (b, a)$$ is bijective function.

Solution

The function $$f : A \times B \to B \times A$$ is defined by $$f(a, b) = (b, a)$$ for every $$(a, b) \in A \times B$$.

One-one: Let $$(a_1, b_1)$$ and $$(a_2, b_2)$$ be elements of $$A \times B$$ with $$f(a_1, b_1) = f(a_2, b_2)$$. Then $$(b_1, a_1) = (b_2, a_2)$$. Two ordered pairs are equal exactly when their corresponding components are equal, so $$b_1 = b_2$$ and $$a_1 = a_2$$. Hence $$(a_1, b_1) = (a_2, b_2)$$, and $$f$$ is one-one.

Onto: Let $$(b, a)$$ be any element of the codomain $$B \times A$$, so $$b \in B$$ and $$a \in A$$. Then $$(a, b) \in A \times B$$, and $$f(a, b) = (b, a)$$. So every element of $$B \times A$$ has a preimage, and $$f$$ is onto.

Since $$f$$ is both one-one and onto, $$f$$ is a bijective function.

Answer

$$f$$ is one-one and onto, hence bijective.

9 Let $$f : \mathbf{N} \to \mathbf{N}$$ be defined by $$f(n) = \begin{cases} \dfrac{n+1}{2}, & \text{if } n \text{ is odd} \\ \dfrac{n}{2}, & \text{if } n \text{ is even} \end{cases}$$ for all $$n \in \mathbf{N}$$. State whether the function $$f$$ is bijective. Justify your answer.

Solution

The function $$f : \mathbf{N} \to \mathbf{N}$$ is $$f(n) = \dfrac{n+1}{2}$$ if $$n$$ is odd, and $$f(n) = \dfrac{n}{2}$$ if $$n$$ is even. Some values: $$f(1) = \dfrac{2}{2} = 1$$, $$f(2) = \dfrac{2}{2} = 1$$, $$f(3) = \dfrac{4}{2} = 2$$, $$f(4) = \dfrac{4}{2} = 2$$, and so on.

One-one: We have $$f(1) = 1$$ and $$f(2) = 1$$, so $$f(1) = f(2)$$, but $$1 \neq 2$$. Hence $$f$$ is not one-one.

Onto: Let $$y$$ be any element of the codomain $$\mathbf{N}$$. Take $$n = 2y$$, which is an even natural number. Then $$f(2y) = \dfrac{2y}{2} = y$$. So every $$y \in \mathbf{N}$$ has a preimage, and $$f$$ is onto.

Since $$f$$ is onto but not one-one, $$f$$ is not bijective.

Answer

$$f$$ is not bijective: it is onto but not one-one (for example $$f(1) = f(2) = 1$$).

10 Let $$A = \mathbf{R} - \{3\}$$ and $$B = \mathbf{R} - \{1\}$$. Consider the function $$f : A \to B$$ defined by $$f(x) = \left( \dfrac{x - 2}{x - 3} \right)$$. Is $$f$$ one-one and onto? Justify your answer.

Solution

Here $$A = \mathbf{R} - \{3\}$$, $$B = \mathbf{R} - \{1\}$$ and $$f(x) = \dfrac{x - 2}{x - 3}$$.

One-one: Let $$x_1, x_2 \in A$$ with $$f(x_1) = f(x_2)$$. Then $$\dfrac{x_1 - 2}{x_1 - 3} = \dfrac{x_2 - 2}{x_2 - 3}$$. Cross-multiplying,

$$(x_1 - 2)(x_2 - 3) = (x_2 - 2)(x_1 - 3).$$

Expanding both sides: $$x_1 x_2 - 3x_1 - 2x_2 + 6 = x_1 x_2 - 3x_2 - 2x_1 + 6$$. Cancelling $$x_1 x_2$$ and $$6$$,

$$-3x_1 - 2x_2 = -3x_2 - 2x_1 \;\Rightarrow\; -3x_1 + 2x_1 = -3x_2 + 2x_2 \;\Rightarrow\; -x_1 = -x_2,$$

so $$x_1 = x_2$$. Hence $$f$$ is one-one.

Onto: Let $$y \in B$$, so $$y \neq 1$$. We solve $$y = \dfrac{x - 2}{x - 3}$$ for $$x$$:

$$y(x - 3) = x - 2 \;\Rightarrow\; yx - 3y = x - 2 \;\Rightarrow\; yx - x = 3y - 2 \;\Rightarrow\; x(y - 1) = 3y - 2.$$

Since $$y \neq 1$$, we may divide: $$x = \dfrac{3y - 2}{y - 1}$$, a real number. We must check $$x \in A$$, i.e. $$x \neq 3$$. If $$x = 3$$ then $$\dfrac{3y - 2}{y - 1} = 3$$, giving $$3y - 2 = 3y - 3$$, i.e. $$-2 = -3$$, which is false. So $$x \neq 3$$ and $$x \in A$$.

Substituting back confirms $$f(x) = y$$. So every $$y \in B$$ has a preimage in $$A$$, and $$f$$ is onto.

Therefore $$f$$ is both one-one and onto.

Answer

Yes; $$f$$ is both one-one and onto.

11

Let $$f : \mathbf{R} \to \mathbf{R}$$ be defined as $$f(x) = x^4$$. Choose the correct answer.

  1. $$f$$ is one-one onto
  2. $$f$$ is many-one onto
  3. $$f$$ is one-one but not onto
  4. $$f$$ is neither one-one nor onto.

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = x^4$$.

Check one-one: Take $$x_1 = 1$$ and $$x_2 = -1$$. Then $$f(1) = 1^4 = 1$$ and $$f(-1) = (-1)^4 = 1$$, so $$f(1) = f(-1)$$ but $$1 \neq -1$$. Hence $$f$$ is not one-one (it is many-one).

Check onto: For every real $$x$$, $$f(x) = x^4 \geq 0$$. Consider $$-1 \in \mathbf{R}$$ (the codomain). Since $$x^4 = -1$$ has no real solution, $$-1$$ has no preimage. Hence $$f$$ is not onto.

So $$f$$ is neither one-one nor onto. The correct answer is (D).

Answer

(D) $$f$$ is neither one-one nor onto.

12

Let $$f : \mathbf{R} \to \mathbf{R}$$ be defined as $$f(x) = 3x$$. Choose the correct answer.

  1. $$f$$ is one-one onto
  2. $$f$$ is many-one onto
  3. $$f$$ is one-one but not onto
  4. $$f$$ is neither one-one nor onto.

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = 3x$$.

Check one-one: Let $$x_1, x_2 \in \mathbf{R}$$ with $$f(x_1) = f(x_2)$$. Then $$3x_1 = 3x_2$$, so $$x_1 = x_2$$. Hence $$f$$ is one-one.

Check onto: Let $$y \in \mathbf{R}$$ be any element of the codomain. Take $$x = \dfrac{y}{3} \in \mathbf{R}$$. Then $$f\left(\dfrac{y}{3}\right) = 3 \cdot \dfrac{y}{3} = y$$. So every $$y$$ has a preimage, and $$f$$ is onto.

So $$f$$ is one-one and onto. The correct answer is (A).

Answer

(A) $$f$$ is one-one onto.

Examples 15-17

Example 15 Let $$f : \{2, 3, 4, 5\} \to \{3, 4, 5, 9\}$$ and $$g : \{3, 4, 5, 9\} \to \{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 $$gof$$.

Solution

The composite $$gof$$ is defined by $$(gof)(x) = g(f(x))$$, and its domain is the domain of $$f$$, namely $$\{2, 3, 4, 5\}$$. We compute it at each element.

$$(gof)(2) = g(f(2)) = g(3) = 7$$

$$(gof)(3) = g(f(3)) = g(4) = 7$$

$$(gof)(4) = g(f(4)) = g(5) = 11$$

$$(gof)(5) = g(f(5)) = g(5) = 11$$

Collecting these results,

$$gof = \{(2, 7), (3, 7), (4, 11), (5, 11)\}.$$

Answer

$$gof = \{(2, 7), (3, 7), (4, 11), (5, 11)\}$$.

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

Solution

We are given $$f(x) = \cos x$$ and $$g(x) = 3x^2$$, both from $$\mathbf{R}$$ to $$\mathbf{R}$$.

Computing $$gof$$: $$(gof)(x) = g(f(x)) = g(\cos x) = 3(\cos x)^2 = 3\cos^2 x$$.

Computing $$fog$$: $$(fog)(x) = f(g(x)) = f(3x^2) = \cos(3x^2)$$.

Showing $$gof \neq fog$$: It is enough to find one value of $$x$$ at which the two composites differ. Take $$x = 0$$:

$$(gof)(0) = 3\cos^2 0 = 3(1)^2 = 3,$$

$$(fog)(0) = \cos(3 \cdot 0^2) = \cos 0 = 1.$$

Since $$(gof)(0) = 3 \neq 1 = (fog)(0)$$, the two functions are not equal. Hence $$gof \neq fog$$.

Answer

$$gof(x) = 3\cos^2 x$$ and $$fog(x) = \cos(3x^2)$$; since e.g. $$gof(0) = 3 \neq 1 = fog(0)$$, we have $$gof \neq fog$$.

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

Solution

The function is $$f : \mathbf{N} \to Y$$ with $$f(x) = 4x + 3$$, and $$Y$$ is the range of $$f$$, i.e. $$Y = \{y \in \mathbf{N} : y = 4x + 3 \text{ for some } x \in \mathbf{N}\}$$. A function is invertible if and only if it is both one-one and onto.

One-one: Let $$x_1, x_2 \in \mathbf{N}$$ with $$f(x_1) = f(x_2)$$. Then $$4x_1 + 3 = 4x_2 + 3$$, so $$4x_1 = 4x_2$$, giving $$x_1 = x_2$$. Hence $$f$$ is one-one.

Onto: Let $$y \in Y$$. By the definition of $$Y$$, there exists some $$x \in \mathbf{N}$$ with $$y = 4x + 3 = f(x)$$. So every $$y \in Y$$ has a preimage, and $$f$$ is onto.

Since $$f$$ is one-one and onto, it is invertible.

Finding the inverse: To invert, solve $$y = 4x + 3$$ for $$x$$: $$4x = y - 3$$, so $$x = \dfrac{y - 3}{4}$$. Define $$g : Y \to \mathbf{N}$$ by $$g(y) = \dfrac{y - 3}{4}$$.

We verify that $$g$$ is the inverse of $$f$$:

$$(gof)(x) = g(f(x)) = g(4x + 3) = \dfrac{(4x + 3) - 3}{4} = \dfrac{4x}{4} = x,$$

$$(fog)(y) = f(g(y)) = f\!\left(\dfrac{y - 3}{4}\right) = 4 \cdot \dfrac{y - 3}{4} + 3 = (y - 3) + 3 = y.$$

So $$gof = I_{\mathbf{N}}$$ and $$fog = I_Y$$. Hence $$f$$ is invertible with inverse $$f^{-1}(y) = \dfrac{y - 3}{4}$$.

Answer

$$f$$ is invertible, with $$f^{-1} : Y \to \mathbf{N}$$ given by $$f^{-1}(y) = \dfrac{y - 3}{4}$$.

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

Let $$R_1$$ and $$R_2$$ be equivalence relations on the set $$A$$. We show $$R_1 \cap R_2$$ is reflexive, symmetric and transitive. Recall $$(a, b) \in R_1 \cap R_2$$ means $$(a, b) \in R_1$$ and $$(a, b) \in R_2$$.

Reflexive: Let $$a \in A$$. Since $$R_1$$ is reflexive, $$(a, a) \in R_1$$; since $$R_2$$ is reflexive, $$(a, a) \in R_2$$. Hence $$(a, a) \in R_1 \cap R_2$$, so $$R_1 \cap R_2$$ is reflexive.

Symmetric: Let $$(a, b) \in R_1 \cap R_2$$. Then $$(a, b) \in R_1$$ and $$(a, b) \in R_2$$. As $$R_1$$ is symmetric, $$(b, a) \in R_1$$; as $$R_2$$ is symmetric, $$(b, a) \in R_2$$. Hence $$(b, a) \in R_1 \cap R_2$$, so $$R_1 \cap R_2$$ is symmetric.

Transitive: Let $$(a, b) \in R_1 \cap R_2$$ and $$(b, c) \in R_1 \cap R_2$$. Then $$(a, b), (b, c) \in R_1$$, and since $$R_1$$ is transitive, $$(a, c) \in R_1$$. Likewise $$(a, b), (b, c) \in R_2$$, and since $$R_2$$ is transitive, $$(a, c) \in R_2$$. Hence $$(a, c) \in R_1 \cap R_2$$, so $$R_1 \cap R_2$$ is transitive.

Since $$R_1 \cap R_2$$ is reflexive, symmetric and transitive, it is an equivalence relation.

Answer

Proved: $$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 $$xv = yu$$. Show that $$R$$ is an equivalence relation.

Solution

Here $$A$$ is the set of ordered pairs of positive integers, and $$(x, y) \, R \, (u, v)$$ means $$xv = yu$$.

Reflexive: For any $$(x, y) \in A$$, we have $$xy = yx$$ (multiplication is commutative). This is exactly the condition $$(x, y) \, R \, (x, y)$$. Hence $$R$$ is reflexive.

Symmetric: Let $$(x, y) \, R \, (u, v)$$, so $$xv = yu$$. This can be rewritten as $$uy = vx$$, i.e. $$u y = v x$$, which is precisely the condition $$(u, v) \, R \, (x, y)$$. Hence $$R$$ is symmetric.

Transitive: Let $$(x, y) \, R \, (u, v)$$ and $$(u, v) \, R \, (a, b)$$. Then

$$xv = yu \qquad \text{and} \qquad ub = va.$$

Multiply the first equation by $$b$$: $$xvb = yub$$. Now substitute $$ub = va$$ on the right side: $$xvb = y(va) = yva$$. So $$xvb = yva$$, which we write as $$v(xb) = v(ya)$$.

Since $$v$$ is a positive integer, $$v \neq 0$$, so we may cancel it to get $$xb = ya$$. This is exactly the condition $$(x, y) \, R \, (a, b)$$. Hence $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Answer

Proved: $$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 \text{ is divisible by } 3\}$$ and $$R_2$$ be another relation on $$X$$ given by $$R_2 = \{(x, y) : \{x, y\} \subset \{1, 4, 7\} \text{ or } \{x, y\} \subset \{2, 5, 8\} \text{ or } \{x, y\} \subset \{3, 6, 9\}\}$$. Show that $$R_1 = R_2$$.

Solution

Group the elements of $$X$$ by their remainder on division by $$3$$:

  • remainder $$1$$: $$\{1, 4, 7\}$$,
  • remainder $$2$$: $$\{2, 5, 8\}$$,
  • remainder $$0$$: $$\{3, 6, 9\}$$.

The key fact is: $$x - y$$ is divisible by $$3$$ if and only if $$x$$ and $$y$$ leave the same remainder on division by $$3$$, i.e. if and only if $$x$$ and $$y$$ belong to the same one of the three subsets above.

To show $$R_1 = R_2$$, we prove $$R_1 \subseteq R_2$$ and $$R_2 \subseteq R_1$$.

$$R_1 \subseteq R_2$$: Let $$(x, y) \in R_1$$, so $$x - y$$ is divisible by $$3$$. Then $$x$$ and $$y$$ have the same remainder mod $$3$$, so they lie in the same subset $$\{1,4,7\}$$, $$\{2,5,8\}$$ or $$\{3,6,9\}$$. Hence $$\{x, y\}$$ is a subset of one of these, so $$(x, y) \in R_2$$.

$$R_2 \subseteq R_1$$: Let $$(x, y) \in R_2$$. Then $$\{x, y\}$$ lies entirely within one of the subsets, so $$x$$ and $$y$$ have the same remainder mod $$3$$. Therefore $$x - y$$ is divisible by $$3$$, giving $$(x, y) \in R_1$$.

Since each relation is contained in the other, $$R_1 = R_2$$.

Answer

Proved: $$R_1 = R_2$$.

Example 21 Let $$f : X \to 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

The relation on $$X$$ is $$R = \{(a, b) : f(a) = f(b)\}$$.

Reflexive: For any $$a \in X$$, clearly $$f(a) = f(a)$$. So $$(a, a) \in R$$, and $$R$$ is reflexive.

Symmetric: Let $$(a, b) \in R$$, so $$f(a) = f(b)$$. Then $$f(b) = f(a)$$, which means $$(b, a) \in R$$. Hence $$R$$ is symmetric.

Transitive: Let $$(a, b) \in R$$ and $$(b, c) \in R$$. Then $$f(a) = f(b)$$ and $$f(b) = f(c)$$. Combining, $$f(a) = f(c)$$, so $$(a, c) \in R$$. Hence $$R$$ is transitive.

Since $$R$$ is reflexive, symmetric and transitive, $$R$$ is an equivalence relation.

Answer

Yes, $$R$$ is an equivalence relation.

Example 22 Find the number of all one-one functions from set $$A = \{1, 2, 3\}$$ to itself.

Solution

A one-one function $$f : A \to A$$ with $$A = \{1, 2, 3\}$$ must assign distinct images to the three elements $$1, 2, 3$$. We count the choices step by step.

Choice of $$f(1)$$: it can be any of the $$3$$ elements of $$A$$.

Choice of $$f(2)$$: to keep $$f$$ one-one it must differ from $$f(1)$$, so there are $$2$$ choices left.

Choice of $$f(3)$$: it must differ from both $$f(1)$$ and $$f(2)$$, leaving $$1$$ choice.

By the multiplication principle, the total number of one-one functions is

$$3 \times 2 \times 1 = 6.$$

(These are exactly the $$3! = 6$$ arrangements of $$\{1, 2, 3\}$$.)

Answer

There are $$3! = 6$$ one-one functions from $$A$$ to itself.

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

We need relations $$R$$ on $$A = \{1, 2, 3\}$$ that contain $$(1, 2)$$ and $$(2, 3)$$, and are reflexive and transitive but not symmetric.

Forced pairs. Being reflexive, $$R$$ must contain $$(1, 1), (2, 2), (3, 3)$$. It must contain the given $$(1, 2)$$ and $$(2, 3)$$. By transitivity, $$(1, 2) \in R$$ and $$(2, 3) \in R$$ force $$(1, 3) \in R$$.

So every such relation contains at least

$$R_1 = \{(1, 1), (2, 2), (3, 3), (1, 2), (2, 3), (1, 3)\}.$$

One checks $$R_1$$ is reflexive and transitive, and it is not symmetric (e.g. $$(1, 2) \in R_1$$ but $$(2, 1) \notin R_1$$). So $$R_1$$ is one such relation.

Adding more pairs. The only pairs not yet in $$R_1$$ are $$(2, 1), (3, 2), (3, 1)$$.

  • $$R_2 = R_1 \cup \{(2, 1)\}$$: checking all chains, $$R_2$$ stays transitive (for instance $$(2,1),(1,3) \Rightarrow (2,3) \in R_2$$), and it is still not symmetric since $$(2, 3) \in R_2$$ but $$(3, 2) \notin R_2$$. Valid.
  • $$R_3 = R_1 \cup \{(3, 2)\}$$: checking all chains, $$R_3$$ stays transitive (for instance $$(3,2),(2,3) \Rightarrow (3,3) \in R_3$$), and it is still not symmetric since $$(1, 2) \in R_3$$ but $$(2, 1) \notin R_3$$. Valid.
  • If we add both $$(2, 1)$$ and $$(3, 2)$$, then transitivity ($$(3,2),(2,1) \Rightarrow (3,1)$$) also forces $$(3, 1)$$; the relation then contains every pair, making it symmetric. Adding $$(3, 1)$$ alone forces (via $$(3,1),(1,2)$$) the pair $$(3, 2)$$, and then $$(2,3),(3,1) \Rightarrow (2,1)$$, again leading to the symmetric universal relation.

So no further pairs can be added while remaining "not symmetric". Hence exactly three relations work: $$R_1, R_2, R_3$$.

Answer

There are exactly three such relations.

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

Solution

We need equivalence relations $$R$$ on $$A = \{1, 2, 3\}$$ containing $$(1, 2)$$ and $$(2, 1)$$.

Forced pairs. Being reflexive, $$R$$ must contain $$(1, 1), (2, 2), (3, 3)$$. It must contain the given $$(1, 2)$$ and $$(2, 1)$$. So $$R$$ contains at least

$$R_1 = \{(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)\}.$$

$$R_1$$ is an equivalence relation: it is reflexive; it is symmetric (the only non-diagonal pairs $$(1,2)$$ and $$(2,1)$$ are reverses of each other); and it is transitive — the possible chains all close up, e.g. $$(1,2),(2,1) \Rightarrow (1,1) \in R_1$$ and $$(2,1),(1,2) \Rightarrow (2,2) \in R_1$$. So $$R_1$$ is one such relation.

Any larger relation. Suppose an equivalence relation $$R$$ containing $$(1, 2), (2, 1)$$ is strictly larger than $$R_1$$. Then it must contain a pair linking $$3$$ to $$1$$ or $$2$$, say $$(1, 3)$$ (or $$(2, 3)$$, etc.). Then:

  • symmetry forces $$(3, 1) \in R$$;
  • transitivity with $$(2, 1), (1, 3)$$ forces $$(2, 3) \in R$$, and symmetry forces $$(3, 2) \in R$$.

Now $$R$$ contains all $$9$$ ordered pairs of $$A$$, i.e. $$R = A \times A$$, the universal relation $$R_2$$, which is indeed an equivalence relation.

So an equivalence relation containing $$(1, 2)$$ and $$(2, 1)$$ is either $$R_1$$ (keeping $$3$$ separate) or $$R_2 = A \times A$$ (merging $$3$$ in). Hence there are exactly two such equivalence relations.

Answer

There are exactly two such equivalence relations.

Example 25 Consider the identity function $$I_\mathbf{N} : \mathbf{N} \to \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} \to \mathbf{N}$$ defined as $$(I_\mathbf{N} + I_\mathbf{N})(x) = I_\mathbf{N}(x) + I_\mathbf{N}(x) = x + x = 2x$$ is not onto.

Solution

$$I_{\mathbf{N}}$$ is onto. The identity function satisfies $$I_{\mathbf{N}}(x) = x$$ for every $$x \in \mathbf{N}$$. Given any $$y \in \mathbf{N}$$ in the codomain, the element $$x = y$$ of the domain gives $$I_{\mathbf{N}}(y) = y$$. So every $$y$$ has a preimage, and $$I_{\mathbf{N}}$$ is onto.

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

So this function always outputs an even natural number; its range is the set of even natural numbers.

Consider $$1 \in \mathbf{N}$$ (the codomain). If $$1$$ had a preimage, we would need $$2x = 1$$, i.e. $$x = \dfrac{1}{2}$$, which is not a natural number. So $$1$$ has no preimage.

Hence $$I_{\mathbf{N}} + I_{\mathbf{N}}$$ is not onto, even though $$I_{\mathbf{N}}$$ itself is onto.

Answer

$$I_{\mathbf{N}}$$ is onto, but $$(I_{\mathbf{N}} + I_{\mathbf{N}})(x) = 2x$$ is not onto (e.g. $$1$$ has no preimage).

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

Solution

Both functions have domain $$\left[0, \dfrac{\pi}{2}\right]$$.

$$f(x) = \sin x$$ is one-one. On the interval $$\left[0, \dfrac{\pi}{2}\right]$$ the sine function is strictly increasing: if $$0 \leq x_1 < x_2 \leq \dfrac{\pi}{2}$$ then $$\sin x_1 < \sin x_2$$. A strictly increasing function takes distinct values at distinct points, so $$f(x_1) = f(x_2)$$ forces $$x_1 = x_2$$. Hence $$f$$ is one-one.

$$g(x) = \cos x$$ is one-one. On the interval $$\left[0, \dfrac{\pi}{2}\right]$$ the cosine function is strictly decreasing: if $$0 \leq x_1 < x_2 \leq \dfrac{\pi}{2}$$ then $$\cos x_1 > \cos x_2$$. A strictly decreasing function also takes distinct values at distinct points, so $$g(x_1) = g(x_2)$$ forces $$x_1 = x_2$$. Hence $$g$$ is one-one.

$$f + g$$ is not one-one. Here $$(f + g)(x) = \sin x + \cos x$$. Evaluate at the two endpoints of the domain:

$$(f + g)(0) = \sin 0 + \cos 0 = 0 + 1 = 1,$$

$$(f + g)\!\left(\dfrac{\pi}{2}\right) = \sin \dfrac{\pi}{2} + \cos \dfrac{\pi}{2} = 1 + 0 = 1.$$

So $$(f + g)(0) = (f + g)\!\left(\dfrac{\pi}{2}\right) = 1$$, yet $$0 \neq \dfrac{\pi}{2}$$. Hence $$f + g$$ is not one-one.

Answer

$$f$$ and $$g$$ are both one-one, but $$f + g$$ is not one-one (since $$(f+g)(0) = (f+g)(\pi/2) = 1$$).

Miscellaneous Exercise on Chapter 1

1 Show that the function $$f : \mathbf{R} \to \{x \in \mathbf{R} : -1 < x < 1\}$$ defined by $$f(x) = \dfrac{x}{1 + |x|}$$, $$x \in \mathbf{R}$$ is one one and onto function.

Solution

Let the codomain be $$Y = \{x \in \mathbf{R} : -1 < x < 1\}$$. Since $$|x|$$ depends on the sign of $$x$$, write $$f$$ piecewise:

$$f(x) = \dfrac{x}{1 + x} \ \text{ if } x \geq 0, \qquad f(x) = \dfrac{x}{1 - x} \ \text{ if } x < 0.$$

Note that for $$x \geq 0$$, $$f(x) = \dfrac{x}{1+x} \geq 0$$, and for $$x < 0$$, $$f(x) = \dfrac{x}{1-x} < 0$$.

One-one. Suppose $$f(x_1) = f(x_2)$$. If one of $$x_1, x_2$$ were $$\geq 0$$ and the other $$< 0$$, then one image is $$\geq 0$$ and the other $$< 0$$, so they could not be equal. Hence $$x_1$$ and $$x_2$$ have the same sign.

  • Both $$\geq 0$$: $$\dfrac{x_1}{1 + x_1} = \dfrac{x_2}{1 + x_2} \Rightarrow x_1(1 + x_2) = x_2(1 + x_1) \Rightarrow x_1 + x_1 x_2 = x_2 + x_1 x_2 \Rightarrow x_1 = x_2$$.
  • Both $$< 0$$: $$\dfrac{x_1}{1 - x_1} = \dfrac{x_2}{1 - x_2} \Rightarrow x_1(1 - x_2) = x_2(1 - x_1) \Rightarrow x_1 - x_1 x_2 = x_2 - x_1 x_2 \Rightarrow x_1 = x_2$$.

In every case $$x_1 = x_2$$, so $$f$$ is one-one.

Onto. Let $$y \in Y$$, so $$-1 < y < 1$$.

  • If $$0 \leq y < 1$$: solve $$y = \dfrac{x}{1 + x}$$ with $$x \geq 0$$. Then $$y(1 + x) = x \Rightarrow y = x(1 - y) \Rightarrow x = \dfrac{y}{1 - y}$$. Since $$0 \leq y < 1$$, both $$y \geq 0$$ and $$1 - y > 0$$, so $$x \geq 0$$ and $$f(x) = y$$.
  • If $$-1 < y < 0$$: solve $$y = \dfrac{x}{1 - x}$$ with $$x < 0$$. Then $$y(1 - x) = x \Rightarrow y = x(1 + y) \Rightarrow x = \dfrac{y}{1 + y}$$. Since $$-1 < y < 0$$, we have $$1 + y > 0$$ and $$y < 0$$, so $$x < 0$$ and $$f(x) = y$$.

So every $$y \in Y$$ has a preimage, and $$f$$ is onto.

Therefore $$f$$ is one-one and onto.

Answer

Proved: $$f$$ is one-one and onto.

2 Show that the function $$f : \mathbf{R} \to \mathbf{R}$$ given by $$f(x) = x^3$$ is injective.

Solution

The function is $$f : \mathbf{R} \to \mathbf{R}$$ with $$f(x) = x^3$$.

Let $$x_1, x_2 \in \mathbf{R}$$ with $$f(x_1) = f(x_2)$$. Then $$x_1^3 = x_2^3$$, so

$$x_1^3 - x_2^3 = 0.$$

Factorising the difference of cubes,

$$(x_1 - x_2)\left(x_1^2 + x_1 x_2 + x_2^2\right) = 0.$$

Examine the second factor. Completing the square,

$$x_1^2 + x_1 x_2 + x_2^2 = \left(x_1 + \dfrac{x_2}{2}\right)^2 + \dfrac{3x_2^2}{4}.$$

Being a sum of two squares, this is $$\geq 0$$, and it equals $$0$$ only when $$x_1 + \dfrac{x_2}{2} = 0$$ and $$x_2 = 0$$, i.e. only when $$x_1 = x_2 = 0$$.

  • If $$x_1$$ and $$x_2$$ are not both zero, the second factor is strictly positive, so $$x_1 - x_2 = 0$$, giving $$x_1 = x_2$$.
  • If $$x_1 = x_2 = 0$$, then trivially $$x_1 = x_2$$.

In every case $$x_1 = x_2$$. Hence $$f$$ is injective (one-one).

Answer

Proved: $$f(x) = x^3$$ is injective.

3

Given a non empty set $$X$$, consider $$P(X)$$ which is the set of all subsets of $$X$$.

Define the relation $$R$$ in $$P(X)$$ as follows:

For subsets $$A, B$$ in $$P(X)$$, $$ARB$$ if and only if $$A \subset B$$. Is $$R$$ an equivalence relation on $$P(X)$$? Justify your answer.

Solution

The relation $$R$$ on $$P(X)$$ is: $$A R B$$ if and only if $$A \subset B$$.

Reflexive: Every set is a subset of itself, so $$A \subset A$$ for all $$A \in P(X)$$. Hence $$A R A$$, and $$R$$ is reflexive.

Symmetric: We test whether $$A \subset B$$ forces $$B \subset A$$. Since $$X$$ is non-empty, pick an element $$x \in X$$ and take $$A = \phi$$ and $$B = \{x\}$$. Then $$A \subset B$$, so $$A R B$$. But $$B = \{x\}$$ is not a subset of $$A = \phi$$, so $$B R A$$ is false. Hence $$R$$ is not symmetric.

Transitive: Let $$A R B$$ and $$B R C$$, i.e. $$A \subset B$$ and $$B \subset C$$. Then every element of $$A$$ is in $$B$$, and every element of $$B$$ is in $$C$$, so every element of $$A$$ is in $$C$$, i.e. $$A \subset C$$. Hence $$A R C$$, and $$R$$ is transitive.

Conclusion: $$R$$ is reflexive and transitive but not symmetric. Since an equivalence relation must be symmetric, $$R$$ is not an equivalence relation on $$P(X)$$.

Answer

No. $$R$$ is reflexive and transitive but not symmetric, so it is not an equivalence relation.

4 Find the number of all onto functions from the set $$\{1, 2, 3, \ldots, n\}$$ to itself.

Solution

Let $$A = \{1, 2, 3, \ldots, n\}$$ and let $$f : A \to A$$ be an onto function.

An onto function from $$A$$ to itself is automatically one-one. If $$f$$ were not one-one, two distinct elements of $$A$$ would share an image, so the range $$\{f(1), f(2), \ldots, f(n)\}$$ would contain fewer than $$n$$ distinct elements. Then the range could not be all of the $$n$$-element codomain $$A$$, contradicting that $$f$$ is onto. Hence $$f$$ must be one-one, so $$f$$ is a bijection.

Counting the bijections. A bijection $$f : A \to A$$ is just an arrangement (permutation) of the $$n$$ elements. Count the choices of images:

  • $$f(1)$$ can be any of the $$n$$ elements;
  • $$f(2)$$ must differ from $$f(1)$$: $$n - 1$$ choices;
  • $$f(3)$$ must differ from $$f(1), f(2)$$: $$n - 2$$ choices;
  • and so on, until $$f(n)$$ has just $$1$$ choice.

By the multiplication principle, the number of onto functions is

$$n \times (n - 1) \times (n - 2) \times \cdots \times 2 \times 1 = n!.$$

Answer

The number of onto functions from $$\{1, 2, \ldots, n\}$$ to itself is $$n!$$.

5 Let $$A = \{-1, 0, 1, 2\}$$, $$B = \{-4, -2, 0, 2\}$$ and $$f, g : A \to B$$ be functions defined by $$f(x) = x^2 - x$$, $$x \in A$$ and $$g(x) = 2 \left| x - \dfrac{1}{2} \right| - 1$$, $$x \in A$$. Are $$f$$ and $$g$$ equal? Justify your answer. (Hint: One may note that two functions $$f : A \to B$$ and $$g : A \to B$$ such that $$f(a) = g(a) \; \forall \, a \in A$$, are called equal functions).

Solution

Two functions $$f, g : A \to B$$ are equal if $$f(a) = g(a)$$ for every $$a \in A$$. We evaluate both functions at each element of $$A = \{-1, 0, 1, 2\}$$.

Values of $$f(x) = x^2 - x$$:

$$f(-1) = (-1)^2 - (-1) = 1 + 1 = 2$$

$$f(0) = 0^2 - 0 = 0$$

$$f(1) = 1^2 - 1 = 0$$

$$f(2) = 2^2 - 2 = 4 - 2 = 2$$

Values of $$g(x) = 2\left|x - \dfrac{1}{2}\right| - 1$$:

$$g(-1) = 2\left|-1 - \tfrac{1}{2}\right| - 1 = 2 \cdot \tfrac{3}{2} - 1 = 3 - 1 = 2$$

$$g(0) = 2\left|0 - \tfrac{1}{2}\right| - 1 = 2 \cdot \tfrac{1}{2} - 1 = 1 - 1 = 0$$

$$g(1) = 2\left|1 - \tfrac{1}{2}\right| - 1 = 2 \cdot \tfrac{1}{2} - 1 = 1 - 1 = 0$$

$$g(2) = 2\left|2 - \tfrac{1}{2}\right| - 1 = 2 \cdot \tfrac{3}{2} - 1 = 3 - 1 = 2$$

Comparison:

$$x$$$$f(x)$$$$g(x)$$
$$-1$$$$2$$$$2$$
$$0$$$$0$$$$0$$
$$1$$$$0$$$$0$$
$$2$$$$2$$$$2$$

Since $$f(x) = g(x)$$ for every $$x \in A$$, the functions $$f$$ and $$g$$ are equal.

Answer

Yes, $$f$$ and $$g$$ are equal, since $$f(x) = g(x)$$ for every $$x \in A$$.

6

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

  1. $$1$$
  2. $$2$$
  3. $$3$$
  4. $$4$$

Solution

We want relations $$R$$ on $$A = \{1, 2, 3\}$$ containing $$(1, 2)$$ and $$(1, 3)$$ that are reflexive and symmetric but not transitive.

Forced pairs. Reflexivity forces $$(1, 1), (2, 2), (3, 3) \in R$$. The pairs $$(1, 2)$$ and $$(1, 3)$$ are given. Symmetry then forces $$(2, 1)$$ and $$(3, 1)$$ into $$R$$. So $$R$$ must contain

$$R_0 = \{(1,1), (2,2), (3,3), (1,2), (2,1), (1,3), (3,1)\}.$$

Is $$R_0$$ valid? It is reflexive and symmetric. It is not transitive: $$(2, 1) \in R_0$$ and $$(1, 3) \in R_0$$, but $$(2, 3) \notin R_0$$. So $$R_0$$ itself is a relation that is reflexive and symmetric but not transitive.

Can we add more? The only pairs not in $$R_0$$ are $$(2, 3)$$ and $$(3, 2)$$. To keep the relation symmetric we would have to add both. But $$R_0 \cup \{(2,3),(3,2)\}$$ is the whole set $$A \times A$$, which is transitive, so it does not satisfy "not transitive". Adding only one of $$(2,3), (3,2)$$ destroys symmetry.

Hence $$R_0$$ is the only relation satisfying all the conditions. The correct answer is (A) $$1$$.

Answer

(A) $$1$$.

7

Let $$A = \{1, 2, 3\}$$. Then number of equivalence relations containing $$(1, 2)$$ is

  1. $$1$$
  2. $$2$$
  3. $$3$$
  4. $$4$$

Solution

We count equivalence relations $$R$$ on $$A = \{1, 2, 3\}$$ that contain $$(1, 2)$$.

Forced pairs. Reflexivity forces $$(1, 1), (2, 2), (3, 3) \in R$$. The pair $$(1, 2)$$ is given, and symmetry forces $$(2, 1) \in R$$. So $$R$$ must contain

$$R_1 = \{(1,1), (2,2), (3,3), (1,2), (2,1)\}.$$

$$R_1$$ is an equivalence relation: it is reflexive, symmetric, and transitive (every chain closes, e.g. $$(1,2),(2,1) \Rightarrow (1,1) \in R_1$$). So $$R_1$$ is one valid relation.

Any larger one. If the equivalence relation also relates $$3$$ to $$1$$ or $$2$$ — say it contains $$(2, 3)$$ — then symmetry gives $$(3, 2)$$, and transitivity with $$(1, 2)$$ gives $$(1, 3)$$ and hence $$(3, 1)$$. The relation then contains all $$9$$ pairs, i.e. $$R_2 = A \times A$$, the universal relation, which is also an equivalence relation.

So an equivalence relation containing $$(1, 2)$$ either keeps $$3$$ in a class by itself ($$R_1$$) or puts all three elements in one class ($$R_2 = A \times A$$). There is no other possibility.

Hence there are exactly $$2$$ such equivalence relations. The correct answer is (B) $$2$$.

Answer

(B) $$2$$.
NCERT Solutions for Class 12
Maths
NCERT Solutions for Class 12 Maths
Chapter-wise step-by-step
solutions with explanations
explore solutions Maths bg
Physics
NCERT Solutions for Class 12 Physics
Chapter-wise step-by-step
solutions with explanations
explore solutions Physics bg
Chemistry
NCERT Solutions for Class 12 Chemistry
Chapter-wise step-by-step
solutions with explanations
explore solutions Chemistry bg

Frequently Asked Questions

50,000+ JEE Students Trusted Our Score Calculator

Predict your JEE Main percentile, rank & performance in seconds