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 aba \mid b, if and only if there exists an integer kk such that b=akb = ak.

ab    kZ.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 aba \nmid b, then aa does not divide bb

Examples

  • 3123 \mid 12 since 12=3412 = 3 \cdot 4
  • 312-3 \mid 12 since 12=(3)(4)12 = (-3) \cdot (-4)
  • 5125 \nmid 12 since no integer kk satisfies 12=5k12 = 5k
  • a0a \mid 0 for all a0a \neq 0 since 0=a00 = a \cdot 0

Properties of Divisibility

Reflexivity

aafor all aZa \mid a \quad \text{for all } a \in \mathbb{Z}

Transitivity

abbcaca \mid b \land b \mid c \Rightarrow a \mid c

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

Linearity

abaca(bx+cy) for all x,yZa \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=ac = a\ell, then bx+cy=akx+ay=a(kx+y)bx + cy = akx + a\ell y = a(kx + \ell y).

Antisymmetry (up to sign)

abbaa=±ba \mid b \land b \mid a \Rightarrow a = \pm b

Proof: If aba \mid b and bab \mid a, then b=akb = ak and a=ba = b\ell for integers k,k, \ell.

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

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

If a0a \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 0r<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=amodbr = a \bmod b

Examples

aabbqqrrVerification
1753217=53+217 = 5 \cdot 3 + 2
-175-4317=5(4)+3-17 = 5 \cdot (-4) + 3
2072620=72+620 = 7 \cdot 2 + 6
1427014=27+014 = 2 \cdot 7 + 0

Proof Outline

Existence:

Consider the set S={abk:kZ,abk0}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 a0a \geq 0).

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

If rbr \geq b, then rb=ab(q+1)0r - b = a - b(q+1) \geq 0, contradicting minimality.

So 0r<b0 \leq r < b.

Uniqueness:

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

Then b(q1q2)=r2r1b(q_1 - q_2) = r_2 - r_1.

We have r2r1<b|r_2 - r_1| < b, so b(r2r1)b \mid (r_2 - r_1) forces r2r1=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/bandr=abqq = \lfloor a/b \rfloor \quad \text{and} \quad r = a - bq

For Negative aa

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

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

r=ababr = a - b \cdot \left\lfloor \frac{a}{b} \right\rfloor

Properties of Remainder

Invariance under Addition

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

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

Invariance under Multiplication

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

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


Summary

  • aba \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 0r<b0 \leq r < b
  • Remainder satisfies 0r<b0 \leq r < b even for negative aa