Injective function: example of injective function that is not surjective.

$\begingroup$ An injective function should always be considered as not surjective. Otherwise the function would be called a bijection. In other words, by calling something an injective function you are stating that it is not surjective. $\endgroup$

Commented Mar 6, 2023 at 18:50

2 Answers 2

$\begingroup$

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

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

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

Edit: As requested by the OP:

An example of an injective function $\mathbb\to\mathbb$ that is not surjective is $\operatorname(x)=\operatorname^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.