Theorem 1.1 (Division Algorithm). For any integers a and b with b>0There exist unique Integers q and r such that a=bq+r with 0≤r<b.
Proof. Consider the set S=a−bk:k∈Z, a−bk≥0. This set is non-empty (by the Archimedean property, choosing k sufficiently negative). By the well-ordering principle, S has a least element r=a−bq. If r≥bThen r−b=a−(q+1)b∈S with r−b<rContradicting minimality. So 0≤r<b. For uniqueness, if a=bq1+r1=bq2+r2Then b(q1−q2)=r2−r1. Since ∣r2−r1∣<bWe must Have q1=q2 and r1=r2. ■
We write d∣a (read ”d divides a”) if there exists k∈Z with a=dk.
Proposition 1.2. For all a,b,c∈Z:
- If a∣b and b∣cThen a∣c.
- If a∣b and a∣cThen a∣(mb+nc) for all m,n∈Z.
- If a∣b and b=0Then ∣a∣≤∣b∣.
- a∣0 for all aBut 0∣a only when a=0.
Proof. (1) a∣b means b=ak and b∣c means c=bℓ=akℓSo a∣c. (2) a∣b means b=ak and a∣c means c=aℓSo mb+nc=a(mk+nℓ). (3) a∣b means b=akSo ∣b∣=∣a∣⋅∣k∣≥∣a∣. (4) 0=a⋅0So a∣0. If 0∣aThen a=0⋅k=0. ■
Problem. Apply the division algorithm to write −237=14q+r with 0≤r<14.
Solution
We compute 237÷14=16.93…So 14⋅16=224 and 14⋅17=238>237. Thus for positive 237: q=16, r=13Giving 237=14⋅16+13.
For a=−237: we need q such that r=−237−14q satisfies 0≤r<14. −237=14(−17)+1: check 14⋅(−17)=−238And −238+1=−237. Here q=−17 and r=1 with 0≤1<14. ■
Problem. Find all integers n such that n≡3(mod7) and n≡2(mod5).
Solution
From n≡3(mod7)We have n=7k+3 for some k∈Z. Substituting into n≡2(mod5): 7k+3≡2(mod5)So 7k≡−1≡4(mod5)Giving 2k≡4(mod5)Hence k≡2(mod5).
So k=5m+2And n=7(5m+2)+3=35m+17. The solutions are n≡17(mod35). ■
Theorem 1.3. Let a,b∈ZNot both zero. The greatest common divisor of a and b Exists and is unique.
Proof. The set D=d∈N:d∣a and d∣b" is non-empty since ∣a∣∈D (if a=0) or ∣b∣∈D (if b=0). By the well-ordering principle, D has A least element g. We claim g=gcd(a,b). By definition g∣a and g∣b. If c∣a And c∣bThen c≤∣c∣≤g (since g is the least positive common divisor). For Uniqueness: if g1 and g2 are both greatest common divisors, then g1∣g2 and g2∣g1 So g1=g2 (since both are positive). ■
Definition. The least common multiple of positive integers a and bWritten lcm(a,b)Is the smallest positive integer m such that a∣m and b∣m.
Theorem 1.4 (GCD—LCM Identity). For all positive integers a and b:
gcd(a,b)⋅lcm(a,b)=ab
Proof. Write a=∏i=1kpiαi and b=∏i=1kpiβi where αi,βi≥0. Then gcd(a,b)=∏i=1kpimin(αi,βi) and lcm(a,b)=∏i=1kpimax(αi,βi). Since min(αi,βi)+max(αi,βi)=αi+βi for each iWe have:
gcd(a,b)⋅lcm(a,b)=∏i=1kpiαi+βi=ab■
Proposition 1.5. For all positive integers a,b:
- lcm(a,b)=ab/gcd(a,b).
- gcd(a,lcm(b,c))=lcm(gcd(a,b),gcd(a,c)).
Problem. Compute lcm(252,105) and verify the gcd—lcm identity.
Solution
First, gcd(252,105). Using the Euclidean algorithm: 252=2⋅105+42, 105=2⋅42+21, 42=2⋅21+0. So gcd(252,105)=21.
By the identity: lcm(252,105)=252⋅105/21=252⋅5=1260.
Verification: 1260/252=5 and 1260/105=12Both integers. ■
| Concept | Definition | Example |
|---|
| Division Alg | a=bq+r, 0≤r<b | −237=14(−17)+1 |
| gcd(a,b) | Largest d with d∣a and d∣b | gcd(252,105)=21 |
| lcm | Smallest m with a∣m and b∣m | lcm(252,105)=1260 |
| Euclidean Alg | Repeated division to find gcd | 252=2⋅105+42, … |
| Bezout’s Identity | ∃x,y:ax+by=gcd(a,b) | 252x+105y=21 |
- Forgetting the remainder must be non-negative. For negative a, the division algorithm still requires 0≤r<b, which may mean q is not simply a/b.
- Confusing “divides” with divisibility by zero. a∣0 is true for all a=0, but 0∣a is false unless a=0 itself.
- Assuming gcd and lcm are defined for negative numbers. The gcd is always taken as positive; gcd(a,b)=gcd(∣a∣,∣b∣).
- Thinking the gcd-lcm identity works for more than two numbers. For three numbers, gcd(a,b,c)⋅lcm(a,b,c)=abc in general.
- Cryptography: RSA encryption relies on the fact that computing gcd is easy (Euclidean algorithm) but factoring large numbers is hard. The Carmichael function λ(n) depends on lcm of prime-power factors.
- Scheduling: The lcm determines when periodic events coincide. If bus A runs every 12 minutes and bus B every 18 minutes, they coincide every lcm(12,18)=36 minutes.
- Computer arithmetic: The Euclidean algorithm efficiently computes modular inverses used in the extended Euclidean algorithm for RSA key generation.
- Diophantine equations: The linear Diophantine equation ax+by=c has integer solutions iff gcd(a,b)∣c, and the solutions are parameterised by the lcm-related step size.