# What is i (mod p)?

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

-

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.

-
Analogous notations are used for any equivalence relation, e.g. for fractions we might write $\rm\: 15/10 \equiv 3/2\pmod{\!Q},\:$ and $\rm\:15/10\bmod Q = 3/2\ \$ – Bill Dubuque Oct 12 '12 at 21:26
so is i mod p = i (mod p)? – James Oct 13 '12 at 22:52