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

Congruences

a ≡ b (mod n) when n divides a−b.

Key idea

a ≡ b (mod n) when n divides a−b.

In depth

a ≡ b (mod n) means n | (a − b). Congruence behaves like equality: you can add, subtract and multiply both sides. It is an equivalence relation with n classes.

Worked example

17 ≡ 2 (mod 5) because 5 | 15. And 7 × 8 ≡ 2 × 3 = 6 ≡ 1 (mod 5).

Formula

a ≡ b (mod n)

Real-world uses

Common mistake

Dividing both sides without checking for invertibility.

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 Congruences?

a ≡ b (mod n) when n divides a−b. It is a topic at the advanced level in Discrete Math & Number Theory.

What is the formula for Congruences?

The key formula is a ≡ b (mod n).

Where is Congruences used in real life?

Real-world examples: Checking days of the week, clock times and remainders in software and calendars.

What should I learn before Congruences?

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

What is a common mistake with Congruences?

Dividing both sides without checking for invertibility.

How can I practise Congruences?

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 Congruences?

Move on to Modular Arithmetic next.

Related advanced topics in Discrete Math & Number Theory