Modular Arithmetic

Shodor > Interactivate > Lessons > Modular Arithmetic


In this lesson, students will learn about modular arithmetic and how to apply it in real world situations.


Upon completion of this lesson, students will:

  • understand how to perform modular arithmetic.
  • understand the notation # mod #.
  • be able to apply modular arithmetic in real world contexts.

Standards Addressed:

Student Prerequisites

  • Arithmetic: Student must be able to:
    • complete basic whole number computations, including division with remainders.
  • Technological: Students must be able to:
    • perform basic mouse manipulations such as point, click and drag.
    • use a browser for experimenting with the activities.

Teacher Preparation

Students will need:

Key Terms

divisionThe inverse operation of multiplication
modular arithmeticA method for finding remainders where all the possible numbers (the numbers less than the divisor) are put in a circle, and then by counting around the circle the number of times of the number being divided, the remainder will be the final number landed on
remaindersAfter dividing one number by another, if any amount is left that does not divide evenly, that amount is called the remainder. For example, when 8 is divided by 3, three goes in to eight twice (making 6), and the remainder is 2. When dividing 9 by 3, there is no remainder, because 3 goes in to 9 exactly 3 times, with nothing left over

Lesson Outline

  1. Focus and Review

    Remind students what has been learned in previous lessons that will be pertinent to this lesson and/or have them begin to think about the words and ideas of this lesson:

    • Ask the students if they remember how to divide in situations such as 15/4.
    • Have students explain to one another how to divide with remainders.

  2. Objectives

    Let the students know what it is they will be doing and learning today. Say something like this:

    • Today, class, we will be talking about modular arithmetic and how to use it to solve real world problems.
    • We are going to use the computers to learn about modular arithmetic, but please do not turn your computers on or go to this page until I ask you to. I want to show you a little about this activity first.

  3. Teacher Input

    Give the student this word problem: If I have 14 cookies, and I want to divide them evenly among 5 students, how many cookies would each person get?

    • Ask the students how to solve this problem, not what the answer is.
    • Write the names of 5 students on the board like a clock-face. Draw a cookie next to each name as you "deal" out the cookies. Ask the students what the remainder is.

    Explain to the students that 14 mod 5 is 4. Ask them what they think "mod" means. Then ask the students what 25 mod 3 is.

    • Focus on the process of how they solved the question, not the answer.
    • Make sure everyone understands the process, perhaps letting students pair-share with each other to solidify their understanding.

  4. Guided Practice

    Open a browser to the Clock Arithmetic applet.

    • Demonstrate to the class how the applet works. Remember to explain that the clock can be used to show more than just elapsed time.
    • As a class, brainstorm ways that you could use this applet to solve the problems from before.
    • Have students use the applet to demonstrate these solutions to the rest of the class.

  5. Independent Practice

    Have the students work on the Modular Arithmetic Exploration Questions.

    • Have students discuss in groups how they solved the problems.
    • Discuss as a class how to solve some of the more difficult problems.

    Have the students complete the Working with Remainders Worksheet.

  6. Closure

    Discuss as a class how using the Clock Arithmetic applet makes solving these problems easier.

Alternate Outline

This lesson can be rearranged in several ways if there is only one available computer:

  • Have the students visualize modular arithmetic using the Clock Arithmetic applet but work through problems without a computer.
  • Allow students who need extra help to use the Clock Arithmetic applet to help them solve the problems.

Suggested Follow-Up

This lesson can be followed by either of the following lessons:

a resource from CSERD, a pathway portal of NSDL NSDL CSERD