Skip to content
Part IA Michaelmas, Lent Term

Divisibility and the Division Theorem

Divisibility

Definition

For integers aa and bb, we say aa divides bb, written a∣ba \mid b, if and only if there exists an integer kk such that b=akb = ak.

a∣b  ⟺  ∃k∈Z.b=aka \mid b \iff \exists k \in \mathbb{Z}. b = ak

Terminology

  • aa is a divisor or factor of bb
  • bb is a multiple of aa
  • If a∤ba \nmid b, then aa does not divide bb

Examples

  • 3∣123 \mid 12 since 12=3⋅412 = 3 \cdot 4
  • −3∣12-3 \mid 12 since 12=(−3)⋅(−4)12 = (-3) \cdot (-4)
  • 5∤125 \nmid 12 since no integer kk satisfies 12=5k12 = 5k
  • a∣0a \mid 0 for all a≠0a \neq 0 since 0=a⋅00 = a \cdot 0

Properties of Divisibility

Reflexivity

a∣afor all a∈Za \mid a \quad \text{for all } a \in \mathbb{Z}

Transitivity

a∣b∧b∣c⇒a∣ca \mid b \land b \mid c \Rightarrow a \mid c

Proof: If b=akb = ak and c=bℓc = b\ell, then c=akℓ=a(kℓ)c = ak\ell = a(k\ell).

Linearity

a∣b∧a∣c⇒a∣(bx+cy) for all x,y∈Za \mid b \land a \mid c \Rightarrow a \mid (bx + cy) \text{ for all } x, y \in \mathbb{Z}

Proof: If b=akb = ak and c=aℓc = a\ell, then bx+cy=akx+aℓy=a(kx+ℓy)bx + cy = akx + a\ell y = a(kx + \ell y).

Antisymmetry (up to sign)

a∣b∧b∣a⇒a=±ba \mid b \land b \mid a \Rightarrow a = \pm b

Proof: If a∣ba \mid b and b∣ab \mid a, then b=akb = ak and a=bℓa = b\ell for integers k,ℓk, \ell.

Hence a=akℓa = ak\ell, so a(1−kℓ)=0a(1 - k\ell) = 0.

If a=0a = 0, then b=0b = 0 and a=ba = b.

If a≠0a \neq 0, then kℓ=1k\ell = 1. Since k,ℓ∈Zk, \ell \in \mathbb{Z}, we have (k,ℓ)=(1,1)(k, \ell) = (1, 1) or (−1,−1)(-1, -1).

Thus b=ab = a or b=−ab = -a.

The Division Theorem

Statement

Theorem (Division Theorem): For any integer aa and positive integer b>0b > 0, there exist unique integers qq and rr such that:

a=bq+rwith 0≤r<ba = bq + r \quad \text{with } 0 \leq r < b

  • qq is the quotient (how many times bb fits into aa)
  • rr is the remainder (what is left over)
  • We write r=a mod br = a \bmod b

Examples

aabbqqrrVerification
1753217=5⋅3+217 = 5 \cdot 3 + 2
-175-43−17=5⋅(−4)+3-17 = 5 \cdot (-4) + 3
2072620=7⋅2+620 = 7 \cdot 2 + 6
1427014=2⋅7+014 = 2 \cdot 7 + 0

Proof Outline

Existence:

Consider the set S={a−bk:k∈Z,a−bk≥0}S = \{a - bk : k \in \mathbb{Z}, a - bk \geq 0\}.

This set is non-empty (take kk large and negative if a<0a < 0, or k=0k = 0 if a≥0a \geq 0).

Let rr be the smallest element of SS. Then r=a−bq≥0r = a - bq \geq 0 for some qq.

If r≥br \geq b, then r−b=a−b(q+1)≥0r - b = a - b(q+1) \geq 0, contradicting minimality.

So 0≤r<b0 \leq r < b.

Uniqueness:

If a=bq1+r1=bq2+r2a = bq_1 + r_1 = bq_2 + r_2 with 0≤r1,r2<b0 \leq r_1, r_2 < b:

Then b(q1−q2)=r2−r1b(q_1 - q_2) = r_2 - r_1.

We have ∣r2−r1∣<b|r_2 - r_1| < b, so b∣(r2−r1)b \mid (r_2 - r_1) forces r2−r1=0r_2 - r_1 = 0.

Thus r1=r2r_1 = r_2 and hence q1=q2q_1 = q_2.

Computing Quotient and Remainder

For Non-negative aa

q=⌊a/b⌋andr=a−bqq = \lfloor a/b \rfloor \quad \text{and} \quad r = a - bq

For Negative aa

Be careful: −17 mod 5=3-17 \bmod 5 = 3, not −2-2.

The standard convention requires 0≤r<b0 \leq r < b:

r=a−b⋅⌊ab⌋r = a - b \cdot \left\lfloor \frac{a}{b} \right\rfloor

Properties of Remainder

Invariance under Addition

If a≡r(modb)a \equiv r \pmod{b} and c≡s(modb)c \equiv s \pmod{b} with 0≤r,s<b0 \leq r, s < b, then:

a+c≡r+s(modb)a + c \equiv r + s \pmod{b}

Invariance under Multiplication

If a≡r(modb)a \equiv r \pmod{b} and c≡s(modb)c \equiv s \pmod{b} with 0≤r,s<b0 \leq r, s < b, then:

ac≡rs(modb)ac \equiv rs \pmod{b}


Summary

  • a∣ba \mid b means there exists kk with b=akb = ak
  • Divisibility is reflexive, transitive, and antisymmetric up to sign
  • The Division Theorem: for b>0b > 0, unique q,rq, r with a=bq+ra = bq + r and 0≤r<b0 \leq r < b
  • Remainder satisfies 0≤r<b0 \leq r < b even for negative aa