1

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$

Bill Dubuque
  • 272,048
  • Why are you writing $Z^+$? Also it would be helpful if you gave links and/or references: it is not useful to ask us to comment on statements from unidentified sources. – Rob Arthan Dec 16 '20 at 16:14

4 Answers4

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$.

lhf
  • 216,483
  • you used $Z$ , then does it mean that n can be negative integer –  Dec 16 '20 at 16:23
  • @davidkenneth, yes, sure. But $a \equiv b \bmod n$ iff $a \equiv b \bmod -n$, so that does not give anything new – lhf Dec 16 '20 at 16:25
  • sir , i am very confused, when i look at all of my textbooks such as discerete math and app. by kenneth rosen or wikipedia , i always saw that n must be positive integer. –  Dec 16 '20 at 16:28
  • oh , i did not see your edit, i am sorry..By the way , i understood what you meant but doesn^t it deviate from terminology –  Dec 16 '20 at 16:31
1

The modulus can be any integer - no restrictions are needed. The definition of congruence is

$\quad{\rm for}\,\ a,b,n\in\Bbb Z\!: \ a\equiv b\pmod{\!n}\!$ $\overset{\rm def\!}\iff n\mid a-b\!\!\overset{\rm def\!\!}\iff a- b = kn,\ \text{for some } k\in\Bbb Z$

So both congruence and divisibility are defined for all $\:\!n\,$ (note $\:\!0\mid c\!\iff\! c\! =\! 0,\,$ cf. Note below).

Such generality can prove useful, e.g. a fundamental number theory reduction technique relies on the property that congruences persist mod divisors of the modulus, so we can attempt to deduce solutions of congruences $\!\bmod n\,$ by combining solutions mod smaller (so simpler) divisors of $\,n\,$ (e.g. by CRT). With the general definition this reduction method also applies the same way to the modulus $\,n = 0,\,$ where $\,a\equiv b\pmod{\!0}\iff 0\mid a-b\iff a = b,\,$ so congruence $\!\bmod 0\,$ is just integer equality, i.e. $\,\Bbb Z_0 \cong \Bbb Z.\,$ So for modulus $\,n=0\,$ the above reduction method says that integer equalities persist as congruences $\!\bmod m\,$ for every integer $\,m\,$ (by $m$ divides $0),\,$ so we can study integer equations by studying their simpler solutions $\!\bmod m$.

We can use such reductions to help study solutions of integer (Diophantine) equations, one of the most fundamental problem solving methods in number theory (and algebra). For example for any even modulus $\,n\,$ a congruence (or equation) $\!\bmod n\,$ persists as a congruence $\!\bmod 2,\,$ where simple parity arithmetic may prove there are no solutions, e.g. see the Parity Root Test. Such parity analysis works for any even modulus, including $\,n=0.\,$ It is unnatural to separate out the modulus $\,n = 0\,$ from other even moduli. The reduction applies uniformly to all even moduli.

Note $ $ There is no division in $\,0\mid x\!\iff\! c\!=\!0,\,$ so $\,0\mid 0.\,$ Here $\,k\mid n\!\!\!\overset{\rm def\!\!\!}\iff\! n = jk,\,$ some $\,j\in\Bbb Z.\,$ In particular $\,0\mid n\!\!\!\overset{\rm def\!\!\!}\iff\! n = j\cdot 0 = 0\,$ for some $\,j\in\Bbb Z\!\iff\! n = 0.\,$ Confusing divisibility with division is very common. Thwarting such confusion is one of the reasons some authors exclude divisibility by $\:\!0\:\!$ in their definition of divisibility (so also in moduli). Such confusion spreads further to congruences if we define $\,a\equiv b\pmod{\!n}\,$ as $\,a\bmod n = b\bmod n,\,$ i.e. $\,a\,$ and $\,b\,$ leave the same remainder when divided by $\,n.$ While this is equivalent to the above definition for $\,n\!\neq\! 0,\,$ it does not generalize to other rings (as the above definition does). See here for much more discussion on $\!\bmod\!$ the congruence relation vs. the (normal-form) remainder operation.

