Blogs, Proofs

Modular Arithmetic: 2+2=1!

In previous posts I’ve mentioned operations other than the usual multiplication and addition with the real numbers: in Da Vinci’s Theorem. we used the composition of symmetries as an operation, in A rose by any other name… we used the concatenation of words and in Musical Algebra we looked at the the operation of playing chords at the same time.  During the past week I’ve been talking about other operations, modular addition and multiplication, in both my intro to proofs and my math history class.  This arithmetic allows for some very interesting results.

The integers mod 12.

The first thing we should do is define what modular arithmetic is. In order to do this, I’ll work with the example, the integers mod 12.  When working with the integers in this fashion, we can start with any integer. We will then convert that into an integer between 0 and 11.  We do this by dividing by 12 and throwing away everything except the remainder.  For example we would have

  • 42 mod 12=6,
  • 100 mod 12 =4,
  • 120 mod 12=0,
  • 2 mod 12=2.

Now, we can define addition and multiplication on the set by,

  • a mod 12 + b mod 12 =(a+b) mod 12,
  • a mod 12 * b mod 12=(a*b) mod 12.

That is, in order to add two numbers, we do the usual addition, then divide by 12 and only keep the remainder.  Similarly, we multiply the usual way, then we divide by 12 and throw away the remainder.  If we do this, we get that the set 0-11 is closed under the both this addition and multiplication.  For convenience, we denote the set of integers between 0 and 11 by Z12. Furthermore, we would say that in Z12, if we write a+b (or a*b), we mean a+b mod 12 (or a*b mod 12).

As a further example of this, suppose that we are still in Z12, then we would have

  • 9+8=5,
  • 11+2=1,
  • 6+48=6,
  • 7+5=0,
  • 9+4=1

Why did I choose 12 to start with, and why these examples?  Well let’s look at the following questions,

  • If I start work at 9:00 and work for 8 hours what time do I get done? 5:00.
  • If I go on a two hour break at 11:00 what time do I have to be back at work? 1:00
  • If it is June, what month will it be 48 months from now? June.
  • If it is July, what month will it be in 5 months?  Here, there is no 0th month, but we would have to recognize that 12=0 in this model, so we would have December.
  • If I am playing an f, and I want to play a major third above that, what note should I play? We would play an a. (Note f is the 9th note if we let a be the first, and a major third is 4 half steps)

What we see is that we have been using modular addition quite regularly in our lives, even if we haven’t viewed it in this way.  Therefore, this can really be a simple transition if you are already used to telling time or the month of the year.  On the other hand, noticing this relationship can also help teach someone how to work with time.  Below I have a clock by Melissa and Doug specifically meant to help teach children how to tell time.  While they may not have to realize that if we turn the hand forward 8 hours after starting at 9:00 that we will have to divide by 12 and take only the remainder, you can use this fact to point out to them a pattern that occurs whenever they spin the hands past 12 so they are more comfortable with the process.

81coN3ZFKuL._SL1500_.jpg

General modular arithmetic

The only thing special about the integers mod 12 is that it is something that we see in multiple situations in every day life.  However, we also work with the real numbers mod 360 when working with angles (in degrees) and mod 7 when looking at days of the week.  In general, we can define multiplication and addition module any number.

I haven’t provided an example of modular multiplication yet, so suppose that you are on a rotating schedule at work of 5 days on and 5 days off.  You are starting your rotation today on a Saturday, so what day will it be when you’ve finished 15 rotations?  Well, we could say that 15*10=150 mod 7=3, or we could look at this as 10 mod 7=3 and 15 mod 7=1, so 15*10=1*3=3 mod 7.  Since we started on the 7th day of the week, we end on the third day, that is, Tuesday. Here, I wanted to point out that dividing and taking the remainder before we multiply actually made the process much simpler. Instead of dealing with products of large numbers, we could use smaller numbers.

As a final thought, I wanted to justify the title.  Therefore, suppose that we are working in Z3.  We would then note that 2+2=1 mod 3, giving the result above.

In coming posts, I plan on talking more about modular arithmetic, and, in particular, look at some of the theorems we have proven in my classes using modular arithmetic.  If you enjoyed this post, make sure to follow the blog by using the follow button below, or by liking STEM and leaf on Facebook or Twitter. That way you’ll be notified when I post more on this topic.

1 thought on “Modular Arithmetic: 2+2=1!”

We'd love to hear your thoughts!

This site uses Akismet to reduce spam. Learn how your comment data is processed.