Is $f(x) = x^2$ injective on $N$?

1.4k Views Asked by At

Is $f(x) = x^2$ injective on $\mathbb{N}$?

$f: \mathbb{N} → \mathbb{N}$

A function is injective if and only if distinct elements of its domain map to distinct elements of its range.

That is, if $f(x) = f(y) \Rightarrow x=y$, OR equivalently, if $x≠y \Rightarrow f(x) ≠ f(y) $

$x^2 = y^2 \Rightarrow x = y $

$x≠y \Rightarrow x^2 ≠y^2$

The solution from a collegue is saying $f$ is injective because $f(x) = f(y)$ iff $x^2 = y^2$ iff $x = y$ (roots are defined for any square) iff x = y

I don't understand this solution, can anyone please assist to resolve this proof?

4

There are 4 best solutions below

4
On BEST ANSWER

If $x^2=y^2$, then $x^2-y^2=(x-y)(x+y)=0\,$ but $\,(x+y)\neq 0\,$ and so $\,x-y=0.$

Hence, $x=y$.

1
On

From $f(x)=f(y)$ we have $x^2=y^2$ so $(x-y)(\underbrace{x+y}_{>0})=0$ so $x-y=0$ so $x=y$.

0
On

Note that $ f(x)=x^2$ is injective in $\mathbb{R^+}$ and thus itbis injective also in $\mathbb{N}\subset \mathbb{R^+}$.

0
On

For fun:

$f:\mathbb{N} \rightarrow \mathbb{N}.$

$f(n)= n^2.$

Function is strictly increasing hence injective

Let $m = n+ k \gt n$, $k \in \mathbb{Z^+}$, i.e. $k$ is a positive integer.

Then for $m >n:$

$f(m)=m^2= (n+k)^2 = n^2 +(2nk +k^2) > $

$n^2 = f(n). $

Strictly Increasing hence injective.