[Math] Injective function: example of injective function that is not surjective.

algebra-precalculuselementary-set-theoryexamples-counterexamplesfunctions

Does there exist an injective function that is not surjective? Could I have an example, please?

Best Answer

There are many examples. It just all depends on how your define the range and domain.

For example $\operatorname{f} : \mathbb{R} \to \mathbb{R}$ given by $\operatorname{f}(x)=x^3$ is both injective and surjective. But then I can change the image and say that $\operatorname{f} : \mathbb{R} \to \mathbb{C}$ is given by $\operatorname{f}(x) = x^3$. Now it is still injective but fails to be surjective.

Similarily, the function $\operatorname{g} : \mathbb{R} \to \mathbb{R}$ given by $\operatorname{g}(x)=x^2$ is neither surjective nor injective. But if I change the range and domain to $\operatorname{g}: \mathbb{R}^+ \to \mathbb{R}^+$ then it is both injective and surjective.

Edit: As requested by the OP:

An example of an injective function $\mathbb{R}\to\mathbb{R}$ that is not surjective is $\operatorname{h}(x)=\operatorname{e}^x$. This "hits" all of the positive reals, but misses zero and all of the negative reals. But the key point is the the definitions of injective and surjective depend almost completely on the choice of range and domain.