Modulo Arithmetic

by Jon Davidson

The purpose of this exercise is to have you spend a couple minutes learning some new math just to give you an idea of what it is like to learn math from reading a web page.

Modulo arithmetic is concerned with the remainders after dividing integers. Mathematicians occasionally use modulo arithmetic when studying number theory or certain algebraic structures called groups.

As an example, suppose you divide 23 by 6. Six divides into 23 three times with a remainder of 5. We might say that the quotient is 3 and the remainder is 5. In modulo arithmetic the quotient is unimportant; only the remainder is relevant. Thus we state the result this way:

In this equation “mod” is the abbreviation of “modulo.” Then “(mod 6)” indicates that 23 was divided by 6. The triple-lined “equal” sign means “congruent.” Another word for congruent is “equivalent,” but in speaking the language of modulo arithmetic we always say “congruent.” Thus, “23 is congruent to 5 mod 6.”

Try to think your way through this one before reading the answer:

As a disclaimer, in a technical sense, this problem has infinitely many possible answers. But almost always, mathematicians are interested in the simplest answer, which is always a positive number (or zero) less than the divisor. Thus our answer will be between 0 and 10, inclusive.

So, we divide 47 by 11, and the quotient is 4. Subtract 4 • 11 = 44 from 47 and we get a remainder of 3, just as you would by doing long division. Thus,

Another way of stating the above result is this:

The context in writing it in this order is usually declarative: “47 mod 11 is 3.” No matter which side “(mod 11)” is placed, it still means division by 11. (And yes, it is possible to get a remainder of 47 when dividing 3 by 11! This is provided your quotient is - 4.)

Here is a simple application of modulo arithmetic in daily life. What month will it be 28 months from now? Suppose that the current month is March. Let’s number the months just like you would with calendar dates, e.g., March is month 3. Going forward 28 months from month 3 gives you month 3 + 28 = 31. Since a year contains 12 months, then we divide by 12 and look at the remainder:

Thus 28 months after March is month number 7, or July.

If, when you read the question, you instinctively decided that subtracting 2 years from 28 months leaves 4 months, so 4 months after March is July, then you were actually doing modulo arithmetic.

Modulo arithmetic equations, to some extent, work much like ordinary algebra equations. For example, you can add a number to both sides or multiply both sides by a number. And sometimes mathematicians use modulo arithemetic to partition (divide up) numbers into specific sets. But since this is only intended to be a simple introduction, I’ll leave it at that.

If you are not sure you have the hang of this yet, here are several more problems to try. Answers are below. Remember, divide by the modulo number and give the remainder as the answer.

 

a) Find 7 (mod 3).

b) Find 20 (mod 5).

c) Find 16 (mod 9).

d) Find 62 (mod 4).

 

Answers:

a) 1

b) 0

c) 7

d) 2