0
$\begingroup$

If I have $a \equiv b \pmod{n}$, it means $n \mid b - a$.

But can you write it as $n \mid a - b$ as well?

  • 1
    $a \equiv b \pmod{n} \implies n \mid (a-b) \implies a-b = nk$ for _some_ integer $k$. Can you find an integer $m$ such that $b-a = mn$?2011-12-08
  • 2
    Yes, because in $x$ divides $y$ if and only if $\pm x$ divides $\pm y$, and $a-b = -(b-a)$.2011-12-08
  • 0
    that would just be -1. but my prof always writes it as b - a2011-12-08

3 Answers 3

3

HINT $\rm\quad n\ |\ c \iff\ \dfrac{c}{n}\in \mathbb Z \iff -\dfrac{c}{n}\: =\: \dfrac{-c}{n} \in \mathbb Z\ \iff\ n\ |\: -c\:.\ $ Now let $\rm\ c = a-b\:.$

I.e. $\ \mathbb Z$ closed under negation $\rm\: \Rightarrow\ n\: \mathbb Z\:$ closed under negation, i.e. $\rm\: -(n\: \mathbb Z)\ =\ (-n)\ \mathbb Z$

1

It can be written both ways. $$n\mid a-b \iff kn = a-b \iff k'n = b-a \iff n\mid b-a$$ for some $k\in \mathbb{Z}$ where $k' = -k$. It's just a way of stating that if $n\mid m$ then $n\mid (-m)$.

1

Yes: $n\mid b-a$ means that there is an integer $k$ such that $b-a = kn$, and $n\mid a-b$ means that there is an integer $\ell$ such that $a-b=\ell n$. Since $a-b=-(b-a)$, these are two ways of saying the same thing: $$b-a = kn\iff a-b=-(b-a)=(-k)n\;.$$