# Congruence modulo

## Congruence Modulo

You may see an expression like:

This says that is

**congruent**to modulo .We will discuss the meaning of

**congruence modulo**by performing a thought experiment with the**regular modulo operator**.Let's imagine we were calculating mod 5 for all of the integers:

Suppose we labelled 5

Think of these slices as buckets, which hold a set of numbers. For example, 26 would go in the slice labelled

Above is a figure that shows some integers that we would find in each of the slices.

**slices**0, 1, 2, 3, 4. Then, for each of the integers, we put it into a**slice**that matched the value of the integer mod 5.Think of these slices as buckets, which hold a set of numbers. For example, 26 would go in the slice labelled

**1**, because .Above is a figure that shows some integers that we would find in each of the slices.

It would be useful to have a way of expressing that numbers belonged in the

**same slice**. (Notice 26 is in the same slice as 1, 6, 11, 16, 21 in above example).A common way of expressing that two values are in the same slice, is to say they are in the same

The way we express this mathematically for mod C is: $A \equiv B \ (\text{mod } C)$

**equivalence class**.The way we express this mathematically for mod C is: $A \equiv B \ (\text{mod } C)$

The above expression is pronounced is

**congruent to**modulo .Examining the expression closer:

- $\equiv$ is the symbol for congruence, which means the values
**and****are in the same****equivalence class**. **tells us what****operation**we applied to**and****.**- when we have both of these, we call “$\equiv$”
**congruence modulo .**

e.g. $26 \equiv 11\ (\text{mod }5)$

so it is in the equivalence class for 1,

so it is in the equivalence class for 1, as well.

so it is in the equivalence class for 1, as well.

Note, that this is different from : .

## Insights into Congruence Modulo

We can gain some further insight behind what congruence modulo means by performing the same thought experiment using a positive integer

First, we would label

Then, for each of the integers, we would put it into a slice that matched the value of the integer

Below is a figure that shows some representative values that we would find in each of the slices.

**.**First, we would label

**slices****$0, 1, 2, \ldots, C - 2, C - 1$**.Then, for each of the integers, we would put it into a slice that matched the value of the integer

**.**Below is a figure that shows some representative values that we would find in each of the slices.

If we looked at the bucket labelled

**0**we would find:If we looked at the bucket labelled

**1**we would find:If we looked at the bucket labelled

**2**we would find:If we looked at the bucket for

**we would find:****From this experiment we can make a key observation:**

The values in each of the slices are equal to the label on the slice plus or minus some

**multiple of**.

This means the difference between

**any two values**in a slice is

**some multiple of**.

This observation can help us understand equivalent statements and

**equivalence classes**next.