LearnViz Math
Advanced ⛓ Discrete Math & Number Theory Topic 77 of 103

Modular Arithmetic

Addition and multiplication respect congruence.

Key idea

Addition and multiplication respect congruence.

In depth

Arithmetic on remainders: do operations as usual, then reduce mod n. It makes huge computations manageable, such as finding last digits, and underlies cryptography.

Worked example

Last digit of 7²⁰²⁵: powers of 7 mod 10 cycle 7, 9, 3, 1; 2025 ≡ 1 mod 4, so the last digit is 7.

Real-world uses

Common mistake

Reducing exponents mod n instead of mod φ(n).

How to learn this

  1. Read the key idea and say it in your own words.
  2. Work through the worked example, then try a similar problem.
  3. Use the interactive lesson’s visual and mini-quiz to check the pattern.

Frequently asked questions

What is Modular Arithmetic?

Addition and multiplication respect congruence. It is a topic at the advanced level in Discrete Math & Number Theory.

Where is Modular Arithmetic used in real life?

Real-world examples: Calculating checksums and the wrap-around of counters and time in computing.

What should I learn before Modular Arithmetic?

Make sure you are comfortable with Congruences, the previous topic in Discrete Math & Number Theory.

What is a common mistake with Modular Arithmetic?

Reducing exponents mod n instead of mod φ(n).

How can I practise Modular Arithmetic?

Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.

What comes after Modular Arithmetic?

Move on to Modular Inverses next.

Related advanced topics in Discrete Math & Number Theory