Question 95
Let $a$ and $b$ be real numbers different from $0$ and let $f: \mathbb{R} \to \mathbb{R}$ be a function defined 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 $f$ 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 $f$ is surjective.