Relations and Functions

NCERT Class 12 Mathematics — Relations and Functions, Miscellaneous Exercise on Chapter 1. All 7 questions solved.

The Miscellaneous Exercise draws on both halves of the chapter — the relation properties of Exercise 1.1 and the injective/surjective machinery of Exercise 1.2 — and adds two counting questions at the end that are unlike anything before them.

Key insight. The last three questions are not solved by algebra but by listing systematically. Each asks how many relations of a certain kind exist, and the method is the same every time: write down the pairs that are forced by the conditions, then ask what may still be added freely. In questions 6 and 7 almost nothing can be, which is why the answers are so small.

Question 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. The modulus means the rule behaves differently on each side of zero, so split it:

$$f(x) = \begin{cases} \dfrac{x}{1+x}, & x \geq 0 \\[6pt] \dfrac{x}{1-x}, & x < 0 \end{cases}$$

One-one. On $x \geq 0$, write $\dfrac{x}{1+x} = 1 – \dfrac{1}{1+x}$, which increases as $x$ increases; and $f(x) \geq 0$ there. On $x < 0$, $\dfrac{x}{1-x} = -1 + \dfrac{1}{1-x}$, again increasing, and $f(x) < 0$ there. So $f$ is strictly increasing across the whole line, and a strictly increasing function is one-one. The two branches cannot clash because one is non-negative and the other strictly negative.

Onto. Take $y$ with $-1 < y < 1$ and solve for $x$. For $y \geq 0$:

$$y = \frac{x}{1+x} \quad\Rightarrow\quad x = \frac{y}{1-y}$$

which is defined since $y \neq 1$, and is $\geq 0$. For $y < 0$:

$$y = \frac{x}{1-x} \quad\Rightarrow\quad x = \frac{y}{1+y}$$

defined since $y \neq -1$, and negative. Either way a preimage exists.

$f$ is one-one and onto, hence a bijection from $\mathbf{R}$ to $(-1, 1)$.

Question 2

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

Solution. Suppose $f(x_1) = f(x_2)$, so $x_1^3 = x_2^3$. Taking the real cube root of both sides — which is unique, unlike the square root — gives $x_1 = x_2$.

Equivalently, factorise:

$$x_1^3 – x_2^3 = (x_1 – x_2)\left(x_1^2 + x_1x_2 + x_2^2\right) = 0$$

The quadratic factor can be written as $\left(x_1 + \tfrac{x_2}{2}\right)^2 + \tfrac{3x_2^2}{4}$, which is zero only when $x_1 = x_2 = 0$. So in every case $x_1 = x_2$.

$f(x) = x^3$ is injective on $\mathbf{R}$.

Question 3

Given a non empty set X, consider $\mathrm{P}(\mathrm{X})$ which is the set of all subsets of X. Define the relation R in $\mathrm{P}(\mathrm{X})$ as follows: for subsets A, B in $\mathrm{P}(\mathrm{X})$, ARB if and only if $\mathrm{A} \subset \mathrm{B}$. Is R an equivalence relation on $\mathrm{P}(\mathrm{X})$? Justify your answer.

Solution. Test the three properties.

Reflexive. Every set is a subset of itself, so $\mathrm{A} \subset \mathrm{A}$ and ARA holds. ✓

Symmetric. This is where it fails. Take $\mathrm{A} = \{1\}$ and $\mathrm{B} = \{1, 2\}$ inside some X containing both. Then $\mathrm{A} \subset \mathrm{B}$, so ARB — but $\mathrm{B} \not\subset \mathrm{A}$, so BRA is false. ✗

Transitive. If $\mathrm{A} \subset \mathrm{B}$ and $\mathrm{B} \subset \mathrm{C}$ then $\mathrm{A} \subset \mathrm{C}$. ✓

Since symmetry fails, R is not an equivalence relation. That is no accident: “is contained in” is an ordering, and orderings are precisely the relations that are deliberately not symmetric.

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

Question 4

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

Solution. The set is finite, and for a function from a finite set to itself, onto and one-one are equivalent — this is the characteristic property of finite sets stated in the chapter summary. So counting onto functions is the same as counting bijections.

A bijection from the set to itself is a permutation of its $n$ elements: element $1$ has $n$ possible images, element $2$ has $n-1$ remaining, and so on.

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

$$n!$$

Question 5

Let $\mathrm{A} = \{-1, 0, 1, 2\}$, $\mathrm{B} = \{-4, -2, 0, 2\}$ and $f, g : \mathrm{A} \to \mathrm{B}$ be functions defined by $f(x) = x^2 – x$, $x \in \mathrm{A}$ and $g(x) = 2\left|x – \tfrac{1}{2}\right| – 1$, $x \in \mathrm{A}$. Are $f$ and $g$ equal? Justify your answer.

