1
$\begingroup$

So I'm going through Niven's The Theory of Numbers, and it gives the definition that:

$$a \equiv b \pmod m \implies m \mid (a - b)$$

However, a few pages after this definition, it gives a theorem that states "if $\gcd(a, m) = 1$, then there is an $x$ such that $ax \equiv 1 \pmod m$. To prove this theorem, it states that:

If $\gcd(a, m) = 1$, then there exist $x, y$ such that $ax + my = 1.$ That is, $ax \equiv 1 \pmod m$.

Well... from $ax + my = 1$, you can get $my = 1 - ax$, but this shows that $m \mid (1 - ax)$.

However, from the aforementioned definition of an equivalence class, $ax \equiv 1 \pmod m \implies m \mid (ax - 1)$, rather than $m \mid (1 - ax)$.

What is happening here?

$\endgroup$
  • $\begingroup$ $p|q\iff p|(-q)$ $\endgroup$ – drhab Sep 27 '14 at 18:13
1
$\begingroup$

If $m \mid (ax - 1)$, then $m \mid (1 - ax)$. See, if $m \mid (ax - 1)$, exists $k \in \Bbb Z$ such that $mk = ax - 1$. Then you get $m(-k) = 1 - ax$. Since $-k \in \Bbb Z$, we obtain that $m \mid (1 - ax)$.

$\endgroup$
1
$\begingroup$

To make sure that I say enough words: if $a\mid b$ then $a \mid -b$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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