Summary
This lesson turns the classification of the integers by their remainder into a calculus. It defines congruence modulo , proves that it amounts to leaving the same remainder, that it is an equivalence relation and that it respects addition, multiplication and powers, and builds with its classes the set of remainders, with its addition and multiplication tables. With Bézout’s identity it decides which remainders have an inverse and solves linear congruences completely; it proves the Chinese remainder theorem and Fermat’s little theorem, rereads the divisibility tests as congruences, and applies all this to check digits, to the calendar and to the RSA cryptosystem, whose correctness is proved.
Learning objectives
- Prove that congruence modulo is an equivalence relation compatible with addition, multiplication and powers, and use it to compute remainders of large numbers.
- Build the addition and multiplication tables of and decide, by means of the greatest common divisor, which remainders have an inverse.
- Decide whether a linear congruence has a solution, compute how many solutions it has modulo and find them all.
- Solve systems of congruences with coprime moduli by means of the Chinese remainder theorem, constructing the solution and proving its uniqueness.
- Prove Fermat’s little theorem and apply it to remainders of powers, to divisibilities that hold for every integer and to the correctness of the RSA cryptosystem.
- Analyze which errors a check digit detects and compute days of the week by means of congruences.
The congruence relation
If today is Monday, in days it will be Tuesday, and in days it will be Sunday: to know this there is no need to count the days one by one, because the remainder of dividing the number of days by suffices. In the same way, hours after o’clock it is o’clock on a clock with hours, and the last digit of a product depends only on the last digits of the factors. In all three cases one computes with remainders and forgets the quotient. The lesson on divisibility and division with remainder distributed the integers into classes according to the remainder they leave when divided by a natural number, and proved that the remainder of a sum, of a product and of a power depends only on the remainders of the data. This lesson gives those observations a language of their own, that of congruences, which Gauss introduced in 1801 in his Disquisitiones Arithmeticae, and turns it into an instrument of computation. As in that lesson, the integers are used in advance, with the rules of their arithmetic and of their order that are founded in the lesson on the integers.
Definition (congruence). Let be a natural number. Two integers and are congruent modulo if divides their difference . One writes and reads “ is congruent to modulo ”; the natural number is called the modulus of the congruence.
Thus , because ; , because ; and an integer is even exactly when it is congruent to modulo . That is a multiple of is now written . With the modulus all integers are congruent to one another, because divides every integer; that case is of no interest, and in the examples the modulus will be at least . The sign , with three strokes, recalls that of equality because, as will be seen, congruence behaves like equality in almost everything; the exception, division, will occupy the section on inverses.
The definition by the difference is the most convenient one for proofs, but the intuition of the initial examples is that of the remainder. The following proposition ensures that both say the same thing; its content was already observed, in another form, in the lesson on divisibility, when the divisibility tests were justified, and here it is proved in full detail.
Two integers are congruent modulo if and only if they leave the same remainder when divided by . Let and be the divisions with remainder of and of by , with and . The figure arranges the integers from to in rows of , so that each column gathers those that leave the same remainder.
Proof
If the remainders coincide, , then on subtracting the two divisions the remainder cancels, and the difference is a multiple of .
Conversely, suppose that divides , that is, that for some integer . We substitute the division of .
Since , this equality is a division of by with remainder . By the uniqueness of the quotient and the remainder, is the remainder of , that is, .
In the figure, , , , , , and occupy the same column: all of them leave remainder , and their differences are multiples of .
In particular, every integer is congruent modulo to its remainder, which is one of the integers , and to only one of them, because two of those integers are their own remainders and, if they are distinct, they leave distinct remainders. Computing modulo consists in replacing each number by a convenient representative of its column: the remainder, or sometimes a small negative number, such as instead of .
Loading the content…
Completed
Sign in to save your progress