-1

Given values:

$$x \equiv a \bmod c$$ $$y \equiv b \bmod c $$

Can you write a formula for $(a-b) \bmod c$ with respect to $x$ and $y$?

2 Answers2

1

From the original system: $$\begin{cases}x\equiv a \pmod c\\ y\equiv b\pmod c\end{cases}$$

You subtract the second from the first and you get: $$(x-y)\equiv (a-b)\pmod c$$

Here you can find some information about operations in congruences.

  • Don't know that that's obvious to the OP, otherwise they wouldn't have had to ask the question to begin with. Maybe you should elaborate some more on what manipulations are valid for congruences, for example why subtracting is OK but dividing is not. – dxiv Dec 15 '17 at 06:25
  • When you divide there might be some problem. In fact you cannot divide by a number that is multiple of $c$ because, in congruences, is the same as dividing by $0$. –  Dec 15 '17 at 06:37
  • That's one example of why you need to back up assertions like subtract the second from the first and you get .... – dxiv Dec 15 '17 at 06:42
  • The link you edited in now covers the point of my first comment. – dxiv Dec 15 '17 at 07:12
  • OK, Thanks @dvix –  Dec 15 '17 at 07:17
1

We know that

$$x=kc+a$$

$$y=hc+b$$

thus

$$a-b=x-y+jc\implies a-b\equiv x-y \pmod c$$

user
  • 154,566