2.5.10 · D1Number Theory (Intermediate)

Foundations — Chinese Remainder Theorem (intro)

1,617 words7 min readBack to topic

This page builds every piece of notation the parent note quietly assumes. We go in order: nothing appears before it is defined and drawn. If you can count and divide, you can follow line one.


1. The remainder — the star of the whole show

Divide by . You get with left over. That leftover, , is the remainder.

Formally: any whole number divided by a positive whole number can be written as

  • (the quotient) is how many whole copies of fit inside .
  • (the remainder) is what is left over — and it is always at least and strictly less than .
Figure — Chinese Remainder Theorem (intro)

Why does the topic need this? Because CRT never asks "what is ?" directly. It only ever asks "what is 's remainder?" for several different divisors. The remainder is the only information CRT works with.


2. The congruence symbol and

Writing every time is clumsy. Number theory shortens " and leave the same remainder when divided by " to:

Read it aloud: " is congruent to , modulo ."

  • The wiggly is not an equals sign. It means "same clock position", not "identical number".
  • tells you which clock we are standing at — how many marks it has.
Figure — Chinese Remainder Theorem (intro)

Why the topic needs this: every single line of CRT — , and so on — is a congruence. This is the sentence structure of the whole theorem.

Recall Quick check

Is ? ::: Yes: , and divides .


3. and — the subscript notation

The little number below the line is a subscript. It is just a label — a way to say "the first one", "the second one" — without inventing a new letter each time.

  • are the moduli (plural of modulus): the divisors, one clock per congruence. The means "keep going the same way", and is simply how many there are.
  • are the target remainders you want to hit on each clock.
Figure — Chinese Remainder Theorem (intro)

Why the topic needs it: CRT is a statement about many congruences at once. Subscripts let us write "for every " instead of drawing three, four, or a hundred separate letters.


4. GCD and "coprime" — the crucial hidden condition

The greatest common divisor of two numbers, written , is the largest whole number that divides both of them evenly.

  • because divides both, and nothing bigger does.
  • because the only positive number dividing both and is .

Why the topic needs it: coprimality is the exact condition that stops the clocks from contradicting each other. See more on this in Modular Arithmetic Basics. Without it, two congruences can demand incompatible things (like " is even" and " is odd").


5. The multiplicative inverse

On the -mark clock, there is no "divide" button. So how do we undo a multiplication? We find a number that, when multiplied in, gives .

Why the topic needs it: CRT's construction has a step "solve ". To isolate you must multiply both sides by . This inverse only exists when — which is exactly why coprimality is required. The tool that finds it is the Extended Euclidean Algorithm, and the guarantee it exists comes from Bezout's Identity.

Recall Quick check

What is ? ::: , because .


6. Product notation and

is just the product of every modulus multiplied together: The big (capital Greek "pi") means "multiply all of these", exactly as a big means "add all of these".

is with the -th modulus removed:

Why the topic needs it: is the size of the range where the unique answer lives, and the are the building blocks of the solution formula .


7. The summation symbol

The (capital Greek "sigma") is a compact "add all of these". The below and above say "let run from up to , and add one term for each value". This is used in Systems of Linear Congruences and is the final CRT formula.


How the foundations feed the theorem

Remainder n = qm + r

Congruence a = b mod m

Moduli m_i and targets a_i

GCD and coprime

Modular inverse exists

Building block M_i and inverse y_i

Product M and M_i

Sum formula x = sum a_i M_i y_i

Chinese Remainder Theorem

Related destinations once these are solid: Fermat's Little Theorem and RSA Cryptography both lean on exactly this machinery.


Equipment checklist

Given divided by , name the quotient and remainder.
Quotient , remainder (since ).
What does mean in plain words?
and leave the same remainder mod ; equivalently divides .
What is a subscript ?
A label for "the -th modulus" — a naming device, not a power.
Define "pairwise coprime".
Every pair from the list has GCD equal to .
Is pairwise coprime?
No — .
What is ?
The number with ; the modular stand-in for division.
When does exist?
Exactly when .
What does contain?
The product of all moduli except ; it is on every other clock, invertible on clock .
Expand .
.