All integers are said to be equivalent mod \(n\) to their remainder after dividing by \(n\text{.}\) For example \(9 \equiv 4 \pmod 5 \) because \(9/5\) has remainder 4. Similarly \(13 \equiv 1 \pmod 2 \) because \(13/2\) has remainder 1.
Note you may be familiar with the operation % in programming. That is an operation like + or \(\times\text{.}\) Here we are using a different number system like integers or reals. Avoid conflating the two. For example % has an order of operation. The question of order does not make sense with arithmetic mod \(n\) as will be demonstrated below.
List four (4) numbers that are equivalent to \(3 \pmod 5\text{.}\) Base this on two numbers being equivalent modulo 5 if their remainders are the same after dividing by 5.
It makes sense that if \(2|6\) then \(-2|6\) as well. To prove the general statement \(a|b\) implies \(-a|b\text{,}\) we will start on the left of this implication (\(a|b\)). Now, the only thing we have is the definition of divides. This tells us \(ak=b\) for some integer \(k\text{.}\) We want \(-aj=b\) for some integer \(j\text{.}\) This suggests we try \(j=-k\text{.}\)
The following theorem proves that our handling of negative numbers above is legitimate. To prove an implication we start on the left, so we know \(a \equiv b \pmod n\text{.}\) We know only the definition of modulo equivalence. \(n|(b-a)\text{.}\) Using the divides definition we know there exists an integer \(k\) such that \(nk=b-a\text{.}\) Next we consider where we want to end: \(n|(b-[a-n])\) which requires an integer \(k_2\) such that \(nk_2=(b-[a-n])\text{.}\) That expression can be simplified. \(nk_2=(b-a+n)\text{.}\) We know that n divides n, so we can modify the first expression to find \(k_2\text{.}\)
By definition of modulo equivalence \(a \equiv b \pmod n\) implies that \(n|(b-a)\text{.}\) Thus, by definition of divides, there exists \(k \in \Z\) such that \(nk=b-a\text{.}\) Consider