2
$\begingroup$

It seems to me that a = x (mod m) can mean either that a is the remainder of x divided by m or that the remainders of a and x are the same when divided by m (eg. with respect to mod m). For example: 2 = 6 (mod 4) would be the first meaning I discussed, but 6 = 2 (mod 4) would be the second. It seems that I must be confusing some aspect of modular arithmetic here. Thanks for the assistance.

  • 0
    I have$a$second related question that perhaps some of you could answer if you wouldn't mind. Would greatly appreciate it. http://math.stackexchange.com/questions/16164/is-there-a-theorem-based-on-substitution-to-convert-a-congruency-to-an-equality2011-01-02

3 Answers 3

8

No; $a\equiv b \pmod{m}$ means that $a$ and $b$ are congruent modulo $m$: by definition, the meaning is that $m$ divides $a-b$. As it happens, this is equivalent to saying that $a$ and $b$ have the same remainder when divided by $m$.

However, there is also a related notation, in which "mod" acts as a binary operator: in computer science especially, one often finds expressions like "$a \bmod m$"; in this case, this is interpreted as an operation on $a$ and $m$ that results in the remainder when $a$ is divided by $m$ (usually the one among $0$, $1,\ldots,m-1$, but in some instances instead the ones with smallest absolute value, allowing negative remainder).

But these two are related-but-different. In $a\equiv b\pmod{m}$, what we have is a binary relation between $a$ and $b$, called "congruence modulo $m$", and written $\equiv\pmod{m}$. In $a\bmod m$, what we have is a binary operation (noncommutative) on $a$ and $m$.

  • 0
    ok thanks very much for the tips!2011-01-02
1

I think you are mixing notation here; perhaps using some superfluous parentheses may help:

$a=(x\pmod m)$ has the first meaning you said: $a$ is the remainder of dividing $x$ into $m$; while $(a=x)\pmod m$ would have the second meaning: $a$ and $x$ have the same remainder when divided by $m$.

To avoid confusion, it is customary to write the second expression as $a\equiv x\pmod m$. This way, if you see $=$ you know you are using the first meaning, if you see $\equiv$, it is the second.

(Of course, every now and then, books mix the two notations, hopefully in contexts where which one is intended is clear.)

  • 0
    @Arturo: Thanks $f$or the LaTeX tip; I find that my formattin$g$ gets worse with age! (And I think it is too bad such similar notations are used $f$or subtly different notions, which may confuse people unnecessarily when first learnin$g$ the concepts.)2011-01-02
0

$a = (x~ \mathrm{mod} ~m)$ means $a$ is the remainder when $x$ is divided by $m$.
$a \equiv x~ (\mathrm{mod} ~m)$ means $a$ and $x$ have the same remainder when divided by $m$.