1

I read in a book that $-8 \equiv 6 \bmod 7$ which means that $-8$ and $6$ leave the same remainder when divided by $7.$

The remainder when $-8$ is divided by $7$ is $-1.$ But when $6$ is divided by $7,$ isn't the remainder $6$?

I recognise that we can write $7\cdot1 - 1=6$, so from here it seems that the remainder is $-1.$ Why is the above reasoning (remainder${}= 6$) incorrect?

PGupta
  • 609
  • 1
    Modulus isn't just giving you the remainder, but something subtly different. do look it up it should make sense. What else do you think is the relation between $-1$ and $6$. – Vishnu N Oct 13 '20 at 16:08
  • 1
    The remainder when $-8$ is divided by $7$ is $6,$ since $-8 = (-2)7 + 6.$ Rember that the remainder must be in the set ${0,1,2,3,4,5,6}. \qquad$ – Michael Hardy Oct 13 '20 at 17:23

5 Answers5

2

The definition is $a\equiv b\mod n$ iff $n$ divides $a-b$.

Here $-8\equiv 6\mod 7$ since $7$ divides $-8-6 = -14$.


Another definition is that $a\equiv b\mod n$ iff both leave the same remainder modulo $n$. But note that the remainder is between $0$ and $n-1$.

Here $-8$ and $6$ have the same remainder $6$ modulo $7$, since $-8 = (-2)\cdot 7 + 6$.

Wuestenfux
  • 20,964
2

Imagine a clock numbered 0,1,2,3,4,5,6 in the usual clockwise orientation. Then $7 \equiv 0 \pmod 7$: if you go 7 numbers clockwise, you're back where you started. Likewise, $-7 \equiv 0 \pmod 7$ (going a full rotation anticlockwise).

Then consider -8. That's a full rotation anticlockwise, plus one further anticlockwise rotation through angle $2\pi/7$. Where do you end up? At 6.

DanLewis3264
  • 2,321
1

The definition that two numbers are congruent if they leave the same remainder on division by the modulus is only valid if we have some agreement as to what "remainder" means. If we say "the same smallest positive remainder", then it works.

It's better to define congruence by saying that two numbers are congruent if their difference is divisible by the modulus. Then there's no ambiguity.

saulspatz
  • 53,131
  • Right, that's what I was wondering, whether we need to take the smallest remainder (-1 is not positive). So the other definition is more suitable it seems. Thanks for clarifying. – PGupta Oct 13 '20 at 16:12
1

Two integers are said to be equivalent modulo $n$ if their difference is divisible by $n$.

You have an unclear definition of remainder - but for any integer $m$ you can express $m=qn+r$ with $0\le r\lt n$, and with this consistent expression of the remainder you get $6$ in both cases.

Really when we work modulo $n$ we are not working with individual numbers, but with equivalence classes, with two numbers being equivalent if their difference is divisible by $n$. With this understanding $-1\equiv 6$ in your case, and the answers are the same up to multiples of $7$.

Mark Bennet
  • 100,194
  • Should the remainder always be positive? – PGupta Oct 13 '20 at 16:15
  • 1
    @PGupta You can choose your definition of the remainder - sometimes the least positive is chosen (quite often in fact), but sometimes (eg in some ways of analysing quadratic reciprocity) people choose the remainder with least absolute value (with positive in the case you have a choice). This (least absolute value) choice sometimes happens when you are multiplying all the remainders together and what to get information from the sign of the product, for example. The main point is to be consistent - then you will get equal remainders for equivalent integers, rather than just equivalent remainders – Mark Bennet Oct 13 '20 at 16:21
0

$...=-8=-1=6=13=...=7k+6(\text{mod} {7})$, $k\in Z$

The numbers of the form $7k+6$ are equal $(\text {mod}{7})$

It is the equivalence class $\text{C}[6]=\left\{...,-15,-8,-1,6,13,20,...\right\}$

Lion Heart
  • 7,073