Learn · Try · Master

Modular Arithmetic

Two integers are congruent modulo n when they leave the same remainder after division by n.

How it works

Two integers are congruent modulo n when they leave the same remainder after division by n. Name the quantities before calculating, keep each transformation logically equivalent, and check the result against the original conditions.

Worked example

Compute 38 mod 7.

  1. Find the largest multiple of 7 not exceeding 38: 35.
  2. Subtract 38−35.
  3. The remainder is the residue.

38 mod 7=3.

Try it now

These questions come from the same validated skill generator used by the game.

Common mistakes

  • Using a remembered formula without identifying what each symbol represents.
  • Changing a value or condition during an intermediate step.
  • Skipping the final substitution, estimate, or logical check.

Challenge

Find the last digit of 7⁴ without calculating the full power.

Questions learners ask

What is the key idea in modular arithmetic?

Two integers are congruent modulo n when they leave the same remainder after division by n.

How should I check an answer?

Substitute it into the original conditions, check units and signs, and decide whether its size is reasonable.