# Which function is an injection but NOT A SURJECTION

Which function is an injection but NOT A SURJECTION?

(1)

$h:\mathbb{N} \rightarrow\ \mathbb{Z}$

$h(x) = x^2 + 5$

(2)

$p:[0,\infty) \rightarrow\ [5,\infty)$

$p(x) = x^2 + 5$

I think (1) is injective but not surjective. For (2) I know it's injective but not sure about surjectivity.

• Why do you think that, and why aren't you sure about the surjectivity of (2)? – fgp Dec 5 '13 at 21:29

For $(2)$ Yes, $p(x)$ is injective (why?), and it is surjective. $$p^{-1}: [5, \infty) \to [0, \infty),\quad p^{-1}(x) = \sqrt {x - 5}$$ I.e. $p(x)$ is a bijection: both injective and surjective.
You are correct about $(1)$, but you need to explain/justify why it is injective but is not surjective:
Surjectivity fails, for example, because for each $y \in \mathbb Z, y\leq 4$, there is no $x \in \mathbb N$ such that $h(x) = x^2 + 5 = y$.
Hint: For $(1)$, $a^2+5=b^2+5\implies a^2=b^2$. Use the fact that they are natural numbers. For surjectivity, does anything map to zero?
For $(2)$ it might help to draw a picture.