3

In number theory, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer n by several integers, then one can determine uniquely the remainder of the division of n by the product of these integers, under the condition that the divisors are pairwise co-prime.Let n1, ..., nk be integers greater than 1, which are often called moduli or divisors. Let us denote by N the product of the ni.

The Chinese remainder theorem asserts that if the ni are pairwise coprime, and if a1, ..., ak are integers such that 0 ≤ ai < ni for every i, then there is one and only one integer x, such that 0 ≤ x < N and the remainder of the Euclidean division of x by ni is ai for every i.

This may be restated as follows in term of congruences: If the ni are pairwise coprime, and if a1, ..., ak are any integers, then the system

\begin{aligned}x&\equiv a_{1}{\pmod {n_{1}}}\\&\,\,\,\vdots \\x&\equiv a_{k}{\pmod {n_{k}}},\end{aligned}

has a solution, and any two solutions, say x1 and x2, are congruent modulo N, that is, x1 ≡ x2 (mod N).

[Wikipedia]

I have already tried thinking about the case of it's $mod$ $2$, but can't really think about anything else. Can anyone help please?

Cheese Cake
  • 1,143
  • 2
    The proof of the Chinese Remainder Theorem from first principles requires quite a bit of build up. How much number theory do you know? –  Jul 07 '21 at 02:34
  • Not much, just some things, such as modulos. – Cheese Cake Jul 07 '21 at 02:35
  • 3
    I will say then that I think the best thing for your mathematics education is not to read some proof of the Chinese Remainder Theorem, but to instead start studying elementary number theory. –  Jul 07 '21 at 02:36
  • Well, I do know elementary number theory, but when you mean "elementary", does it mean primary school or high school? – Cheese Cake Jul 07 '21 at 02:37
  • 2
    When I say elementary number theory, I mean 'everything one should know before studying algebraic number theory,' which includes the Chinese Remainder Theorem and much more, which I seriously doubt would be taught in most high schools. –  Jul 07 '21 at 02:39
  • 2
    The word 'elementary' is not used in the sense of 'elementary school,' but in the sense of "what you can do without advanced algebraic or analytic techniques." A lot of Euler and Gauss' groundbreaking work in number theory would be classified as elementary, for instance. –  Jul 07 '21 at 02:40
  • 1
    Do the case $k=2$ first. – Thomas Andrews Jul 07 '21 at 02:56
  • 1
    You will find it proved in any intro Number Theory textbook (but you will probably have to learn lots of the other things in the textbook before you get to it). You might find some of the questions listed on this page under "Related" will be helpful. – Gerry Myerson Jul 07 '21 at 04:26
  • Thank you guys, I really appreciate your help! – Cheese Cake Jul 08 '21 at 00:31

1 Answers1

4

First solve the $n=2$ case. That is \begin{align*} x&\equiv a(\text{mod }p)\\ x&\equiv b(\text{mod }q) \end{align*} Now, define $p_1$ and $q_1$ such that $p_1p\equiv 1(\text{mod }q)$ and $q_1q\equiv 1(\text{mod }p)$. The existence of these are guaranteed by the fact that $p$ and $q$ are coprime$^*$. Now let $$y \equiv a q q_1 + b p p_1 (\text{mod }pq)$$ Then $y$ satisfies both the equations. This is because, when we consider modulo $p$, we get $y\equiv aqq_1\equiv a(\text{mod }p)$. Similarly, $y\equiv b(\text{mod }q)$. So, $y$ is a solution for $x$.

To show the uniqueness of this solution, note that if $z\equiv a(\text{mod }p)$ and $z\equiv b(\text{mod }q)$, we have $(z-y)$ is a multiple of $p$ and $q$ respectively. So, $(z-y)$ is a multiple of $pq$ which means $z\equiv y(\text{mod }pq)$

Now, for the general case of \begin{align*} x&\equiv a_1(\text{mod }m_1)\\ &\cdots\\ &\cdots\\ &\cdots\\ x&\equiv a_n (\text{mod }m_n) \end{align*} it is very easy to extend our previous idea using induction.

Using our previous idea, we can define $M=m_1m_2\cdots m_n$, $b_i=\frac M{m_i}$ and $b_i^{\prime}=b_i^{-1}$ for all $i$ and note that $$x\equiv \sum_{i=1}^n a_i b_i b_i^{\prime} (\text{mod }m)$$


$*$ Since $p$ and $q$ are coprime, there are integers $a$ and $b$ such that $ap+bq=1$ (by Euclid's Division Algorithm). Now, put $a=p_1$ and $b=-k$.

Sayan Dutta
  • 8,831
  • Can you please elaborate on the existence of $p_{1}$ and $q_{1}$ from the fact that $p$ and $q$ are coprime? – Sergio Apr 29 '22 at 12:21
  • 1
    @Sergio check the edit – Sayan Dutta Apr 29 '22 at 12:28
  • Thanks a lot, your explanation clarified my doubt, however it raised another. How should I interpret $p^{-1}(mod\ q)$. Aren't we working only with integers? I suppose that, generally, $p^{-1}$ is non-integer. – Sergio Apr 29 '22 at 12:44
  • 1
    @Sergio I wrote "let $p_1=p^{-1}(\text{mod }q)$ and $q_1=q^{-1}(\text{mod }p)$". Maybe, a better way was to write, "define $p_1=p^{-1}(\text{mod }q)$ and $q_1=q^{-1}(\text{mod }p)$". What I meant was, "define $p_1$ and $q_1$ such that $p_1p\equiv 1(\text{mod }q)$ and $q_1q\equiv 1(\text{mod }p)$". I hope, it's clear now. – Sayan Dutta Apr 29 '22 at 13:00
  • 1
    Thanks a lot for your help :) – Sergio Apr 29 '22 at 13:19