India Site

Show that the function $f: R \rightarrow R: f(x)=\left\{\begin{array}{l}1, \text { if } x \text { is rational } \\ -1, \text { if } x \text { is irrational }\end{array}\right.$ is many – one into.
Find (i) $f\left(\frac{1}{2}\right)$
(ii) $\mathrm{f}(\sqrt{2})$

Solution:

(i) $f\left(\frac{1}{2}\right)$
Here, $x=1 / 2$, which is rational
$\therefore f(1 / 2)=1$

(ii) $\mathrm{f}(\sqrt{2})$
Here, $x=\sqrt{2}$, which is irrational
$\therefore f(\sqrt{2})=-1$