The Atoms of the Integers
A prime is an integer greater than 1 whose only positive divisors are 1 and itself: . An integer greater than 1 that is not prime is composite — it factors into smaller pieces. The number is neither prime nor composite (by convention, and for good reason — see below). Primes are the multiplicative "atoms" of the integers.
The central result is the Fundamental Theorem of Arithmetic: every integer greater than 1 can be written as a product of primes, and this factorization is unique up to the order of the factors. For example , and no other set of primes multiplies to . This uniqueness is why primes are the fundamental building blocks — every integer has exactly one "prime fingerprint."
This is also why is excluded from the primes: if were prime, factorizations would no longer be unique (you could insert any number of s), breaking the theorem. Definitions in mathematics are chosen to make the important theorems clean.
Two classic facts round out the theory:
- There are infinitely many primes (Euclid's theorem). The proof is a gem of contradiction: assume finitely many, multiply them all and add 1; the result is divisible by none of them, a contradiction.
- To test whether is prime, you need only check for divisors up to : if with , then , so a factor below the square root must exist if any factor does.
Prime factorization underlies the gcd, the lcm, modular arithmetic, and modern cryptography (whose security rests on factoring being hard for large numbers).
Common pitfall: thinking 1 is prime, or that a number needs checking for divisors all the way up to itself. By definition a prime is greater than 1, and 1 is neither prime nor composite. And to test primality you only check divisors up to — any composite must have a factor at or below its square root, so finding none there proves prime.
A factor tree for 60 branching 60 to 2 and 30, 30 to 2 and 15, 15 to 3 and 5, the accent leaves 2, 2, 3, 5 collected as the unique prime factorization.