Question 7
Let $a,b\in\mathbb R^*$ and define $f:\mathbb R\to\mathbb R$ by
$$f(x)=\begin{cases}ax,&x\in\mathbb Q,\\bx,&x\in\mathbb R\setminus\mathbb Q.\end{cases}$$
Prove that $f$ is injective if and only if it is surjective.
$$f(x)=\begin{cases}ax,&x\in\mathbb Q,\\bx,&x\in\mathbb R\setminus\mathbb Q.\end{cases}$$
Prove that $f$ is injective if and only if it is surjective.