2

Find $x\in \Bbb Z$ with

  • $x\equiv 3 \mod 7$
  • $x\equiv 9 \mod 11$
  • $x\equiv 1 \mod 5$

So here's what I do: I first find $r_1\in \Bbb Z$ with $r_1\equiv 1 \mod 7$ and $r_1\equiv 0 \mod(11\cdot 5)$, e.g. $r_1=330$.

Then I find $r_2\in \Bbb Z$ with $r_2\equiv 1\mod 11$ and $r_2\equiv 0 \mod(7\cdot 5)$, e.g. $r_2=175$.

Then I find $r_3\in \Bbb Z$ with $r_3\equiv 1\mod 5$ and $r_3\equiv 0 \mod (7\cdot 11)$, e.g. $r_3=154$.

Now if we set $x=3\cdot r_1+9\cdot r_2+1\cdot r_3$ this does the job, right?

It kind of makes sense that this would work but can someone give me a better reason than 'kind of makes sense' ?

MyNameIs
  • 1,007
  • 4
    This is actually a proof of the chinese remainder theorem https://en.wikipedia.org/wiki/Chinese_remainder_theorem – lisyarus Jul 20 '16 at 13:54

2 Answers2

3

Sure: What's the remainder of $x$ on division by $7$? Well, it's the sum of the remainders of the three terms, mod 7. The remainder of the first, mod 7, is $3 \cdot 1$. The remainder of the second is $0$; so is the remainder of the third. So the total remainder, mod 7, is just 3. The same argument applies to the other two remainders.

There's one subtle point:

Why, knowing that $r_2$ is $0$ mod $7 \cdot 5$, do I know that it's zero $\bmod 7$? Straight from the definitions: Because if $7\cdot 5$ divides evenly into $r_2$ (say $r_2 = (7 \cdot 5) k$), then $7$ also does, since $r_2 = 7 \cdot (5 \cdot k)$. (Thanks to @Bill Dubuque for straightening me out on this!)

John Hughes
  • 93,729
  • thank you for the kind explanation – MyNameIs Jul 20 '16 at 17:30
  • @MyNameIs The final paragraph above is a bit misleading. It is true for all integers $,p,q,$ that $,pq\mid n,\Rightarrow, p,q\mid n.,$ Rather, it is the reverse implication that requires $,p,q,$ coprime (and that implication is not needed here). The explanation in the first paragraph is conceptually clearer when expressed in vector notation (as in my answer), esp. if you are familiar with linear algebra. I'll be happy to elaborate on my answer if you tell me what is not clear. – Bill Dubuque Jul 20 '16 at 18:35
  • @BillDubuque's remarks are spot-on. I'll edit to try to clarify. I also agree about the vector notation, but didn't want to assume anything about OP's (or other future readers') knowledge --- students often mess with number theory in high school, long before encountering linear algebra. I also find that students are often able to generalize from examples quite easily, so that having them do some computations like those in the first paragraph can lead them to an "aha!" moment. But we all have our different explanation styles, and I'm glad your answer is here as well as mine. – John Hughes Jul 21 '16 at 17:00
  • @John The problem is still there. You claim that $, r_2\equiv 0\pmod{7\cdot 5},\Rightarrow, r_2 \equiv 0 \pmod 7,$ "because $,7,$ and $,5,$ are prime". However the justification of that inference has nothing at all to do with primality (and asserting that it does may greatly confuse students). Eliminating the modular language, the claim is equivalent to $, 5\cdot 7\mid r_2,\Rightarrow 7\mid r_2,,$ This is true because the divisibility relation is transitive, hence $, p\mid pq,,$ $, pq\mid n,$ $\Rightarrow$ $, p\mid n.,$ That's true for all integers $,p,q,,$ not only primes – Bill Dubuque Jul 21 '16 at 17:56
  • Fixed (I hope). – John Hughes Jul 21 '16 at 18:06
  • @John Yes, now it's much better. Thanks. – Bill Dubuque Jul 21 '16 at 18:08
0

Hint $\ $ Those elements span the set of all values $\,(a_1,a_2,a_3)\, \pmod{7,11,5},\,$ i.e.

$$\begin{align} r_1 \equiv (1,0,0)\pmod{7,11,5}\\ r_2 \equiv (0,1,0)\pmod{7,11,5}\\ r_3 \equiv (0,0,1)\pmod{7,11,5} \end{align}$$

$$\begin{align}\Rightarrow\quad\ &\,\ \ a_1 r_1 + a_2 r_2 + a_3r_3\\ \equiv&\,\ (a_1,0,0)+(0,a_2,0)+(0,0,a_3)\\ \equiv&\,\ (a_1,a_2,a_3)\end{align}$$

This will become clearer when you learn the ring-theoretic view of CRT, which here says that $\,\Bbb Z/(7\cdot 11\cdot 5)\,\cong\, \Bbb Z/7 \times \Bbb Z/11\times \Bbb Z/5,\,$ where $\,\Bbb Z/n = $ integers mod $\,n.\,$ Informally this means these triples $\,(a_1,a_2,a_3)\,$ with the natural induced componentwise addition and multiplication have the same arithmetical (ring-theoretic) structure as the integers mod $\,385= 7\cdot 11\cdot 5.$

For example $\,r_1 + r_2 + r_3 = (1,1,1)\,$ which is the identity element in the product ring, which maps to $\,330-175-154 = 1\,$ in the integers mod $\,385$ (I corrected the signs on your $\,r_2,r_3)$

This means that we can solve arithmetical problems in the integers mod $385$ by mapping them into a triple of corresponding problems in the smaller rings of integers mod $\,7,11,5,\,$ and then, by CRT, lift that triple of solutions to the corresponding solution in the integers mod $385.\,$ For example, we can solve polynomial equations in this manner. For example see this answer which computes square roots in that manner.

Bill Dubuque
  • 272,048
  • For your implication, you need more than spanning (as you know): you need that the three reduced triples that you've written above the implication arrow look like the standard basis. Nice job correcting the signs. :) – John Hughes Jul 20 '16 at 17:54
  • @john No, the implication is correct as it stands. I suspect that you are misunderstanding something, but I'm not sure just what. Note that $,r\equiv (a,b,c)\pmod{7,11,5},$ means $,r\equiv a\pmod 7,,$ $,r\equiv b\pmod{11},,$ $,r\equiv c\pmod 5\ $ – Bill Dubuque Jul 20 '16 at 18:15
  • The implication (in the informal, not logical, sense that I dislike is that spanning implies that $a_1 r_1 + a_2 r_2 + a_3 r_3 = (a_1, a_2, a_3)$, i.e., that once you have a spanning set, all you need to do is combine it using your desired outputs as coefficients. For that, you need a set that reduces (mod 7, 11, 5) to the standard basis. What you wrote is, of course, literally correct. I should have said not that the implication was wrong, but that I found it easy to read in a misleading way. – John Hughes Jul 21 '16 at 11:00