Lecture 13
Definition: We say that is congruent to modulo if . Often we abbreviate, and say congruent mod .
We use the notation to indicate that and are congruent modulo .
For example, indeed, the fact that these two positive integers have the same last two digits means that their difference is a multiple of .
We can now say that an even number is a number congruent to (modulo ), and an odd number is a number congruent to (modulo ).
Rather than saying that “ is of the form ”, we can say that “ is congruent to , modulo ”.
Arguments about time frequently involve understandings of congruences. For example, I was born on a Sunday, and the closing ceremony of the 2012 Summer Olympics took place on a Sunday too. So the number of days since the former is congruent to the number of days since the latter, modulo .
Notice that saying that is congruent to , modulo , is exactly the same as saying that is a multiple of (since it’s saying that ).
As we’ve defined it, a congruence modulo doesn’t say that two things are equal, just that their difference is a multiple of .
But it does behave suspiciously like an equality, as we’re about to see.
Proposition
Here are some properties of congruences, true for all integers:
We always have ;
If , then ;
If and , then ;
If and , then ;
If and , then ;
If and , then .
Proof
For (a):
Since , we have .
For (b):
If , we have . But then , which says , or in other words .
For (c):
As , we have ; similarly as , we have . But then which says that .
For (d):
As , we can write for some integer ; similarly, as , we can write for some integer .
As a result, so , so .
For (e):
As above, we can write , and . Then so , so .
For (f):
As , then we can write for some integer (since is a multiple of ). Similarly, as we can write .
But then , which says that .
I interpret all that as saying that, provided you’re careful and justify any unusual steps, the language of congruences behaves somewhat like equality. (In particular, our choice of notation, looking a bit like an overenthusiastic equals sign, wasn’t a bad choice). This philosophy will get heavy use from now on!
Back at school, you probably learned facts like “an odd number times an even number is an even number”. We can now give an systematic explanation of facts like these, using modular arithmetic.
If is odd and is even then and then (because we can multiply congruences) which says that is even.
Since we can add congruences, we can give similar explanations of addition facts (like “an odd number plus an even number is an odd number”).
The language of congruences gives us ways of writing down similar facts about other moduli.
For example, if , and , then .
We can use these ideas to make multiplication tables of congruences. For example, here’s a multiplication table modulo :
0 | 1 | 2 | 3 | 4 | |
---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 2 | 3 | 4 |
2 | 0 | 2 | 4 | 1 | 3 |
3 | 0 | 3 | 1 | 4 | 2 |
4 | 0 | 4 | 3 | 2 | 1 |
So, for example, this tells us that .
Notice that this shares some features with a usual multiplication table. For example, there is a column and a row of zeroes, because if you multiply something by something congruent to zero mod , you get something congruent to zero mod . Also, multiplying by doesn’t change anything.
Why do we only need to consider rows and columns numbered from to ? This is a consequence of division with remainder.
Proposition
Let and be integers, with . Then is congruent (modulo ) to a unique integer in the set
Proof
We’ll show that such a number exists, first, and then we’ll show that it’s unique.
By division with remainder, we can write for some integer and some integer with . But then that says that , and hence . That shows that is congruent to some number in that set.
Now, we’ll prove uniqueness. In fact we never proved that division with a unique remainder was possible, so let’s mend that now.
Suppose that and also . Then by subtracting, so .
But since and , we have So is a multiple of strictly between and : it must be zero, so , which proves uniqueness.
This proposition has a lot of consequences.
It means we can divide up the integers into sets, called congruence classes or residue classes, based on which number from they’re congruent to. So, for , we divide the integers into:
, all congruent to (mod );
, all congruent to (mod );
, all congruent to (mod );
, all congruent to (mod );
, all congruent to (mod ).