13

I think it's best to illustrate this with an example.

Take for instance the ring of integers modulo $6$. If I have the system of equations:

$$ \begin{aligned} 2x + 2y &= 4 \\ 3x + 4y &= 3 \end{aligned} $$

I divide the first equation by $2$:

$$ \begin{aligned} x + y &= 2 \\ 3x + 4y &= 3 \end{aligned} $$

Subtract $3$ times the first equation from the 2nd equation to arrive at a solution for $y$:

$$ \begin{aligned} x + y &= 2 \\ 0 + y &= 3 \end{aligned} $$

Thus, $y = 3$ and $x = 5$.

From my understanding, this should be not possible as in ${\Bbb Z}_6$ there is no equivalence to $\frac12$ as $2$ does not have a multiplicative inverse in this ring, but yet I get a solution that works.

The best answer I have is that this is just a particular example in which dividing by $2$ was possible from construction, even if it makes no sense in the ring. I know I can invent situations where this would not be possible, for instance, if equation 1 was:

$$ 1x +3y = 1 $$

I'm curious if there is anything else at play here, or if it's just luck of construction that an answer could be found.

james Orr
  • 141
  • 2
    Even though there are good answers already, let me just add that what you did is analogous to the situation when you have equation $x^2 = 4$, then you apply square root to conclude that $x = \sqrt 4 = 2$. Yes, you got a solution, but you missed the solution $x = -2$. The problem is that squaring $x\mapsto x^2$ is not injective on whole of $\mathbb R$, just like multiplying by $2$ is not injective on $\mathbb Z/6\mathbb Z$, meaning $2z = 4$ has more than one solution. You just picked one of the solutions. – Ennar Jul 11 '23 at 13:08
  • @Ennar Maybe your intension is different, but when we apply the square root operation to $x^2=4$ we get : $\sqrt {x^2}=\sqrt 4$ which is equivalent to $|x|=2$ which means $x\in{-2,2}$. Applying of the square root operation does not imply $x=\sqrt 4=2$ . – lone student Jul 12 '23 at 05:23
  • @lonestudent yes, and when you "divide" by $2$ mod $6$, you get result mod $3$ like Bill Dubuque wrote and not mod $6$. I don't see what's bothering you with my comparison? – Ennar Jul 12 '23 at 09:20

5 Answers5

26

It's clearer triangularized: by (fraction-free) Gaussian elimination the system is equivalent to

$$\begin{align} x\ &=\ 5\\ 2y\ &= -6\end{align}\qquad$$

But $\,2y \equiv -6 \equiv 0 \pmod{\!6}\iff y \equiv 0\pmod{\!3}\iff y\equiv 0,3\pmod{\!6}\,$ by here.

