What does $ a \pmod b$ mean? I am having little trouble in what a$mod$b means.
I under stand that if $a\equiv b\pmod n$, then n divides (a-b). But I do not understand what does it mean by $b\pmod n$. One the thing I can think of is the equivalence class of $b$. So I want to reduce $b$ to the positive lowest value in the class.
Can someone help me in lighten up the matter for me please!
Thanks!
 A: The integers form a ring under usual addition and multiplication with $n\Bbb{Z}$ the only ideals, for any $n \in \Bbb{Z}$.  The integers modulo $n$, $\Bbb{Z}_n$ is a ring isomorphic to the quotient group $\Bbb{Z}/n\Bbb{Z}$.  The quotient ring is the set of all equivalence classes $k + n\Bbb{Z},\ k \in \Bbb{Z}$.  There are only $n$ equivalence classes.  Since $\Bbb{Z}/n\Bbb{Z}$ is a ring you can work with equivalence classes like ring elements.  So $a + n\Bbb{Z} = b + n\Bbb{Z} \iff (a - b) + n\Bbb{Z} = n\Bbb{Z} = 0$ (notice that the equiv. class $0 + n\Bbb{Z}$ is the additive identity ($0$) for the quotient ring.  Also notice that $c + n \Bbb{Z} = 0 \iff c \in n\Bbb{Z}$, thus $(a-b) + n\Bbb{Z} = 0$ iff $(a-b) \in n\Bbb{Z}$ iff $n$ divides $a-b$, and there's your original definition.
Firstly, use "b \pmod{m}" in $\LaTeX$.  Then $b \pmod m$ means usually to take the remainder when dividing by $m$, and interchangeably the resulting congruence class.  So if $b = 0$, then $b \pmod m = 0 = 0 + m \Bbb{Z}$, if $b > 0$, $b \pmod m = \text{remainder}(b/m) = b + m \Bbb{Z}$.  The remainder is, you said it, the smallest positive integer in the congruence class, and is a representative of the class meaning, given remainder $b'$, all you need to do to find the other elements of the class is look at $b' + m \Bbb{Z}$.  If $b < 0$, for instance $-5$, then $-5 \pmod 3 = 1$, by convention, as $-5 = -1(3) + (-2)$ and $-2 \in \Bbb{Z}_3$ is $1$.  Or look at the remainder through the definition of the division algorithm, then the remainder is always positive.  In conclusion, $b \pmod m$ interchangeably means the smallest positive integer in the congruence class of $b$ in the integers under modulo $m$ arithmetic, the remainder when doing the standard division algorithm, or the congruence class itself.  Which interpretation to pick or when they are interchangeable will be clear from the context.  Unless the context is badly written, then switch material.
