The Chinese Remainder Theorem gives a method for solving simultaneous linear congruences of the form
Theorem (Chinese Remainder Theorem)
Letbe positive integers such that
for
then the system of linear congruences
has a simultaneous solution which is unique
Proof:
Letand let
for
Then since
for each
and so the linear congruence
has a unique solution
Let this solution be
so
and construct the number
- we show this satisfies satisfies each of the congruences. To show this we evaluate
for each
Whenever
since
divides
we have
hence
for each
as each of the remaining terms in the sum is congruent
to 0.
Sincewas found such that
we have
We now show uniqueness. Supposeis a second solution of the system:
This implies each
divides
whereupon the fact that the moduli are relatively prime gives us that
divides
so
as required.
Example: Solve the system of linear congruences
We have
We solve
Hence
Example: Solve the congruence
Since 1001=7*11*13 we seek the simultaneous solution ofor equivalently
Hence