Introduction
A fairly common situation to encounter, whether it be in daily life or during a maths Olympiad paper, is one in which we want to find a number that satisfies several modular congruences. For example, let’s say we wanted to find a number that’s one more than a multiple of four, five more than a multiple of seven, and two more than a multiple of nine. Written slightly differently, we want to find integers
such that:
![]()
![]()
![]()
Since
, we can write that
. Substituting this in to the second equation, we see that:
![]()
![]()
![]()
Hence we see that
. Now we’ll simply repeat what we’ve done but for the third equation:
![]()
![]()
![]()
So we get that
. Setting
, we get the smallest positive value
can take: 173. To generate more solutions, all we have to do is add on some multiple of 252 to 173. As you may have already observed, 252 is the lowest common multiple of 4,7, and 9, which is in fact just
since the numbers are pairwise coprime. And this is not very surprising at all; once we’ve found some solution, such as 173, we can add a multiple of the LCM of the three numbers and it won’t change their value modulo 4,7 or 9, and hence gives us another solution. This suggests that for any number of modular congruences that involve the moduli
where
are pairwise coprime, we’ll get a distinct solution modulo
. This is known as the Chinese Remainder Theorem and is typically written as the following:
Chinese Remainder Theorem: Let
be such that
and suppose
. Then
![]()
![]()
.
.
.
![]()
has a unique solution modulo
.
Proof
Now let’s prove this. We’ll begin by showing we can always construct a solution that satisfies all of the modular congruences.
Set
and
. Clearly
and so by Bézout’s Identity we have that:
![]()
![]()
![]()
We set
and notice that if
then
. For any arbitrary
we thus have that ![]()
.
Hence we see that this number we have constructed,
, satisfies all of the modular congruences as desired. Having shown a solution exists modulo
we’ll now show that the solution is unique:
Say we have a solution
and we’ll suppose that we have another solution
. Consequently, we have that:
![]()
.
.
.
![]()
and
![]()
.
.
.
![]()
These modular congruences imply that
![]()
.
.
.
![]()
and consequently we have that
![]()
.
.
.
![]()
From this we see that ![]()
![]()
as desired.
Hence we’ve shown that a solution modulo
always exists and that this solution is unique.
![]()
Example
Let’s try a problem using the method we used during the proof. Say we are trying to solve the set of modular congruences
![]()
![]()
![]()
We set
. We then set
,
, and
. Now we check what
,
, and
are.
![]()
![]()
![]()
So, defining
we get that
and we observe that
so we get that our solutions must be
.




