1

Let $x \in \mathbb{Z}$ Show that if $N\mid M$ then $(x\pmod M)\pmod N = x \pmod N$

My proof: Assume $x \in \mathbb{Z}$ is arbitrary. Then define $x\pmod M =r \iff x \equiv r\pmod M$ where $0\leq r < M$. Since $N\mid M$, it follows that $x \equiv r \pmod N$. But now I need to show that $0 \leq r <N$ in order to conclude that $x\pmod N=r (mod N) $ or am I mistaken?? How do I complete the proof? Is there an easier way to approach this?

1 Answers1

2

We know that $M=kN$ with $k\in\mathbb{Z}$.

Let $r=x\text{ mod }M$ and $s=r\text{ mod } N$.

We have : $x=aM+r$ with $0\le r<M$

and : $r=bN+s$ with $0\le s<N$.

Hence : $x=aM+bN+s=(ak+b)N+s$

This last formula shows that $x\text{ mod }N=s=r\text{ mod }N=(x\text{ mod }M)\text{ mod }N$.

Adren
  • 7,515
  • 10
  • 26