34

So, I've seen two definitions of divisibility, and I've seen both used on MSE:

Definition 1- We say $a \mid b \iff \frac{b}{a} \in \mathbb{Z}$

Definition 2- We say $a \mid b \iff \exists c \in \mathbb{Z} : b = ac$

Which of these is more widely used?

The difference is that $0 \mid 0$ according to the second definition but not the first.

Mars Plastic
  • 4,407
  • 19
    IMO opinion we really should allow for the fact that "$0$ is a divisor of $0$" so we should use the second. And I think the second is much more common. But... ya know, math is contextual and we can from course to course define anything any way we want so long as we are consistent, are clear about our consequences, and enter with our eyes wide open. (Although I prefer 2, the first is probably less abstract to elementary student...."How do I know if there's such an integer?" "Well, you'd just divide it and see" "But how do I know?" "Look, just do it. If you get an integer, you are done". – fleablood Dec 10 '24 at 17:11
  • $a \mid b \Longleftrightarrow \exists k \in \mathbb{Z} . k a = b$. – user76284 Jan 07 '25 at 07:19

3 Answers3

64

The most general definition is:

We will say that $a$ divides $b$ if there is $c$ such that $b=ac$.

Here $a,b,c$ are assumed to belong to the same "structure". I deliberately omitted the "$\mathbb{Z}$" symbol, because that definition easily extends to more general structures, for example (commutative) rings. And indeed: everything divides zero (in a general sense), while zero divides only itself. This matches facts about ideals in rings: every ideal contains zero ideal, while zero ideal contains only itself. Ideals and division are closely related.

Your first definition of course excludes "$0|0$" case, because $0$ is not invertible in any (non-trivial) ring. Moreover the "$\frac{b}{a}$" symbol needs to be defined. For integers it is easy: you take a fraction in the ring of rationals $\mathbb{Q}$. We can do similar construction in every integral domain:

If $R$ is an integral domain and $a,b\in R$ then we will say that $a|b$ if $\frac{b}{a}\in R$, where $\frac{b}{a}$ is taken in the field of fractions of $R$.

And then these two definitions become equivalent, except for $a=0$ case. But only over integral domains. Definition 2 however applies to a wider range of rings. And thus is more widely used.

Over rings that are not integral domains, first definition doesn't even make sense. What does it mean to take fraction $\frac{b}{a}$? Those rings cannot be embedded into any field, and therefore taking a fraction is meaningless. Moreover if $a$ is a zero divisor (in a more narrow sense, i.e. $0=ac$ for some non-zero $c$), then $a$ is not invertible in any ring containing $R$ (in fact these two properties are equivalent). While being a "zero divisor" itself already says that we need a different form of division applicable here. Namely: the second definition.

freakish
  • 47,446
  • 7
    Great answer. To define divisibility in terms of a rational number being an integer puts the cart before the horse. – Matthew Leingang Dec 11 '24 at 17:35
  • "Here a,b,c are assumed to belong to the same "structure"" Except I don't that we do assume that. I think it is correct to say $3\frac 12$ and $2\frac 13$ divide $7$ but $4\frac 15$ does not. Or that $\sqrt 3$ divides $\sqrt{12}$. – fleablood Dec 13 '24 at 16:45
  • @fleablood that depends on the structure, on a ring. All those divide each other if treated as real numbers. More generally, in a field every non-zero element divides every other. It might not be true in some other ring, but you need to specify it first. For example $2$ does not divide $5$ in $\mathbb{Z}$ but it does in $\mathbb{Q}$. – freakish Dec 13 '24 at 17:57
  • In particular $4\frac{1}{5}$ does divide $7$ in rationals: $7=4\frac{1}{5}\cdot \frac{5\cdot 7}{21}$. And $\sqrt{3}$ does divide $\sqrt{12}$ as reals, by the same principle. I assume that you wanted to talk about being an "integer multiple". Yes, we do consider this as well. But I wouldn't call it "divides" then. Especially since the analogy with ideals breaks (integer multiples would correspond to additive subgroups, which are less interesting). Anyway it is a linguistic problem now. – freakish Dec 13 '24 at 18:35
  • Agree with all that. Much depends on context. There are contexst where we define "a divides b" if "b is a mulitple of a" and we define "multiple" as there is a natural number $n$ where $n\text{a}=\text{b}$ (and $n\text{a}$ is probably defined something like $\underbrace{\text{a}+...+\text{a}}_{n\text{ times}}$. ... but then there are times we don't. – fleablood Dec 13 '24 at 18:38
  • "I assume that you wanted to talk about being an "integer multiple". Yes, we do consider this as well. But I wouldn't call it "divides" then" Hmm, I would. But but only when dealing with real numbers and with a purpose such as "The diference between the two is an even multiple of $\pi$". The actual definition is contextual. "Anyway it is a linguistic problem now." Very much agree. – fleablood Dec 13 '24 at 18:41
11

Generally in a commutative ring (or monoid) $R,$ by definition $\,a\mid b\,$ if $\,ax=b\,$ has a solution in $R$, unique $ $ iff $\,a\,$ is not a zero divisor, $ $ so then $\:a\mid b\iff b/a\in R\:$ in $\: Q(R)=$ total fraction ring. In the noncommutative case this bifurcates into left vs. right divisibility $\,ax = b\,$ vs. $\,xa = b$.

Remark $ $ In some contexts it is convenient to consider multi-valued fractions to handle the case when $\,ax=b\,$ has more than one root, e.g. here I show how they provide a very convenient fractional notation for the Extended Euclidean Algorithm for the gcd (here $\,\frac{0}{0} = R\,$ is useful)

Bill Dubuque
  • 282,220
5

In addition to freakish’s answer, one might note that in a noncommutative ring (such as the Hurwitz integers $H$, the ring of quaternions with either all integer or all half-integer components), there are the distinct notions of left and right divisibility. For example, for $h,n \in H$, we say $d$ right divides $h$ if $h = ad$ for some $a \in H$, which I like to write $d \mid_{\rightarrow} h$ (I’m not sure if any standard notation exists). Left divisibility is defined similarly.