# Showing that $f: \Bbb Z \to \Bbb Z_n$ with $f(x)=[x]$ for each $x$ in $\Bbb Z$ is onto.

These easy concepts are evading me, and I'm struggling with function analysis. How do I show that $f: \Bbb Z \to \Bbb Z_n$ with $f(x)=[x]$ for each $x$ in $\Bbb Z$ is onto? This is not a homework problem, it is just for the sake of understanding.

• I assume you mean that $Z = \Bbb{Z}$ is the set of integers? – user61527 Sep 8 '13 at 3:02
• Yes, thanks.... – user85362 Sep 8 '13 at 3:04
• Is $\mathbb{Z}_n$ the integers modulo $n$? – Mauricio Tec Sep 8 '13 at 3:05
• Yes indeed. I should have clarified, sorry. – user85362 Sep 8 '13 at 3:07

Take $[x] \in \Bbb Z_n$. You have to prove that there exists $k \in \Bbb Z$ such that $f(k)=[x]$.Take $k=x$. We know $x$ is sent to $[x]$ by definition of $f$, that is, $f(x)=[x]$, so you found your $k$, and $f$ is onto.
One way to see this is to consider $\mathbb{Z}_n$ as $\{1,2,...n\}$ and the function $f$ as the function that sends every number $x\in\mathbb{Z}$ to the residue after dividing by $n$. Then the proof would go like this: let $r\in\mathbb{Z}_n$ be any given element. Now define $x=r$, then since $x=0\cdot n +r$ we have that $f(x)=r$ and therefore that $f$ is onto.