MATH 308 — Lec 7 — Divisibility & Congruence
Math 308 · September 24, 2026
Lecture 7 — Divisibility and Congruence
MATH 308 Bridge to Advanced Mathematics Chartrand §4.1–4.2
Goals for today. By the end of this lecture you should be able to:
-
state precisely what a∣b means and use it in and out of proofs;
-
prove the basic divisibility facts (transitivity; divisors of a linear combination);
-
read and write a≡b(modn), and test it by hand;
-
prove that congruence is preserved under addition and multiplication, and use this to compute remainders.
Divisibility of integers (§4.1)
Last lecture (Lecture 6) we proved things about even and odd integers by writing n=2q or n=2q+1. “Even” just means “a multiple of 2.” Divisibility is the same idea with 2 replaced by any nonzero integer.
Definition 1. Let a,b∈Z with a=0. We say a divides b, written a∣b, if there is an integer c with b=ac. When a∣b we also say b is a multiple of a and a is a divisor of b. If no such c exists we write a∤b.
The whole definition is the equation b=ac for some integer c. To use a∣b, produce that c; to prove a∣b, exhibit one.
Example 1. 4∣48 since 48=4⋅12, and −3∣57 since 57=(−3)(−19). But 4∤66: there is no integer c with 66=4c (we would need c=16.5). Note a∣0 for every a=0, since 0=a⋅0. Finally, n is even ⇔2∣n — our old vocabulary is a special case.
The multiples of 3 (blue) sit evenly spaced on the number line; each blue arc is a step of +3. Formally 3∣b⇔b=3c for some c∈Z.
The first two facts are the workhorses of every divisibility argument. Both are direct proofs: unpack the hypothesis into equations, then factor out the divisor.
Proposition 1 (Transitivity). Let a,b,c∈Z with a=0 and b=0. If a∣b and b∣c, then a∣c.
Proof. Assume a∣b and b∣c. By definition, b=ax and c=by for some x,y∈Z. Substituting,
c=by=(ax)y=a(xy).Since xy∈Z, this exhibits c as a times an integer, so a∣c. ◻
Proposition 2 (Divisor of a linear combination). Let a,b,c,x,y∈Z with a=0. If a∣b and a∣c, then a∣(bx+cy).
Proof. Assume a∣b and a∣c, say b=ar and c=as with r,s∈Z. Then
bx+cy=(ar)x+(as)y=a(rx+sy).Since rx+sy∈Z, we conclude a∣(bx+cy). ◻
Taking x=y=1 gives a∣(b+c); taking x=1,y=−1 gives a∣(b−c). So a common divisor of two integers divides their sum and difference — a fact we will lean on in a moment.
Example 2. Suppose 7∣n. Does 7∣(n2+3n)? Yes: n=7c, so n2+3n=n(n+3)=7c(n+3), and c(n+3)∈Z. In general, if a∣b then a∣bk for every k∈Z, since b=ac gives bk=a(ck).
Congruence modulo n (§4.2)
The multiples of 3 in Figure 1 land at …,−3,0,3,6,…. The numbers between them share something too: 1,4,7,10 all leave remainder 1 on division by 3. Congruence is the tool that makes “same remainder” precise — and, crucially, that we can compute with.
Definition 2. Let n∈Z with n≥2, and let a,b∈Z. We say a is congruent to b modulo n, written
a≡b(modn),ifn∣(a−b).Equivalently, a−b is a multiple of n. If n∤(a−b) we write a≡b(modn).
Example 3. 15≡7(mod4) since 4∣(15−7)=8. And 3≡−15(mod9) since 9∣(3−(−15))=18. But 14≡4(mod6), because 6∤(14−4)=10. Congruence mod 2 is nothing new: a≡b(mod2) says a and b have the same parity.
Remark 1. Because every integer leaves exactly one remainder r∈{0,1,…,n−1} on division by n, one can show a≡b(modn) iff a and b leave the same remainder mod n. (This rests on the Division Algorithm, which we treat carefully later.) So ≡(modn) sorts Z into n classes by remainder — a partition of Z (recall Lecture 2), and our first genuine equivalence relation, developed in Lecture 14 and revisited as the integers mod n in Lecture 15.
Counting mod 5: the number line wraps onto a 5-point wheel. Every step of +1 moves one node clockwise, and …,−3,2,7,12,… all land on node 2 — they are congruent mod 5.
The reason congruence is so useful is that it respects the two basic operations: you may add and multiply congruences just like equations.
Theorem 3 (Congruence is preserved by + and ×). *Let a,b,c,d,n∈Z with n≥2. If a≡b(modn) and c≡d(modn), then
a+c≡b+d(modn)andac≡bd(modn).Proof. By hypothesis n∣(a−b) and n∣(c−d), so a−b=nx and c−d=ny for some x,y∈Z.
Addition. Adding the two equations,
(a+c)−(b+d)=nx+ny=n(x+y),and x+y∈Z, so n∣[(a+c)−(b+d)]; that is, a+c≡b+d(modn).
Multiplication. Rewrite the hypotheses as a=b+nx and c=d+ny, and multiply:
ac=(b+nx)(d+ny)=bd+n(dx+by+nxy).Hence ac−bd=n(dx+by+nxy), and dx+by+nxy∈Z, so ac≡bd(modn). ◻
Taking c=d in the multiplication rule gives: if a≡b(modn) then ac≡bc(modn) for every c; and applying multiplication with c=a,d=b repeatedly gives ak≡bk(modn) for every k∈N. This is what turns hopeless-looking arithmetic into one-line computations.
Example 4. What is the remainder when 210=1024 is divided by 3? Since 2≡−1(mod3), the theorem gives
210≡(−1)10=1(mod3).So the remainder is 1 — and indeed 1024=3⋅341+1. We never had to compute 1024; we replaced 2 by the simpler −1 inside the congruence and multiplied.
In-class problems
-
Prove: if a∣b then a∣b2. (Then guess the pattern for a2∣b2.)
-
Let a,b,c∈Z with a=0. Prove that if a∣(b+c) and a∣b, then a∣c.
-
Test each: (a) 23≡5(mod6)? (b) −4≡11(mod5)? (c) 100≡2(mod7)?
-
Use congruences to find the remainder of 3100 on division by 4. (Hint: 3≡−1(mod4).)
-
Prove: for every integer n, exactly one of n≡0, n≡1, n≡2(mod3) holds. (Which lecture’s “partition” is this?)
-
Prove or disprove: if a≡b(modn) and a≡b(modm), then a≡b(modnm).
Suggested textbook exercises (Chartrand §4.1–4.2): 4.1, 4.5, 4.6, 4.14, 4.18, 4.21.