The Integers: Divisibility, GCD, Primes
One-line statement: The integers form a system where every number factors uniquely into primes, and divisibility, the greatest common divisor (GCD), and primality are the foundational tools for studying that structure.
Key result in words: Every integer greater than 1 is either prime or can be written as a product of primes in exactly one way (up to order) — the Fundamental Theorem of Arithmetic.
Where it applies: Number theory, cryptography (RSA), error-correcting codes, computer algebra, scheduling/cyclic problems, music theory.
Who/when: Studied since Euclid (c. 300 BCE); systematized by Gauss (1801) in Disquisitiones Arithmeticae.
Multiplication of integers can be "reversed" by asking what divides what. The primes are exactly the numbers that cannot be broken down further, and every integer is a unique product of primes. This means questions about integers — their common factors, their multiples, their structure — can always be reduced to questions about primes. The GCD and the Euclidean algorithm give us a fast, mechanical way to extract that shared prime content without ever having to factor.
Formal Statement
Let . We say divides , written , if there exists an integer such that:
Derivation hint: This is a definition — literally means " is an integer multiple of ." Here is a divisor (or factor) of , and is a multiple of . If no such exists, we write . Note every integer divides (take ), and divides only .
For any integers and with , there exist unique integers (the quotient) and (the remainder) such that:
Derivation hint: Take ; the remainder is forced into by the floor. Divisibility is the special case : precisely when the remainder is zero.
The greatest common divisor of integers and (not both zero), written , is the largest positive integer dividing both:
Derivation hint: The set of common divisors is finite and nonempty (1 is always a common divisor), so a maximum exists. If , the numbers are called coprime (or relatively prime). The companion quantity, the least common multiple, satisfies:
Derivation hint: Compare prime-power exponents — for each prime, exponent (gcd) plus exponent (lcm) equals the total of the two.
An integer is prime if its only positive divisors are and itself. An integer that is not prime is composite. The number is a unit — by convention neither prime nor composite. The primes begin:
Derivation hint: List integers; strike out those with a proper divisor (the Sieve of Eratosthenes).
Every integer can be written as a product of primes, and this factorization is unique apart from the order of the factors:
Derivation hint: Existence by strong induction (split any composite); uniqueness from Euclid's Lemma below.
For any integers (not both zero), there exist integers such that:
Derivation hint: is the smallest positive value of ; run the Euclidean algorithm backwards to find . In particular, and are coprime iff has an integer solution.
If a prime divides a product , then divides at least one of the factors:
Derivation hint: If then , so by Bézout ; multiply by .
Why It Holds / Derivation
We prove the uniqueness half of the Fundamental Theorem; existence is a routine induction.
Step 1 — Setup. Suppose, for contradiction, some integer has two genuinely different prime factorizations. By the well-ordering principle, let be the smallest such integer:
where each is prime, and the two lists are not the same (up to reordering).
Step 2 — Apply Euclid's Lemma. Since , repeated use of Euclid's Lemma [8] forces for some . But is prime, so its only divisors are and itself; hence .
Step 3 — Cancel. Reorder so that , and divide both factorizations by :
Step 4 — Contradiction. The number is smaller than , yet it still has two distinct factorizations. This contradicts the minimality of . Therefore no such exists, and prime factorization is unique.
∎Step 1. Suppose there were only finitely many primes: .
Step 2. Form the number .
Step 3. , so by the Fundamental Theorem it has some prime divisor . That must be one of our list, say .
Step 4. Then and , so divides their difference . But no prime divides — contradiction. Therefore the list of primes can never be complete; there are infinitely many.
∎Euclid compiled the Elements, the most influential mathematics text in history. Books VII–IX develop number theory from scratch: the Euclidean algorithm for GCD appears as Proposition VII.2, Euclid's Lemma as VII.30, and the infinitude of primes as the celebrated IX.20. His method — proving general truths by rigorous deduction rather than checking examples — set the template for all later mathematics. Remarkably, the algorithm he describes for computing the GCD is still, in essence, the fastest practical method used by computers today, over two millennia later.
Building Intuition
Think of each integer as built from a "recipe" of prime ingredients. The number means "two pinches of 2 and one pinch of 3." With this picture:
- Divisibility is containment of recipes: means every ingredient of appears in at least as many times. because and has two 's to spare.
- GCD is the overlap of two recipes — take the minimum count of each shared prime. .
- LCM is the union — take the maximum count of each prime: .
The primes are the ingredients that cannot themselves be made from smaller ingredients. The Euclidean algorithm is a shortcut that finds the overlap without ever opening the recipe boxes — it works purely by repeated division.
Worked Examples
Given: Find .
Method A — Prime factorization.
- Shared primes with minimum exponents: .
Method B — Euclidean algorithm.
- → stop. Last nonzero remainder is .
Both agree. We can also find the LCM via equation [4]:
Given: Express as .
Step 1 — Forward (Euclidean algorithm):
- → .
Step 2 — Back-substitute. Start from the line giving the GCD:
Replace using :
Step 3 — Read off coefficients: . Check: . ✓
Common Misconceptions
"1 is prime." It is not. Including as prime would destroy the uniqueness in the Fundamental Theorem, since you could insert any number of 's: . The number is a unit, sitting in its own category.
"If then or ." This is true only when is prime (Euclid's Lemma). For composite it can fail.
"GCD only makes sense for positive numbers." is defined for negatives too, since divisibility ignores sign; . By convention the GCD itself is taken positive.
For the failed divisibility claim above, take , , :
Here is composite, so Euclid's Lemma does not apply — the factor of is "split across" and (one factor of in each). This is exactly why primality is the crucial hypothesis.
Connections
Divisibility and the GCD are the gateway to several neighbouring areas:
- Modular Arithmetic is built directly on the Division Algorithm — remainders modulo partition into classes, and coprimality (GCD ) is exactly the condition for an element to have a multiplicative inverse mod .
- Linear Diophantine Equations have integer solutions if and only if — a direct consequence of Bézout's Identity [7].
- Rational Numbers in lowest terms are precisely fractions with ; the GCD is what "reduces" a fraction.
- Abstract Algebra and Rings generalizes to unique factorization domains, asking which other number systems preserve the Fundamental Theorem (surprisingly, not all do).
Real-World Applications
Historical Development
Subtleties & Limits
The atoms (primes) are understood individually, but their collective behaviour hides famous unsolved problems:
- Goldbach's Conjecture (1742): Is every even integer the sum of two primes? Verified to enormous bounds by computer, still unproven.
- Twin Prime Conjecture: Are there infinitely many primes such that is also prime (; ; ; …)? Yitang Zhang's 2013 breakthrough proved infinitely many prime pairs differ by some bounded gap, but the gap-2 case remains open.
- The Riemann Hypothesis: A conjecture about the zeta function that, if true, would pin down the distribution of primes with astonishing precision. It is one of the Clay Millennium Prize Problems.
Also worth noting: unique factorization is special to and similar systems. In the ring one has — two genuinely different factorizations into irreducibles. The Fundamental Theorem is a gift, not a guarantee.
See Also
Modular Arithmetic · Linear Diophantine Equations · Rational Numbers · Mathematical Induction · Cryptography and RSA · Abstract Algebra and Rings · The Distribution of Primes · Continued Fractions