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

  • Thread starter Arixal
  • Start date
  • Tags
    Negative
In summary, the answer for 80 mod (-11) can either be -8 or 3, as both are equivalent in the modulo operation. However, it is more common to use the smallest positive value in the equivalence class as the answer, which in this case is 3. This is a convention and can vary depending on the context and specific use of the mod function.
  • #1
Arixal
9
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5


The reason why 80 mod (-11) is not 3 is because the negative modulo operation follows a different mathematical rule compared to the positive modulo operation. In the positive modulo operation, the remainder must always be a positive number between 0 and the divisor. However, in the negative modulo operation, the remainder must always be a negative number between the divisor and 0. In this case, the remainder of 80 mod (-11) cannot be 3 because it is a positive number, and therefore, the closest negative number to 0 that can be used as the remainder is -8. This is why the result of 80 mod (-11) is -8 and not 3.
 

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

What is a negative modulo question?

A negative modulo question is a type of mathematical question that involves finding the remainder when dividing a negative number by another number. It is represented by the notation "a mod b" where "a" is the dividend and "b" is the divisor.

How is negative modulo calculated?

To calculate negative modulo, you can use the formula (a mod b) = a - (b * floor(a/b)), where "floor" represents the largest integer less than or equal to a/b. Alternatively, you can use a calculator or programming language that has a built-in function for calculating negative modulo.

What is the result of a negative modulo question?

The result of a negative modulo question is always a positive number. This is because the remainder cannot be negative, and if the result of the calculation is negative, the divisor is added to it until it becomes positive.

What are some real-life applications of negative modulo?

Negative modulo has several real-life applications, such as calculating interest rates, determining the day of the week, and creating repeating patterns in art or music. It is also used in computer programming to solve problems involving negative numbers.

What are some common mistakes when solving negative modulo questions?

Some common mistakes when solving negative modulo questions include forgetting to use the absolute value of the result, using the wrong formula, or not considering the sign of the dividend when calculating the remainder. It is important to carefully follow the steps and double-check the answer to avoid these mistakes.

Back
Top