Is $f\colon\mathbb{Z}\to\mathbb{Z}, f(x)=x^2$ injective? Surjective?

269 Views Asked by At

I would say no:

$\text{Suppose } f(a)=f(b) \text{ then } a^2=b^2 \implies \pm a = \pm b \implies -a=b$.

Or simply by counterexample:

$f(-1)=f(1)$

Further, I would say it does not map $\mathbb{Z}$ onto $\mathbb{Z}$ because it is always positive.

4

There are 4 best solutions below

0
On BEST ANSWER

You are right.

Not injective (example): $$ f(-3)=(-3)^2=(3)^2=f(3);\qquad -3\neq 3 $$ Not surjective (more explicit description): To be surjective, every element in the codomain must be mapped to by some element in the domain. This is clearly not the case when $f\colon\mathbb{Z}\to\mathbb{Z}$ is defined by $f(x)=x^2$ because none of the negative numbers in the codomain are being mapped to.

0
On

This looks good to me. Note also that $f$ can't be surjective, since there are elements of $Z$ which are not perfect squares, and so even if you consider $f:Z^+ \rightarrow Z^+,$ $f$is still not surjective, since, for example, there is no element in $Z^+$ who's square is $2$.

0
On

Your counterexample $f(-1)=f(1)$ suffices to show $f$ is not injective and your argument for non-surjectivity is also correct.

0
On

You are entirely correct. Your counterexample shows that $f$ is not injective, and you have provided valid reasoning that $f$ is not surjectiv.

If you would like some more insight, you can consider the none-negative integers: $Z^{*}$

For example, where $f(x) = x^{2}$ , if we define $f:Z^{*} \rightarrow Z$ it is injective.