1.1.1. Divisibility

This section is based on [BUR11, Sec. 2.2, Sec. 2.3].

We begin with a basic but fundamental definition.

Definition 1.1.1.1.

Let nn and dd be integers. We say that dd divides nn if there exists an integer kk such that n=k⁢d{n=kd}. In this case, we also say that nn is a multiple of dd and that dd is a divisor of nn.

Notation 1.1.1.2.

Let nn and dd be integers. If dd divides nn, we write d∣n{d\mid n}; otherwise, we write d∤n{d\nmid n}. In symbols,

d∣n⟺∃k∈ℤ:n=k⁢d.d\mid n\quad\Longleftrightarrow\quad\exists k\in\mathbb{Z}:n=kd.
Remark 1.1.1.3.

If d≠0{d\neq 0} and nn are integers, then dd divides nn if and only if the rational number nd\tfrac{n}{d} is an integer.

Warning 1.1.1.4.

Let nn be an integer. The expression n0\tfrac{n}{0} is undefined (even if n=0{n=0}). In contrast, the notation 0∣n{0\mid n} is a shorthand for the following statement:

There exists k∈ℤk\in\mathbb{Z} such that n=k⋅0n=k\cdot 0,

which holds if and only if n=0{n=0} (Proposition 1.1.1.6(4)). Unlike Definition 1.1.1.1, the definition of divisibility in [BUR11, Def. 2.1] requires the divisor to be non-zero.

Example 1.1.1.5.

We have 3∣15{3\mid 15} since 15=5⋅3{15=5\cdot 3}. Similarly, −5∣15{-5\mid 15} since

15=(−3)⋅(−5).15=(-3)\cdot(-5).

More generally, the divisors of 1515 are the integers

±1,±3,±5,±15.\pm 1,\pm 3,\pm 5,\pm 15.

The divisibility relation on the set of integers has the following properties.

Proposition 1.1.1.6.

Let a,b,c,d∈ℤ{a,b,c,d\in\mathbb{Z}}. The following statements hold:

  1. (1)
    ​

    1∣a{1\mid a}.

  2. (2)
    ​

    a∣0{a\mid 0}.

  3. (3)
    ​

    a∣a{a\mid a}.

  4. (4)
    ​

    0∣a{0\mid a} if and only if a=0{a=0}.

  5. (5)
    ​

    a∣1{a\mid 1} if and only if a=1{a=1} or a=−1{a=-1}.

  6. (6)
    ​

    a∣b{a\mid b} if and only if −a∣b{-a\mid b}.

  7. (7)
    ​

    a∣b{a\mid b} if and only if a∣−b{a\mid-b}.

  8. (8)
    ​

    a∣b{a\mid b} and b∣a{b\mid a} if and only if b=a{b=a} or b=−a{b=-a}.

  9. (9)
    ​

    If a∣b{a\mid b} and b∣c{b\mid c}, then a∣c{a\mid c}.

  10. (10)
    ​

    If a∣b{a\mid b} and c∣d{c\mid d}, then a⁢c∣b⁢d{ac\mid bd}.

  11. (11)
    ​

    If a∣b{a\mid b} and a∣c{a\mid c}, then a∣(b⁢x+c⁢y){a\mid(bx+cy)} for all x,y∈ℤ{x,y\in\mathbb{Z}}.

Proof.

We provide a proof of all statements for the sake of completeness.

(1) a=a⋅1{a=a\cdot 1}.

(2) 0=0⋅a{0=0\cdot a}.

(3) a=1⋅a{a=1\cdot a}.

(4) If a=k⋅0{a=k\cdot 0} with k∈ℤk\in\mathbb{Z}, then a=0{a=0}. Conversely, 0=1⋅0{0=1\cdot 0}.

(5) If k∈ℤ{k\in\mathbb{Z}} and 1=k⁢a{1=ka}, then 1=|k⁢a|=|k|⁢|a|{1=|ka|=|k||a|}. In particular, |a|=1{|a|=1} so that a=1{a=1} or a=−1{a=-1}. Conversely, 1=1⋅1=(−1)⁢(−1){1=1\cdot 1=(-1)(-1)}.

(6) Let k∈ℤ{k\in\mathbb{Z}}. Then b=k⁢a{b=ka} if and only if b=(−k)⁢(−a){b=(-k)(-a)}.

(7) Let k∈ℤ{k\in\mathbb{Z}}. Then b=k⁢a{b=ka} if and only if −b=(−k)⁢a{-b=(-k)a}.

