Define $f:\mathbb{Z}_n \rightarrow \mathbb{Z}_n$ by $f(x)=x^2$ For which $n \in \mathbb{N}$ is $f$ injective?

37 Views Asked by At

Note that by $\mathbb{Z}_n$, I mean the congruence classes modulus $n$. I am having trouble understanding what to do for this problem. For this, I do know the answer, but something is not clicking and making it obvious.

1

There are 1 best solutions below

6
On BEST ANSWER

We have $f(x)=f(-x)$ and so $f$ is injective only if $x=-x$ for all $x\in \mathbb Z_n$, which only happens for $n=2$.