Modular arithmetic

needs images!

In or­di­nary ar­ith­metic, you can think of ad­di­tion and sub­trac­tion as trav­el­ing in differ­ent di­rec­tions along an in­finitely long road. A calcu­la­tion like \(9 + 6\) can be thought of as start­ing at kilo­me­ter marker 9, then driv­ing for an­other 6 kilo­me­ters, which would bring you to kilo­me­ter marker 15 (nega­tive num­bers are analo­gous to driv­ing along the road back­wards). If the road is perfectly straight, you can never go back to a marker you’ve already vis­ited by driv­ing for­ward. But what if the road were a cir­cle?

Mo­du­lar ar­ith­metic is a type of ad­di­tion that’s more like driv­ing around in a cir­cle than along an in­finite straight line. In mod­u­lar ar­ith­metic, you can start with a num­ber, add a pos­i­tive num­ber to it, and come out with the same num­ber you started with—just as you can drive for­ward on a cir­cu­lar road to get right back where you started. If the length of the road were 12, for ex­am­ple, then if you drove 12 kilo­me­ters you would wind up right back where you started. In this case, we would call it mod­u­lus 12 ar­ith­metic, or mod 12 for short.

Mo­du­lar ar­ith­metic may seem strange, but in fact, you prob­a­bly use it ev­ery day! The hours on the face of a clock “wrap around” from 12 to 1 in ex­actly the same way that a cir­cu­lar road wraps around on it­self. Thus, while in or­di­nary ar­ith­metic \(9 + 6 = 15\), when figur­ing out what time it will be 6 hours af­ter 9 o’clock, we use mod­u­lar ar­ith­metic to ar­rive at the cor­rect an­swer of 3 o’clock, rather than 15 o’clock.

Parents:

  • Mathematics

    Math­e­mat­ics is the study of num­bers and other ideal ob­jects that can be de­scribed by ax­ioms.