Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is part of the $\phi(mn) = \phi(m)\cdot \phi(n)$ theorem.

For some integer $a$ relatively prime to $m\cdot n$ how do I know the following:

  1. $a\mod m$ is relatively prime to $m$
  2. $a \mod n$ is relatively prime to $n$
share|cite|improve this question
up vote 1 down vote accepted

$a\bmod m=a+km$ for some $k\in\mathbb Z$. If $d$ divides both $a\bmod m$ and $m$, say $a+km=d b$ and $m=d c$, then $a=db-km=d(b-kc)$, i.e. $d$ is also a common divisor of $a$ and $m$.

share|cite|improve this answer
How does $a \mod m = a + km$? I thought $a \mod m = r$ where the division algorithm says: $ a = mk + r$. I guess we could subtract $mk$ to the other side and get: $r = a -mk$ and then the sign does not really matter? – CodeKingPlusPlus Sep 30 '12 at 15:07
I really like your proof if you could explain the $a \mod m = a +km$ – CodeKingPlusPlus Sep 30 '12 at 15:11
If you define $a\bmod m$ as the number $r$ where $a=mk+r$ with $k\in\mathbb Z$, $0\le r<m$, then you have $a\bmod m=r=a-mk$, hence my $k$ is your $-k$, but of course that doesn't matter. – Hagen von Eitzen Sep 30 '12 at 16:20

Do it in stages: prove that if $a$ is prime to $mn$ then it's prime to $m$, and prove that if $a$ is prime to $m$ then $a$ reduced modulo $m$ is relatively prime to $m$.

share|cite|improve this answer

$a$ is relatively prime to $b$ if and only if $(a \bmod b)$ is relatively prime to $b$.

Moreover, $d|a,b \iff d|(a-kb),b$ for any $k\in\mathbb Z$. Try to prove this one.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.