(8) Let k,ℓ∈ℤ{k,\ell\in\mathbb{Z}} be such that b=k⁢a{b=ka} and a=ℓ⁢b{a=\ell b}. We distinguish two cases:

  • •
    ​

    If a≠0{a\neq 0}, then a=ℓ⁢b=ℓ⁢(k⁢a){a=\ell b=\ell(ka)} implies 1=ℓ⁢k{1=\ell k}. By (5), k=1{k=1} or k=−1{k=-1}. Using that b=k⁢a{b=ka}, it follows that b=a{b=a} or b=−a{b=-a}.

  • •
    ​

    If a=0{a=0}, then b=k⁢a=0{b=ka=0}. The conclusion holds trivially in this case.

For the converse, the case b=a{b=a} is clear, and for b=−a{b=-a} we observe that

a=(−1)⁢(−a)=(−1)⁢bandb=−a=(−1)⁢a.a=(-1)(-a)=(-1)b\qquad\text{and}\qquad b=-a=(-1)a.

Alternatively, use statements (6) and (7).

(9) Let k,ℓ∈ℤ{k,\ell\in\mathbb{Z}} be such that b=k⁢a{b=ka} and c=ℓ⁢b{c=\ell b}. Then

c=ℓ⁢b=ℓ⁢(k⁢a)=(ℓ⁢k)⁢a.c=\ell b=\ell(ka)=(\ell k)a.

(10) Let k,ℓ∈ℤ{k,\ell\in\mathbb{Z}} be such that b=k⁢a{b=ka} and d=ℓ⁢c{d=\ell c}. Then

b⁢d=(k⁢a)⁢(ℓ⁢c)=(k⁢ℓ)⁢(a⁢c).bd=(ka)(\ell c)=(k\ell)(ac).

(11) Let k,ℓ∈ℤ{k,\ell\in\mathbb{Z}} be such that b=k⁢a{b=ka} and c=ℓ⁢a{c=\ell a}. Then

b⁢x+c⁢y=(k⁢a)⁢x+(ℓ⁢a)⁢y=(k⁢x+ℓ⁢y)⁢a.∎bx+cy=(ka)x+(\ell a)y=(kx+\ell y)a.\qed
Remark 1.1.1.7.

Let a,b∈ℤ{a,b\in\mathbb{Z}}. Statements (6) and (7) in Proposition 1.1.1.6 say that the validity of the statement a∣b{a\mid b} is preserved when changing the sign of either aa or bb. In particular, aa divides bb if and only if |a||a| divides |b||b|.

The following theorem formalises the familiar procedure of division with remainder.

Theorem 1.1.1.8 (Division with remainder).

Let a,b∈ℤ{a,b\in\mathbb{Z}} with b≠0{b\neq 0}. Then there exist unique q,r∈ℤ{q,r\in\mathbb{Z}} such that

a=q⁢b+r,0≤r<|b|.a=qb+r,\qquad 0\leq r<|b|.
Proof.

We first treat the case b>0{b>0}, so that |b|=b{|b|=b}.

Existence of qq and rr. Consider the set

S≔{s∈ℤ:s≥0⁢ and ⁢∃k∈ℤ,a=k⁢b+s}⊆ℕ.S\coloneqq\{s\in\mathbb{Z}\colon{s\geq 0\text{ and }\exists k\in\mathbb{Z},\ a% =kb+s}\}\subseteq\mathbb{N}.

We claim that S≠∅︀{S\neq\emptyset}. Indeed, for k∈ℤ{k\in\mathbb{Z}},

a−k⁢b≥0⟺a≥k⁢b⟺b>0ab≥ka-kb\geq 0\quad\Longleftrightarrow\quad a\geq kb\qquad\stackrel{{\scriptstyle b% >0}}{{\Longleftrightarrow}}\quad\tfrac{a}{b}\geq k

and

{k∈ℤ:ab≥k}≠∅︀.\{k\in\mathbb{Z}\colon{\tfrac{a}{b}\geq k}\}\neq\emptyset.

Let r∈S{r\in S} be its smallest element. By definition of the set SS, the inequality 0≤r{0\leq r} holds and there exists q∈ℤ{q\in\mathbb{Z}} such that a=q⁢b+r{a=qb+r}. We claim that r<b{r<b}. Indeed, if r≥b{r\geq b}, then r−b≥0{r-b\geq 0} and

