Textbook
1. Introduction
2. Algebra (cloned)
3. Geometry (cloned)
4. Triangles
5. Combinatorics
6. Number theory (cloned)
6.1 Divisibility (cloned)
6.2 Modular arithmetic (cloned)
6.3 Diophantine equations (cloned)
7. Probability (cloned)
8. Combinatorics (cloned)
9. What's next? (cloned)
10. Counting
11. Arithmetic
Achievable logoAchievable logo
6.2 Modular arithmetic (cloned)
Achievable AMC 8
6. Number theory (cloned)
Our AMC 8 course is in "early access"; the content on this page may be incomplete.

Modular arithmetic (cloned)

Modular arithmetic

The hard part about this topic is knowing what tiny fraction of it you need for the AMC, and what massively huge proportion of it you can save for grad school (or never).

Let’s get into it. (Not to worry, it won’t take long.)

The basic idea

As you know, integers are either even or odd. And there are just as many even numbers as odd ones.

Next, some numbers are divisible by three and others aren’t. But have you noticed that twice as many numbers aren’t divisible by three as those that are?

Number theorists would say that when it comes to divisibility by three, there aren’t just two categories (divisible or not), Instead there are three categories:

  • Has no remainder when divided by three
  • Has a reminder of one when divided by three
  • Has a reminder of two when divided by three

As we will se shortly, these categories are also called “congruence classes.”

Now, notice two key things:

  1. All integers fall into one of those three categories
  2. All three categories have the same number of integers in them

We say that numbers in the first category are *congruent to where divisibility by is concerned."

We more commonly use shorthand, of course: “congruent to

…or just “”, as in .

Similarly,

and .

By extension, this applies to other moduluses (i.e. other numbers we might divide by).

Definitions
modulus
the number we are dividing by
remainder
the integer “left over” after removing as many integer multiples of the modulus as possible
congruence class
a category of integers including all those with a certain remainder when divided by a certain modulus. For example, and are in the same congruence class .

How it gets used

The most important idea here is that addition, subtraction, and multiplication (but not division) work reliably under “mod math.”

Example

Which of the following numbers is equal to ?

A)

B)

C)

D)

E)

(spoiler)

Brute force works fine here, but consider how reframing this problem under a few different moduluses helps get you to the right answer more easily:

Since , and since multiplication (and thus exponentiation) works as expected under all moduluses, . This rules out B, C, and E, all of which are congruent to .

Now we know that the answer is either A or D, there are plenty of ways to determine that it must be D. Or, to put it another way, those two answers are so far apart from each other that you have more ways to easily and correctly choose D over A.

Keeping with the theme of using modular arithmetic, one of the many ways to pick D over A would be to observe that , and that . Therefore the correct answer is one more than a multiple of , which makes A wrong and D right.

(And now in retrospect we can see that if we had examined this problem under from the beginning, we could have finished in one step instead of the two we took.)

What to do

  • If everything above was old news to you, then this section should be no problem. Click “complete” below, and we’ll add all the relevant quizzes to your deck. Then, during your short daily practice, we’ll occasionally quiz you on this knowledge in a way that etch it into your memory for good.
  • If some or all of this was new to you, then you should still click “complete” below, and add it to your quizzes, but I recommend against adding anything else for today. Instead, work with these new cards for today, and consider adding more fresh knowledge tomorrow. You might also do a bit of research to refresh (or learn for the first time) the rules given above.