4
$\begingroup$

Is there a difference between $i$ mod $p$, and $i$ (mod $p$)?

To give context, this is the original problem:

  • if $i \geq 0$ what is $i$ (mod $p$)?

edit: Forgot to add the parentheses to example

2 Answers 2

8

The "mod" symbol is used two ways. In one way it modifies the assertion that two quantities are equivalent:

$23\equiv1903\pmod {10}$

This means that 23 and 1903 are equivalent, mod 10. In general we say that $a\equiv b\pmod p$ if $a-b$ is a multiple of $p$.

Used the other way, it is used as a binary operator to represent the remainder after a division:

$\text{"The value of }1903\bmod 10 \text{ is } 3\text{"}$

And in general, if $a = pk+b$, with $0\le b < p$, then $a\bmod p$ is equal to $b$, the remainder when $a$ is divided by $p$. It should usually be a number at least 0 and strictly less than $p$.

The two notations are closely related: if $a\bmod p = b$, then $a\equiv b\pmod p$.

$\TeX$ and MathJax have separate notations for the two uses, because they are typeset a little differently. \bmod makes the "binary operator" version of "mod", and \pmod makes the "parentheses" version used for qualifying equivalences.

  • 0
    so is i mod p = i (mod p)?2012-10-13
0

Yes, but i mod p is an abbreviation of i (mod p). Mathematical culture worships rigor and exactitude. I was taught that i (mod p) is the preferred notation.

At some point in every long casual write up Ive seen, the (mod p) becomes implied and $a\equiv b$ or even $a = b$ seems to suffice for both author and audience.