# Determine whether a function is injective, surjective, or bijective.

I have been asked to determine whether-
$h : \mathbb{N} \rightarrow \mathbb{N}$ defined by $h(x) = x^3$ is injective, surjective or bijective. And why?

• I do not know how to approach it. Nov 21, 2017 at 23:59
• And which of the three (injective, surjective, bijective) do you suspect to be true? Having a guess is a good start. Nov 21, 2017 at 23:59
• I suspect it's bijective Nov 22, 2017 at 0:00
• Ok. That’s a start. I claim that it is not surjective. Do you have any idea why? Nov 22, 2017 at 0:00
• Why? Because the range of the function h(x) equals its codomain. Nov 22, 2017 at 0:02

The function here is injective but not surjective and therefore not bijective.

To see that it is injective, note that $h(x)$ is strictly increasing on $\mathbb{N}$. So, if $n,m \in \mathbb{N}$ and $n \neq m$ then either $n>m$ or $m>n$. Without loss of generality, assume that $n>m$. Then we have $n^3 > m^3.$ So, if $n \neq m$ then $h(n) \neq h(m).$

To see that it is not surjective, consider $2 \in \mathbb{N}$ and note that there does not exist a natural number $x$ such that $x^3 = 2$.

• Thank you very much for your detailed answer, could you please tell me how to prove that a function is surjective? Nov 22, 2017 at 0:14
• @Tobari a function is surjective if and only if every element in the range has a corresponding element in the domain that maps to it. In this case, we would need that for any $n \in \mathbb{N}$, there would need to exist some $m \in \mathbb{N}$ such that $h(m) = n$. The problem is that I have found an $n$ (I chose the natural number $2$) with no $m$ such that $h(m) = n.$ Nov 22, 2017 at 0:18
• Thank you for your response, I get it now. Nov 22, 2017 at 0:37

Make sure you know what the definition of injection, surjection, and bijection are before answering these questions. Note that there are several equivalent definitions of what it means for a function to be invertible, one of which is that it is one of the above three definitions, another is that

$f(a) = f(b)$ implies $a = b$

You can use the given function to directly prove that.

Now as for surjectivity. The $h:\mathbb{N} \rightarrow \mathbb{N}$ restriction is important. Can you think of a natural number that, when cubed, equals 2?

To show a function is injective, you want to show that If $f(x) = f(y)$ then $x = y$

So let $h(x) = h(y)$ Then $x^3 = y^3$ and when we cube root each side we get $x = y$. Therefore it is injective

To show a function is surjective, for any element in the codomain we have to show their is an element in the domain that maps to it. Is there an natural number that when we cube it we get 10? No. So clearly this function is not surective over the natural numbers.

To be bijective it has to be injective and surjective, so we know its not a bijection. Thus it is just an injection.

• Thank you, but what if you have something like this: f: { -1,0,1} --> {-1,0,1} defined by f(x). Is it injective as well because x^2 = y^2? Nov 22, 2017 at 0:32
• @Tobari Do you mean if $f(x) = x^2$? In that case no, because the square root gives you two values, a positive and a negative, so in that case dont have to be equal. For example $x=2, y=-2$ but $f(x) = f(y)$ Nov 22, 2017 at 1:54