Bill Dubuque
  • 272,048
  • i realized that $a=b+nk$ is valid when $n=0$ but, i could not understand that how you divide integers by $0$ –  Dec 16 '20 at 16:42
  • @davidkenneth There is no "division". Here $,k\mid n!!\overset{\rm def!!!}\iff n = jk,$ for some $,j\in\Bbb Z.,$ In particular $,0\mid n!!\overset{\rm def!!!}\iff n = j\cdot 0 = 0,$ for some $,j\in\Bbb Z\in\Bbb Z\iff n = 0.,$ Confusing divisibility with division is very common. Thwarting such confusion is one of the reasons some authors exclude divisibility by $,0,$ in their definition of divisibility (so also in moduli). – Bill Dubuque Dec 16 '20 at 16:50
  • @david Likely this confusion stems from viewing $,a\equiv b\pmod{n},$ as saying that $,a,$ and $,b,$ leave the same remainder when divided by $,n.,$ While this is equivalent to the above definition for $,n\neq 0,,$ it is not the definition of congruence, and it does not generalize to other rings (the standard definition in my answer does). See here for more discussion on mod as a congruence vs. a (normal-form) operation – Bill Dubuque Dec 16 '20 at 17:02
0

The biggest difference is that if we use the standard definition and apply it to $\pmod 1$ the result is utterly trivial.

$\pmod 1$ we have $a \equiv 0 \pmod 1$ and $a \equiv b\pmod 1$ for any possible integers.

(Think about it. $a \equiv b \pmod 1 \iff 1|a-b \iff \exists k\in \mathbb Z: a= b+k\cdot 1$ (or in other words $k=a-b$) $\iff a$ and $b$ will both have the same remainder when divided by $1$.)

[ And as the only residue class of $k \in \mathbb Z$ and $0 \le k < n = 1$ is ... $k=0$, $\pmod 1$ arithmetic is an arithmetic with exactly one element so that $[0]+[0] \equiv [0]\pmod 1$ and $[0]\cdot [0]\equiv 0\pmod 1$ and $[0]^k \equiv [0]\equiv 1 \pmod 1$. You can't get much more boring than that!]

So ... it's pointless to consider $\pmod 1$.

.........

However, i want to know the exact definiton of it. Briefly, which definiton is correct ?

You think mathematicians can ever agree on definitions (or anything) and there are always correct definitions of everything (or even anything)?

Well, bless your heart!

....

(To explain my last somewhat facetious comment: One thing I've found all mathematician have is a love to quibble over precision and semantics and picayune details and, with only one exception, disagree on everything. That sounds frustrating and futile but 1) we enjoy it and 2) the one thing we all agree on is if we are logically precise and consistent arbitrary choices and definitions won't actually matter.)

(In other words: the is no "correct" definition. IMO, I'd allow $\pmod 1$ because... well, although it's pointless and trivial,t it is consistent and follows the definitions precisely. I suspect its only necessary to exclude $n=1$ when considering certain result of abstract ring theory or algebra but examples and details elude me. I suspect the reason some texts exclude it is they want to avoid having to make a detour and confusing beginners about something that won't really matter. Image if the very first time I introduce modular arithmetic I immediately took a detour to explain my third paragraph above...)

fleablood
  • 124,253
  • $!\bmod 1,$ can be useful, e.g. the denominator of a fraction is its order $!\bmod 1,,$ i.e. in $,\Bbb Q/\Bbb Z = \Bbb Q\bmod \Bbb Z,,$ and this allows us to view some results about denominators as special cases of general results about order (ideals). I highlight this in many of my posts, e.g. see here and here for very simple examples. – Bill Dubuque Dec 16 '20 at 17:14
-1

If $n>1$ then the ring $\mathbb{Z}_n$ is a "ring with unity" 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 "$n>1$".

So it might make sense to just specify $n>1$ at the outset and thereby exclude the "bo-ring."