Modular Arithmetic (Part 1)

Hello, I’m Lucas Hinds, and welcome to my first of a five blogs on modular arithmetic. First off, what is modular arithmetic? Modular arithmetic is a topic covered in number theory, the study of the natural (Counting) numbers. Number theory usually covers topics like prime numbers, divisibility, and of course, modular arithmetic! So, at a basic level, modular arithmetic works like a clock (Sorry for using such a cliché analogy)! If it is 10-o-clock, then it won’t be 15-o-clock in 5 hours (Unless you go by military time, but that’s besides the point). Rather it will be 3-o-clock! We write this as:

10+5≡3 mod 12

Let’s dissect this! The 10 and 5 are—quite obviously—the 10-o-clock starting time, and the 5 hours added. The three line equals sign is just a fancy math symbol to confuse people learning number theory, and it means congruent or equals. And finally, the mod 12 is just clarifying that we are on a clock with 12 hours. But we don’t want to have to think of a clock every time we do operations in modular arithmetic, so let’s make this more rigorous! We will define the following:

We say that:

A+B≡C mod m

Only if the remainder when A+B is divided by m is C, or in other words:


For some integer (The natural numbers and their negatives, plus 0) k.

That was a lot, but all we are saying is that taking the mod is just the remainder when you divide by the mod, so in our previous example, 10+5=15, and 15/12=1 R 3, so 10+5≡3 mod 12. We can do the same thing for basically every operation! Subtraction, multiplication, division, all follow similar rules! That’s it for today, make sure to come back next time, when we go deeper into the properties of modular arithmetic.

Link to the next part!


Leave a comment

Your email address will not be published. Required fields are marked *

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