# How do I prove that $\phi:\mathbb{Z}\rightarrow\mathbb{Z}_n$ is a homomorphism?

I was wondering how one shows that $\phi(m):\mathbb{Z}\rightarrow\mathbb{Z}_n$ is a homomorphism? I know that we define $m:=qn + r$, but I don't really know how to continue from there.

• Well, it depends on what $\phi$ is. – Randall Oct 27 '17 at 0:53
• I got this from jupiter.math.nctu.edu.tw/~weng/courses/alg_2007/Algebra%202006/… on the 4th page. I don't really know if I'm defining something incorrectly in my question – K.M Oct 27 '17 at 1:04
• use $\phi(z)= z \ (mod \ n)$ – Philip White Oct 27 '17 at 1:05
• What's your definition of $\mathbf Z_n$? – Bernard Oct 27 '17 at 1:05
• @PhilipWhite: So I just show that $(a+b)mod n = amodn +bmodn$ by definition of modular addition? – K.M Oct 27 '17 at 1:11

$\phi(z) = z \pmod n$

i.e. for $z,m \in\mathbb Z$

so we have

$\phi(z) = z \pmod n$

$\phi(m) = m \pmod n$

$\phi(z)+\phi(m)=z+m \pmod n$

similarly we have

$\phi(z+m) = z+m \pmod n$

and finally we see

$\phi(z+m) =\phi(z) + \phi(m)$

not sure how deep into the division algorithm you needed to go...

You have $m=qn + r,$ and there you should mention that $r\in\{0,1,2,\ldots,n-1\}.$

The homomorphism would be $\varphi(m) = r.$

Showing that that is a homomorphism means showing that $\varphi(m_1+m_2) = \varphi(m_1)+\varphi(m_2).$

That means if $m_1 = q_1 n + r_1$ and $m_2 = q_2 n + r_2$ and $m_1+m_2 = q_3 n + r_3$ then $r_1+r_2\equiv r_3\pmod n.$ That means $(r_1+r_2)-r_3$ is a multiple of $n.$ So observe that $$r_1+r_2-r_3 = (q_1+q_2-q_3) n.$$