[Math] How to solve a problem using the Chinese remainder theorem and how does mod operator is understood correctly

algebra-precalculusarithmeticchinese remainder theoremelementary-number-theory

The situation is as follows:

$$n = 3a + 2$$

$$n = 7b + 5$$

$$n = 8c + 9$$

Find the $n$ so it is less than $100$ and $a$, $b$ and $c$ are positive integers.

I know that this can be solved using the Chinese remainder theorem but I don't know how to use it. Therefore I'd like that somebody could explain me exactly how does $\mod{}$ operator works.

The only thing I know is that $\bmod$ is used to express the remainder of an euclidean division. Like this

$5$ divided by $2$ means:

$5\,\bmod\,2 = 1$

Because the remainder is $1$.

But what if the situation is like this?:

$2\,\bmod\,9$

Would this mean

$$\frac{2}{9} = 0.2 \times 9 + 2 ?$$

So the remainder is $2$? It does not seem right as going backwards does not produce $2$ in the sense $0.2\times 9 + 2$ is not $2$.

How about negative numbers

However how does it work with negative numbers? Like:

$-3\bmod 25$

As mentioned above if I follow the same route I may find weird results.

But that's only one part of the problem, as the second thing is How to understand this when $\mod{}$ is used as follows:

$24\equiv 14 \left ( \bmod 10 \right )$

From what I had understood it means that both share the same remainder which is $4$.

But the problem lies on how to translate the equations I have been given into the equation from above, the one which uses $\mod{}$?

Therefore I'd like somebody could help me with a clearly step-by-step solution that can explain how to build up the $\mod{}$ equations and how to solve them the easiest way possible.

Best Answer

The $\textrm{mod}$ notation is not an operator that gives you a single output.

Don't read it as if it was computer code. I would only read the $\textrm{mod}$ notation in English. $\text{mod}\;n$ means the preceding equation/formula is under modulus $n$. In the context of integer numbers, we consider each integer number by its Euclidean remainder when divided by $n$.

$\equiv$ is a notation for equivalence relations. Please read its introductions on the internet.

For example, we say 13 is equivalent (or congruent, some even say equal, depending on the context) to 23 modulus 10, denoted by $13\equiv23\;\textrm{mod}\;10$ because they have the same remainder when divided by 10, which is 3. Negative number is usually read "in reverse". For example, $13\equiv-7\;\textrm{mod}\;10$.

As for your puzzle at the beginning, you don't have to use Chinese Remainder Theorem. I think Chinese Remainder Theorem is a bit of a leap when you are just learning the mod notation. Try solving the puzzle yourself without the theorem and share where you are first.

Related Question