Section 1.3: Functions

Exercise

Show that the function \(f : \mathbb{R} \to \mathbb{R}\), defined by \(f(x) = \frac{1}{x}\) is one-one and onto,
where \(\mathbb{R}\) is the set of all non-zero real numbers. Is the result true, if the domain \(\mathbb{R}\) is replaced by \(\mathbb{N}\) with co-domain being same as \(\mathbb{R}\)?