Check the injectivity and surjectivity of the following functions:

f : N N given by f (x) = x2

It is given that f : N N given by f (x) = x2

We can see that for x, y ϵ N,


f(x) = f(y)


x2 = y2


x = y


f is injective.


Now, let 2 ϵ N. But, we can see that there does not exists any x in N such that


f(x) = x2 = 2


f is not surjective.


Therefore, function f is injective but not surjective.


3