-1

Why is it that $a\equiv b \pmod m \iff m\mid(a-b)$? I know this is a definition, but it's a definition I don't understand. I know that if $m\mid(a-b)$ then there exists some $q\in\mathbb Z$ such that $mq=a-b$.

But when I take $a\equiv b \bmod m$ I obtain $b=mq+a$, solving for $mq$ I get $mq=b-a$ instead of $mq=a-b$.

Am I getting something wrong about what $a\equiv b\pmod m$ means? My understanding says $b$ is a dividend, $m$ is a divisor, and $a$ is a remainder. The devision algorithm says dividend${}=(\text{divisor}\times\text{quotient})+\text{remainder},$ so that's how I get $b=mq+a$.

Lex_i
  • 2,072
  • 10
  • 26
  • What is $q$? $~~$ –  Nov 21 '20 at 00:03
  • 1
    In general, if $m\mid x$ then $m\mid -x$ as well. – David K Nov 21 '20 at 00:04
  • I've always viewed q as a quotient – Lex_i Nov 21 '20 at 00:05
  • 1
    Sometimes you will see a binary "mod" operator, $x \bmod y,$ which means the remainder after $x$ is divided by $y.$ But when you see $\pmod m$ in parentheses, usually the person writing it was not thinking of the binary operator. Usually $a\equiv b\pmod m$ and $b\equiv a\pmod m$ are meant to be equivalent and interchangeable, just like $x=y$ and $y=x$. – David K Nov 21 '20 at 00:15
  • You may note that $a\equiv b\ (\mathrm{mod}\ n)$ and $b\equiv a\ (\mathrm{mod}\ n)$ are the same thing. – ultralegend5385 Nov 23 '20 at 17:03
  • What do you think about this: $6\equiv10\ (\mathrm{mod}\ 4)$, Is it true? – ultralegend5385 Nov 23 '20 at 17:04

1 Answers1

3

Actually, $a\equiv b\pmod m$ doesn't mean that $b$ is a dividend, $m$ is a divisor, and $a$ is a remainder. It means the the divisions of $a$ and $b$ by $m$ have the same remainders.

And if $q$ is such that $mq=a-b$, then $m\times(-q)=b-a$.

  • 2
    (@Lex_i Beware that the above answer is conceptually incorrect. The definition of congruence does not "mean" anything about rermainders (though it does have an equivalent forumulation in terms of remainders in any ring which has a division algorithm). See here for more on the relationshup between congruence relations and normal form operations – Bill Dubuque Nov 22 '20 at 00:13