# Prove that

Question:

$f: R \rightarrow R: f(x)=\left\{\begin{array}{r}1, \text { if } x \text { is rational } \\ -1, \text { if } x \text { is rational }\end{array}\right.$

Show that $\mathrm{f}$ is many-one and into.

Solution:

To prove: function is many-one and into

Given: $f: R \rightarrow R: f(x)=\left\{\begin{array}{c}1, \text { if } x \text { is rational } \\ -1, \text { if } x \text { is irrational }\end{array}\right.$

We have,

$f(x)=1$ when $x$ is rational

It means that all rational numbers will have same image i.e. 1

$\Rightarrow f(2)=1=f(3)$, As 2 and 3 are rational numbers

Therefore $f(x)$ is many-one

The range of function is $[\{-1\},\{1\}]$ but codomain is set of real numbers.

Therefore $f(x)$ is into