a=q⁢b+r=q⁢b+r+(b−b⏟=0)=(q+1⏟∈ℤ)⁢b+(r−b⏟≥0).a=qb+r=qb+r+(\underbrace{b-b}_{=0})=(\underbrace{q+1}_{\in\mathbb{Z}})b+(% \underbrace{r-b}_{\geq 0}).

Thus, r−b∈S{r-b\in S}. Since b>0{b>0}, we have r−b<r{r-b<r}, in contradiction to the minimality of rr. This finishes the proof of the existence of integers qq and rr with the required properties.

Uniqueness of qq and rr. Let q,q′,r,r′∈ℤ{q,q^{\prime},r,r^{\prime}\in\mathbb{Z}} be such that

a=q⁢b+r=q′⁢b+r′,0≤r,r′<|b|.a=qb+r=q^{\prime}b+r^{\prime},\qquad 0\leq r,r^{\prime}<|b|.

Then

0=a−a=(q⁢b+r)−(q′⁢b+r′)=(q−q′)⁢b+(r−r′).0=a-a=(qb+r)-(q^{\prime}b+r^{\prime})=(q-q^{\prime})b+(r-r^{\prime}).

Equivalently,

(q−q′)⁢b=r′−r.{(q-q^{\prime})b=r^{\prime}-r}.

Thus, it is enough to show that q=q′{q=q^{\prime}}, since this implies r=r′{r=r^{\prime}} by the previous equality. Moreover, 0≤r,r′<b{0\leq r,r^{\prime}<b} implies |r−r′|<b{|r-r^{\prime}|<b}. Since b>0{b>0}, it follows that

0≤|q−q′|⁢b=|q−q′|⁢|b|=|r−r′|<b0\leq|q-q^{\prime}|b=|q-q^{\prime}||b|=|r-r^{\prime}|<b

and, dividing by b>0{b>0},

0≤|q−q′|<1.0\leq|q-q^{\prime}|<1.

Since q−q′∈ℤ{q-q^{\prime}\in\mathbb{Z}}, we must have q−q′=0{q-q^{\prime}=0} or, equivalently, q=q′{q=q^{\prime}}. This finishes the proof of the uniqueness of qq and rr.

We now consider the case b<0{b<0}. Applying what we just proved to aa and −b>0{-b>0}, there exist unique integers q,rq,r such that

a=q⁢(−b)+r=(−q)⁢b+r,0≤r<|−b|=|b|.a=q(-b)+r=(-q)b+r,\qquad 0\leq r<|-b|=|b|.

The uniqueness of −q{-q} and rr (for the pair aa, bb) follows directly from the uniqueness of qq and rr (for the pair aa, −b{-b}). ∎

Definition 1.1.1.9.

Let a,b∈ℤ{a,b\in\mathbb{Z}} with b≠0{b\neq 0}. Let q,r∈ℤ{q,r\in\mathbb{Z}} be the unique integers such that

a=q⁢b+r,0≤r<|b|,a=qb+r,\qquad 0\leq r<|b|,

see the Division with Remainder Theorem (Theorem 1.1.1.8). The integer qq is called the quotient of aa divided by bb and rr is called the remainder.

Remark 1.1.1.10.

Let a,b∈ℤ{a,b\in\mathbb{Z}} with b≠0{b\neq 0}. Then b∣a{b\mid a} if and only if dividing aa by bb has remainder r=0{r=0}; in this case, q=ab∈ℤ{q=\tfrac{a}{b}\in\mathbb{Z}} is the corresponding quotient.

Example 1.1.1.11.

Let b≠0{b\neq 0} be an integer. Then 0=0⋅b{0=0\cdot b}, so that q=0{q=0} is the quotient of dividing 0 by bb, and the remainder is r=0{r=0}.

Example 1.1.1.12.

Not covered in the lectureLet a=25{a=25} and b=11{b=11}. Then 25=2⋅11+3{25=2\cdot 11+3}, so that q=2{q=2} is the quotient of dividing 2525 by 1111 and the remainder is r=3{r=3}.

Example 1.1.1.13.

Not covered in the lectureLet a=25{a=25} and b=−11{b=-11}. Then 25=(−2)⋅(−11)+3{25=(-2)\cdot(-11)+3} so that q=−2{q=-2} is the quotient of dividing 2525 by −11{-11} and the remainder is r=3{r=3}. We also have 25=(−3)⋅(−11)−8{25=(-3)\cdot(-11)-8}, but s=−8{s=-8} satisfies −11<s≤0{-11<s\leq 0} instead.