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

  • Context: Undergrad 
  • Thread starter Thread starter Arixal
  • Start date Start date
  • Tags Tags
    Negative
Click For Summary

Discussion Overview

The discussion revolves around the calculation of the modulo operation, specifically why 80 mod (-11) results in -8 instead of 3. Participants explore the definitions and conventions surrounding the modulo operation, including its implications in number theory and programming.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants assert that 80 mod (-11) equals -8, while others argue it can also be represented as 3.
  • One participant explains the calculation using the equation b = aq + r, demonstrating that both -8 and 3 are valid results.
  • Another participant notes that in number theory, the convention is to use the non-negative value for the mod function, regardless of the signs of the arguments.
  • A further contribution discusses the concept of equivalence classes in modulo operations, stating that -8 and 3 belong to the same class modulo 11.
  • Participants mention that while both values are correct, conventions typically favor the smallest positive representative in an equivalence class.

Areas of Agreement / Disagreement

Participants acknowledge that both -8 and 3 are valid representations of 80 mod (-11), but there is no consensus on which should be preferred based on conventions or contexts.

Contextual Notes

The discussion highlights the variability in definitions and conventions for the modulo operation across different fields, such as mathematics and programming, without resolving which approach is definitive.

Who May Find This Useful

This discussion may be of interest to those studying number theory, programming, or mathematical conventions related to modular arithmetic.

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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
1
Views
3K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
15
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
10
Views
5K
  • · Replies 24 ·
Replies
24
Views
3K