Why isn't 80 mod (-11) equal to 3?

  • Context: Undergrad 
  • Thread starter Thread starter Arixal
  • Start date Start date
  • Tags Tags
    Negative
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
Arixal
Messages
9
Reaction score
0
Can someone please explain why 80 mod (-11) is -8…? Why isn’t it 3?

b = aq + r
80 = (-11)q + r
80 = (-11)(-7) + 3
Thus 80 mod (-11) = 3..
 
Physics news on Phys.org
Arixal said:
Can someone please explain why 80 mod (-11) is -8…? Why isn’t it 3?

b = aq + r
80 = (-11)q + r
80 = (-11)(-7) + 3
Thus 80 mod (-11) = 3..

Your calculation is correct.

-8 and 3 are equivalent mod -11. Both answers are right.
 
SteveL27 said:
-8 and 3 are equivalent mod -11. Both answers are right.
Yes, they are the same, but typically a mathematical function with multiple 'valid' values is assigned a standard value by convention. Thus, the √ function is defined to be the non-negative root; arcsin etc. also have standard ranges.
In number theory, the non-negative value is taken for the mod function regardless of the signs of the arguments. Programming languages are annoyingly inconsistent. See http://en.wikipedia.org/wiki/Modulo_operation#Remainder_calculation_for_the_modulo_operation.
 
There are a number of different ways of thinking about "modulo". The most fundamental uses "equivalence" classes. -8 and 3 are in the same equivalence class "modulo 11" because -8= (-1)11+ 3 or, alternatively, 3+ 8= 11= 0 (mod 11) so that 3 is the additive inverse of 8: -8= 3 (mod 11).

It is a common convention to use the smallest positive number in an equivalence class to "represent" the class but any number in the class can be used. Sometimes it is convenient to use "-8" rather than "3" just as sometimes it is convenient to use 2/4 rather than 1/2.