difference in the definiton of modular arithmetic When i look at my textbook , i realized that there is a little difference in the definiton of modular artihmetic among books.
For example, wikipedia says that $a\equiv b\pmod n$ where $a,b \in Z,n \in Z^+$ and $n \gt1$ .
On the other hand, some books and websites says that $a\equiv b\pmod n$ where $a,b \in Z,n \in Z^+$ but there is not any restriction for $n$ ,i.e, $n$ can be $1$.
I know that it is not a big difference and does not affect results generally.However, i want to know the exact definiton of it.
Briefly, which definiton is correct ? If they are same , then why do books ignore $n=1$
The modulus $n=1$ is not interesting because $a \equiv b \bmod 1$ is always true.
I prefer the general definition that allows all $n \in \mathbb Z$ as modulus.
The only other singular modulus is $n=0$ because $a \equiv b \bmod 0$ iff $a=b$.
If $n&gt;1$ then the ring $\mathbb{Z}_n$ is a &quot;ring with unity&quot; which means that it has a multiplicative identity distinct from the additive identity.   That is not the case if $n=1$.  I can't think of an example off the top of my head, but there must be some theorems about rings with unity that need the fact that $0 \neq 1$.  So you allow $n=1$, then every time to need to invoke some properties of a ring with unity, then you have to say &quot;$n&gt;1$&quot;.
So it might make sense to just specify $n&gt;1$ at the outset and thereby exclude the &quot;bo-ring.&quot;