# Check the injectivity and surjectivity of the function: $f : N\to N\; given\; by\; f(x)\; = x^2$

$\begin{array}{1 1} \text{injective} \\ \text{surjective} \\ \text{both injective and surjective} \\ \text{neither injective and surjective} \end{array}$

Toolbox:
• A function $f: A \rightarrow B$ where for every $x1, x2 \in X, f(x1) = f(x2) \Rightarrow x1 = x2$ is called a one-one function.
• A function$f : X \rightarrow Y$ is said to be onto or surjective, if every element of Y is the image of some element of X under f, i.e., for every $y \in Y$, there exists an element x in X such that $f(x) = y$.
• |x| is always non negative
$f:N\to N\qquad f(x)=x^2$
Let x and y be two elements in N
$f(x)=f(y)$
=>$x^2=y^2$
=>$x=y$
For the function f to be injective f(x) =f(y) => x=y
f defined by$f:N\to N\qquad f(x)=x^2$ is injective
$2 \in N$ there does not exist any x in N
Such that $f(x)=x^2-2$
$\sqrt 2 \notin N$
For every y in N there does not exist an element in N such that f(x)=y
Hence $f:N\to N\qquad f(x)=x^2$ is not surjective
Hence f is injective but not surjective
Therefore $f:N\to N\qquad f(x)=x^2$ is injective but not surjective

answered Mar 13, 2013
edited Feb 28, 2014 by meena.p