congruence system with $2$ variables $x, y$

198 Views Asked by At

I have the following two congruneces and I want to determine all solutions (x,y):

1.): 6x + 3y = 9 mod 7          /*(-2)
2.): 5x + 6y = -3 mod 7

I did the following to solve x and y:

    -12x - 6y = -18 mod -14
     5 x + 6y = -3 mod 7
    -----------------------
    -7x       = -21 mod -7
    -7x       = -21 mod 7

    -7x       = -21 + k * 7
    -7x       = -21 + 1 * 7
    -7x       = -14          /:(-7)
      x       = 2 (first solution)

1.): (-5): -30x -15y = -45 mod -35
2.): (6):   30x +36y = -18 mod 42
----------------------------------
                 21y = -63 mod 7
                 21y = -63 + k * 7
                 21y = -63 + 3 * 7
                 21y = -42  /:(21)
                   y = -2 (second solution)

Solution set:

L= {2 + k * 7, (-2) + k * 7 | k E Z}

Is this correct so far? Does anyone know a good online-solver to check congruences like this. Thanks in advance!

2

There are 2 best solutions below

0
On BEST ANSWER

\begin{align*} &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{Consider the system}\\[4pt] 6x + 3y &\equiv 9\;(\text{mod}\;7)&&(\text{eq}1)\\[4pt] 5x + 6y &\equiv -3\;(\text{mod}\;7)&&(\text{eq}2)\\[4pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{Simplifying $(\text{eq}1)$, we get, in succession,}\\[4pt] 6x + 3y &\equiv 9\;(\text{mod}\;7)\\[4pt] -x + 3y &\equiv 2\;(\text{mod}\;7) &&\text{[replacing $6$ by $-1$ and $9$ by $2$]}\\[4pt] x - 3y &\equiv -2\;(\text{mod}\;7) &&\text{[multiplying both sides by $-1$]}\\[4pt] x - 3y &\equiv 5\;(\text{mod}\;7) &&\text{[replacing $-2$ by $5$]}\\[4pt] x &\equiv 3y + 5\;(\text{mod}\;7) &&\text{[solving for $x$]}\\[4pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{Simplifying $(\text{eq}2)$, we get, in succession,}\\[4pt] 5x + 6y &\equiv -3\;(\text{mod}\;7)\\[4pt] -2x + 6y &\equiv 4\;(\text{mod}\;7) &&\text{[replacing $5$ by $-2$ and $-3$ by $4$]}\\[4pt] x - 3y &\equiv -2\;(\text{mod}\;7) &&\text{[dividing both sides by $-2$]}\\[4pt] x - 3y &\equiv 5\;(\text{mod}\;7) &&\text{[replacing $-2$ by $5$]}\\[4pt] x &\equiv 3y + 5\;(\text{mod}\;7) &&\text{[solving for $x$]}\\[4pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{Thus, $(\text{eq}1)$ and $(\text{eq}2)$ are equivalent, so only}\\[-1pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{one of them is needed (the other is redundant).}\\[4pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{It follows that integers $x,y$ satisfy the system}\\[-1pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{if and only if $x \equiv 3y + 5\;(\text{mod}\;7)$.}\\[4pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{Equivalently, integers $x,y$ satisfy the system}\\[-1pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{if and only if $x,y$ can be expressed as}\\[4pt] x &= 7s + 3r + 5\\[4pt] y &= 7t + r\\[4pt] &\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \text{for some integers $r,s,t$.}\\[4pt] \end{align*}

0
On

You have $6*2 + 3(-2) = 6 \equiv -1 \neq 9$ (mod 7). So, sorry, your answer is wrong.

In fact, you have $7x \equiv 14 \equiv 0$ (mod 7), it hold for every $x$.