Essentially you missed the solution $\,y\equiv 0\pmod{\!6}$ due to improper modular cancellation, i.e. not cancelling $\color{#c00}2$ everywhere (i.e. from the modulus too), as explained in the prior link, i.e.

$$\begin{align} \color{#c00}2y&\equiv \color{#c00}2\cdot 0\pmod{\color{#c00}2\cdot 3}\\ \iff\ y&\equiv\ \ \ \ \ 0\pmod{\ \ \ \ 3}\end{align}\qquad$$

or, divisibility-wise: $\,\color{#c00}2\cdot 3\mid \color{#c00}2y-\color{#c00}2\cdot 0\iff 3\mid y-0\,$ by cancelling $\color{#c00}2,\,$ i.e. $\,6\mid 2y\iff 3\mid y.$

Remark $ $ Generally your wrong inference is $\,nx\equiv na\pmod{\!nm}\iff x\equiv a\pmod{\!nm},\,$ but correct is $\,x\equiv a\pmod{\!m},\,$ so $\,\color{#0a0}{x\equiv\, a},\ a\!+\!m,\ a\!+\!2m,\ldots, a+(n\!-\!1)m\pmod{\!nm},\,$ so your wrong inference yields only one of the $\,n\,$ solutions $\!\bmod nm,\,$ viz. $\,\color{#0a0}{x\equiv a}\pmod{\!mn}$.

The "reason why it works" is that the direction $\,x\equiv a\pmod{\!mn}\,\Rightarrow\, nx\equiv na\pmod{\!mn}\,$ is always true. This multiplication (scaling) is a special case of the Congruence Product Rule. It's the cancellation in the opposite direction $(\Leftarrow)$ that fails without cancelling from the modulus too.

Moo
  • 11,311
Bill Dubuque
  • 272,048
9

The unique solution in $\Bbb Z$ gives of course a solution in $\Bbb Z_6.$ But your "dividing by 2" made you lose a second solution mod 6: $x=5,y=0.$

In $\Bbb Z_6,$ your initial system clearly determines only $2y,$ not $y.$

It can be solved without this faulty division as follows, applying Gaussian elimination more carefully: $$\begin{align}\begin{cases} 2x + 2y &\equiv4\bmod6 \\ 3x + 4y &\equiv3\bmod6 \end{cases}&\iff \begin{cases} 2x + 2y &\equiv4\bmod6\\ (3x + 4y)-2(2x+2y) &\equiv-5\bmod6 \end{cases}\\&\iff \begin{cases} 2x + 2y &\equiv4\bmod6\\x&\equiv5\bmod6 \end{cases}\\&\iff \begin{cases}2y &\equiv0\bmod6\\x&\equiv5\bmod6,\end{cases}\end{align}$$ and $$2y\equiv0\bmod6\iff y\equiv0\text{ or }3\bmod6.$$

Anne Bauval
  • 34,650
  • Maybe it's purely a matter of taste, but I would prefer to use the additive inverse of $2$, which is $4$. Something like the following $$(3x + 4y)+(-2)(2x+2y) = (3x + 4y)+4(2x+2y) = x$$ – Rodrigo de Azevedo Jul 12 '23 at 12:26
  • @RodrigodeAzevedo It is indeed purely a matter of taste. To me, the additive inverse of $2\bmod6$ can as well stay written $(-2)\bmod6,$ exactly like I (implicitely) wrote $3-2\cdot4\equiv-5\bmod6$ where you would seem to prefer rewriting it $3+4\cdot4\equiv1\bmod6.$ Btw, $(3x + 4y)+4(2x+2y)\equiv-x,$ not $x.$ – Anne Bauval Jul 12 '23 at 12:35
6

If you multiply the equation $2x + 2y = 4 \pmod 6$ by $\frac12$, you should get $x+y=2\pmod 3$, or equivalently:

$$ \begin{cases} x+y=2,\text{or} \\ x+y=5 \end{cases} $$

You miss the second equation and consequently, another solution to the original equation system.

iBug
  • 399
3

Equality is much stronger than congruence. If you find a solution and you are able to state that $x=x_o$ and $y=y_o$ and they are in $\mathbb{Z}$, they will clearly satisfy a modular version of the original equation.

It is a coincidence that the solution is indeed in $\mathbb{Z}$ though. And it could be that there are other solutions if you consider the weaker modular version.

Kadmos
  • 1,907
  • 2
    +1 for being the only one to add the (obvious) remark that such a system might also have solutions in some $\Bbb Z_n$ but none in $\Bbb Z$ (e.g. $2x=1$ has a solution modulo every odd $n$ but $\frac12\notin\Bbb Z$). I wonder whether if a linear system with integer coefficients has a solution modulo every $n\ne0$ then it has a solution in $\Bbb Z.$ – Anne Bauval Jul 12 '23 at 13:23
  • 1
    What an interesting ideia, I have no idea how to approach the general case. Here is a very particular linear system: for $ax=b$ and $(a,b)=1$ your conjecture must be true. If $a=\pm 1$, there is a solution in $\mathbb{Z}$ (and for every modular version). Otherwise there is only a solution in $\mathbb{Q}\setminus \mathbb{Z} $. Suppouse there is a modular solution for every $\mathbb{N}$. If we take $n$ sufficiently large such that $|a|^n> a,b$ and let us consider things $\mod |a|^n$. As $(b,a)=1$, $(b,|a|^n)=1$ and then $a(zb^{-1})=1$. $a$ is invertible, which is absurd as $(a,|a|^n)=|a|>1$. – Kadmos Jul 13 '23 at 13:23
  • 1
    If an IMO world-class mathematician wonders about how to do it, I - a mere mortal- certainly won't be able to solve it. But when you do solve it, I would very much like to see it. :) Thanks for sharing this problem. – Kadmos Jul 13 '23 at 13:28
2

Let ${\Bbb Z}_6 := \left( \{0, 1, \dots, 5 \}, +, \cdot \right)$ be a finite ring. Consider the following system of linear equations over ${\Bbb Z}_6$.

$$ \begin{aligned} 2x + 2y &= 4 \\ 3x + 4y &= 3 \end{aligned} $$

Adding the 2nd equation to the 1st one,

$$ \begin{aligned} 5x + 0y &= 1 \\ 3x + 4y &= 3 \end{aligned} $$

because $2 + 4 = 0$ and $4 + 3 = 1$. Multiplying the 1st equation by $3$ and adding it to the 2nd one,

$$ \begin{aligned} 5x + 0y &= 1 \\ 0x + 4y &= 0 \end{aligned} $$

because $3 \cdot 5 = 3$ and $3 + 3 = 0$. Consulting the multiplication table for ${\Bbb Z}_6$, because $5 \cdot 5 = 1$ and $4 \cdot 0 = 4 \cdot 3 = 0$, we obtain $\color{blue}{x = 5}$ and $\color{blue}{y \in \{0,3\}}$.


Matrices

Working with augmented and elementary matrices instead, we obtain the following quasi-RREF

$$ \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 2 & 4 \\ 3 & 4 & 3 \end{bmatrix} = \begin{bmatrix} 5 & 0 & 1 \\ 0 & 4 & 0\end{bmatrix} $$

Note that all entries of these matrices are in the finite ring ${\Bbb Z}_6$. No $\frac12$ to be found.


Tables

The addition and multiplication tables for ${\Bbb Z}_6$ are as follows.

$$ \begin{array}{c|cccccc} + & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline 0 & 0 & 1 & 2 & 3 & 4 & 5 \\ 1 & 1 & 2 & 3 & 4 & 5 & 0 \\ 2 & 2 & 3 & 4 & 5 & 0 & 1 \\ 3 & 3 & 4 & 5 & 0 & 1 & 2 \\ 4 & 4 & 5 & 0 & 1 & 2 & 3 \\ 5 & 5 & 0 & 1 & 2 & 3 & 4 \end{array} \qquad \begin{array}{c|cccccc} \cdot & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 1 & 0 & 1 & 2 & 3 & 4 & 5 \\ 2 & 0 & 2 & 4 & 0 & 2 & 4 \\ 3 & 0 & 3 & 0 & 3 & 0 & 3 \\ 4 & 0 & 4 & 2 & 0 & 4 & 2 \\ 5 & 0 & 5 & 4 & 3 & 2 & 1\end{array} $$

Alternatively, $\TeX$ code can be found here.