Chinese remainder theorem example help

I am currently studying for my upcoming algebra exam and I was wondering if anybody could explain to me this example of a very basic CRT question.

If $x=38$ then $x \equiv 2 \pmod{9}$ and $x \equiv 3 \pmod{7}$.

Solving this, I start by turning the first equation into $2+9y$ and then input it to $2+9y \equiv 3 \pmod 7$. However from here I don't understand why the example gives $2y \equiv 1 \pmod7 \rightarrow y \equiv 4 \pmod 7$ (I get how it went from that to $y \equiv 4 \pmod 7$).

I thought it would be $(2+9y-3)/7$ so $(9y-1)/7$ or is there a better way of getting the answer? Thanks!

• As amWhy notes, what you've written is not even a question, it's just a true statement. Is it possible you have omitted or miswrote something? – anon Apr 9 '13 at 19:53

The claim:

if $x=38$ then $x≡2\pmod 9$ and $x≡3\pmod 7$

is merely telling you that

• if $x = 38$, then when you divide $38$ by $9$, you get a remainder of $2$. And that's true: $\;38 \equiv 2 \pmod 9$: indeed $x = 38 = 9\cdot k + 2, \;\;\text{with}\;\; k = 4$.
• If $x = 38$, then if you divide $x = 38$ by $7$, you get a remainder of 3. That's true to: $38 \equiv 3 \pmod 7. \;\;$ Indeed, $\;38 = 7\cdot k + 3,\;\;\text{with} \;\;k = 5$.

There's nothing to solve here. We already know $x$: it is given to be $38$.

• Teaching and answering! +1 – Amzoti Apr 10 '13 at 0:38
• I suspect there was more to the question that went unposted; but I did the best I could do with the information given... ;-) – Namaste Apr 10 '13 at 0:39
• I sometimes think that they get it when they see the answer and then want to crawl under a rock - I have been there many times! :-) – Amzoti Apr 10 '13 at 0:41
• @amWhy:You are asleep now, my dear friend, Amy. – mrs Apr 10 '13 at 5:58

Hint $\rm\,\ mod\ 7\!:\ 3 \equiv x\equiv 2+9y\equiv 2+2y\:\Rightarrow\:2y\equiv 1\equiv 8,\:$ so $\rm\:y \equiv 4,\:$ i.e. $\rm\: y = 4 + 7k,\:$ therefore, substituting for $\rm\,y,\:$ $\rm\:x = 2+9y = 2+9(4+7k) = 38+63k.$

• I presume you are trying to solve the opposite direction, based on the work you show. – Math Gems Apr 10 '13 at 2:24