Show that the function f: R* -> R* defined by f(x)=1/x is one-one and onto, where R* is the set of all non-zero real numbers. Is the result true, if the domain R* is replaced by N with co-domain being same as R*?
Hint. For the second part, ask which real numbers can actually be written as 1/x for a natural number x.
One-one: f(x1)=f(x2) means 1/x1=1/x2, so x1=x2.
Onto: for any y in R*, take x=1/y, which is a non-zero real number, and f(x)=1/(1/y)=y.
With domain N instead: one-one still holds (same argument, restricted to N). But onto fails: for y=2, we would need x=1/2 in N, which is not a natural number, so no preimage exists in N.
✦ f is one-one and onto on R*->R*. With domain N, f is still one-one but is no longer onto.
