The Timpson Lyceum seal

The Timpson Lyceum · Discrete Math (2025)

Number Theory and Dividing - Lecture 18 (Discrete Math)

Overview

This lecture opens the study of number theory — the analysis of the integers and rationals under the basic axioms of arithmetic — with its single most foundational result: the Division Algorithm. The idea is the same long division you learned in grade school, made precise: dividing one integer by a positive integer produces exactly one quotient and exactly one remainder. We make the statement rigorous, practice it through the div and mod operations (including the subtle case of negative dividends), and then prove it in full. The lecture closes with two corollaries that fall right out of the theorem: every integer is even or odd but not both, and two integers are congruent modulo 2 exactly when they have the same parity.

Key Concepts

Worked Example

Existence half of the Division Algorithm. Fix integers a,ba, b with b>0b > 0. Build the set of all possible remainders and pick the smallest non-negative one.

A={ a−kb:k∈Z }B=A∩N(discard the negative candidates)a−∣a∣ b≥0  ⟹  B≠∅(since b≥1)r=min⁡B(exists by Well-Ordering)r=a−qb  ⟹  a=qb+r,r≥0\begin{aligned} A &= \{\, a - kb : k \in \mathbb{Z} \,\} \\ B &= A \cap \mathbb{N} \quad (\text{discard the negative candidates}) \\ a - |a|\,b &\ge 0 \;\Longrightarrow\; B \neq \varnothing \quad (\text{since } b \ge 1) \\ r &= \min B \quad (\text{exists by Well-Ordering}) \\ r &= a - qb \;\Longrightarrow\; a = qb + r, \quad r \ge 0 \end{aligned}

It remains to show r<br < b. Suppose instead r≥br \ge b. Then set r′=a−(q+1)b=r−br' = a - (q+1)b = r - b. Since r≥br \ge b we get r′≥0r' \ge 0, so r′∈Br' \in B, yet r′=r−b<rr' = r - b < r — contradicting that rr is the least element of BB. Hence r<br < b.

Uniqueness. Suppose a=qb+r=q′b+r′a = qb + r = q'b + r' with both remainders in [0,b)[0, b). Subtracting gives r−r′=(q′−q)br - r' = (q' - q)b, so b∣(r−r′)b \mid (r - r'). But two numbers in [0,b)[0, b) differ by at most b−1b - 1, and the only multiple of bb with absolute value below bb is 00. Thus r=r′r = r', and then qb=q′bqb = q'b with b>0b > 0 forces q=q′q = q'. The quotient and remainder are unique. ■\blacksquare

Summary