[Math] Notations: use of parentheses with “mod” and the “|” symbol

notation

I'm working through a practice test with no available solutions, and I came across this question.

Let $a,b,c,d,e$ be integers with $c>0$. Suppose that $a\equiv b\pmod c$, and that $d\equiv e\pmod c$. Determine whether each of the following statements are True or False.

i) $c\mid(a-b)$

ii) $c\mid(d-e)$

iii) $a+b\equiv d+e \pmod c$

My first question is this: why the parentheses around the modulo? Is there a meaningful difference between $a\mod b$ and $a \pmod b$? I assume not, but the latter kind of makes it look like "mod" is a unary operator.

Second, how do I interpret the use of "|"? I naturally thought of it as a logical "or", and evaluated the expressions like the C compiler might. Since $c$ is always greater than $0$, both the first two statements will always evaluate to "true".

In the third statement, each side of the equation is independent from the other, so there is no equivalency and it must evaluate to "false".

Am I anywhere close to the correct approach? The unfamiliar notation kind of threw me.


As several have guessed in the comments, it seems my confusion stemmed from the fact that I'm a programmer trying to brush up on his math skills, and not a student of number theory or modular arithmetic. Thanks to the comments and answers, I found this wikipedia article which also helped to clarify things.

Thanks guys!

Best Answer

The $|$ operator represents divisibility, not logical OR. $a \mid b$ is shorthand for $a$ divides $b$. As for your first question, $a$ mod $b$ represents the remainder when $a$ is divided by $b$ but $a_1 \equiv a_2 \pmod b$ the $\pmod b$ modifies the equivalence relation.

Related Question