Solution. Two functions with the same domain and codomain are equal when $f(a) = g(a)$ for every $a$ in the domain. A is finite with four elements, so check all four.

$$f(-1) = 1 + 1 = 2, \qquad g(-1) = 2\left|-\tfrac{3}{2}\right| – 1 = 3 – 1 = 2 \ \checkmark$$

$$f(0) = 0 – 0 = 0, \qquad g(0) = 2\left|-\tfrac{1}{2}\right| – 1 = 1 – 1 = 0 \ \checkmark$$

$$f(1) = 1 – 1 = 0, \qquad g(1) = 2\left|\tfrac{1}{2}\right| – 1 = 1 – 1 = 0 \ \checkmark$$

$$f(2) = 4 – 2 = 2, \qquad g(2) = 2\left|\tfrac{3}{2}\right| – 1 = 3 – 1 = 2 \ \checkmark$$

All four agree, so the functions are equal — even though the formulas look nothing alike. Equality of functions is about the values on the given domain, not about the expressions.

Yes, $f$ and $g$ are equal, since $f(a) = g(a)$ for all four elements of A.

Question 6

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

(A) $1$
(B) $2$
(C) $3$
(D) $4$

Solution. Write down what is forced. Reflexivity requires $(1,1)$, $(2,2)$ and $(3,3)$. The pairs $(1,2)$ and $(1,3)$ are given, and symmetry then forces $(2,1)$ and $(3,1)$. So every candidate relation contains

$$\mathrm{R} = \{(1,1), (2,2), (3,3), (1,2), (2,1), (1,3), (3,1)\}$$

Is R itself transitive? No: $(2,1)$ and $(1,3)$ are both in R, but $(2,3)$ is not. So R qualifies — reflexive, symmetric, not transitive.

Can anything be added? The only pairs left are $(2,3)$ and $(3,2)$. Adding just one breaks symmetry. Adding both gives the whole of $\mathrm{A}\times\mathrm{A}$, which is transitive and so no longer qualifies.

There is therefore exactly one such relation.

$$\text{(A)}\quad 1$$

Question 7

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

(A) $1$
(B) $2$
(C) $3$
(D) $4$

Solution. Again start from what is forced: $(1,1)$, $(2,2)$, $(3,3)$ by reflexivity, $(1,2)$ by hypothesis and $(2,1)$ by symmetry.

$$\mathrm{R}_1 = \{(1,1), (2,2), (3,3), (1,2), (2,1)\}$$

Is $\mathrm{R}_1$ transitive? The only chains available are within $\{1, 2\}$, and each closes: $(1,2)$ with $(2,1)$ gives $(1,1)$ ✓, and $(2,1)$ with $(1,2)$ gives $(2,2)$ ✓. So $\mathrm{R}_1$ is an equivalence relation.

Now suppose we add one more pair. Adding $(1,3)$ forces $(3,1)$ by symmetry, and then $(2,1)$ with $(1,3)$ forces $(2,3)$, which forces $(3,2)$. We arrive at the whole of $\mathrm{A}\times\mathrm{A}$:

$$\mathrm{R}_2 = \mathrm{A}\times\mathrm{A}$$

which is the universal relation and certainly an equivalence relation. Starting instead from $(2,3)$ leads to the same place.

So there are exactly two: $\mathrm{R}_1$ and $\mathrm{R}_2$. In the language of Exercise 1.1, these correspond to the two ways of partitioning $\{1,2,3\}$ with $1$ and $2$ in the same block — either $\{1,2\}, \{3\}$ or $\{1,2,3\}$.

$$\text{(B)}\quad 2$$

Common mistakes

  • Assuming a relation must be symmetric to be useful. “Is a subset of” is reflexive and transitive but deliberately not symmetric — question 3 is about recognising an ordering rather than an equivalence.
  • Counting onto functions the hard way in question 4. On a finite set, onto and one-one coincide, so the answer is simply $n!$. Inclusion–exclusion is not needed here, though it would be for a map between sets of different sizes.
  • Comparing formulas instead of values in question 5. $x^2 – x$ and $2\left|x – \tfrac12\right| – 1$ are different expressions that agree at every point of A. Equality of functions is decided on the domain given.
  • Forgetting the pairs that symmetry forces. In questions 6 and 7, adding $(1,3)$ obliges you to add $(3,1)$, and transitivity then cascades. Following the consequences is the whole method.
  • Overlooking the universal relation. $\mathrm{A}\times\mathrm{A}$ always satisfies all three properties, and is the second answer in question 7.

Practise next

Keep track of what you have finished — create a free account.

Doubts are answered by Shiwam, usually within a day. Ask about this question specifically — a general question about the chapter is better asked in class.

Ask your doubt

Stuck on this question? Ask Shiwam directly.

A free account lets you post a doubt on any question, keep track of the exercises you have finished, and come back to the answer later.

Create a free accountI already have one