Prime Numbers and Divisibility Rules
Not sure you’re ready?
Take the ~3-minute readiness diagnostic and see where you stand.
The physical universe is constructed from a finite set of indivisible elements known as atoms. The mathematical universe operates on an identical principle, but its elemental building blocks are the prime numbers. Every integer you encounter is either an indivisible mathematical atom itself or a complex molecule built by multiplying those atoms together. Understanding the architecture of these numbers—how to identify their parts, how to quickly test their properties, and how different numbers relate to one another—is not merely about following arithmetic algorithms. It is about recognizing the structural DNA of the number system.
To understand numbers, we must first classify them by their ability to be broken down. At the foundational level, we define a prime number as a whole number strictly greater than 1 that has exactly two distinct positive divisors: 1 and the number itself. You cannot divide a prime number evenly by any other positive integer; it is structurally irreducible.
Conversely, a composite number is a positive integer that has at least one positive divisor other than 1 and the number itself. Composite numbers are the "molecules" of mathematics, formed by the multiplication of smaller prime components.

This leaves us with two fascinating anomalies at the start of our number line: 0 and 1.
- The number 0 is neither prime nor composite. It can be divided by any number (yielding 0), meaning it possesses infinitely many divisors, which prevents it from functioning as a finite building block.
- The number 1 is neither prime nor composite. Why? Because a prime number must have exactly two distinct positive divisors. The number 1 only has a single positive divisor: itself. Therefore, it fails the definition of a prime, and because it has no divisors other than 1, it cannot be composite either.
When we strip away 0 and 1, the primes begin to emerge. The first ten prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29.
If you look closely at that sequence, a solitary even number sits at the very beginning. The number 2 is the only even prime number. Every other even integer stretches to infinity as a composite number, simply because, by definition, any other even number is divisible by 2.
The reason we care so deeply about prime numbers is articulated by one of the most powerful laws in mathematics.
The Fundamental Theorem of Arithmetic states that every integer strictly greater than 1 is either a prime number itself or can be uniquely represented as a product of prime numbers.
This theorem guarantees that no matter how you choose to pull a composite number apart, you will inevitably arrive at the exact same unique set of prime factors. There is only one valid "prime fingerprint" for every number.
Finding that fingerprint requires prime factorization, which is the mathematical process of determining which prime numbers multiply together to yield a specific original number.
To execute this systematically, mathematicians rely on a factor tree, a visual diagrammatic tool used to systematically break down a number into the prime factors of that number. Imagine we want to find the prime factorization of 60:
- Write down 60 and draw two branches down to any two factors, say 6 and 10.
- Neither 6 nor 10 are prime, so we branch them again. The 6 breaks down into 2 and 3 (both primes!).
- The 10 breaks down into 2 and 5 (both primes!).
- The tree stops growing when every branch ends in a prime number.
Gathering the "leaves" of our tree, we find that 60=2×2×3×5.

To write this cleanly, the prime factorization of a number can be written using exponents to compactly group identical prime factors. Therefore, the canonical representation of our result is: 60=22×31×51
Building factor trees for massive numbers would be agonizing if we had to rely on long division to test every possible branch. Fortunately, our base-10 number system exhibits predictable patterns. We can use specific divisibility rules to determine if one number divides evenly into another just by glancing at its digits.

The Ending Digits (Rules for 2, 5, and 10)
These rules are the most intuitive because powers of 10 (like 10,100,1000) are perfectly divisible by 2, 5, and 10. Therefore, everything except the final digit is irrelevant.
- A number is divisible by 2 if the final digit of the number is 0, 2, 4, 6, or 8.
- A number is divisible by 5 if the final digit of the number is exactly 0 or 5.
- A number is divisible by 10 if the final digit of the number is exactly 0.
The Sum of the Digits (Rules for 3 and 9)
Because numbers like 9,99, and 999 are multiples of both 3 and 9, any base-10 number can be mathematically reorganized to expose whether its underlying digits sum to a multiple of these primes.
- A number is divisible by 3 if the sum of all the individual digits in the number is divisible by 3. (For example, 3,456: 3+4+5+6=18. Since 18 is divisible by 3, 3,456 is divisible by 3).
- A number is divisible by 9 if the sum of all the individual digits in the number is divisible by 9. (Using 3,456 again: the sum is 18. Since 18 is divisible by 9, 3,456 is divisible by 9).
The Structural Checks (Rules for 4 and 6)
- A number is divisible by 4 if the number formed by the last two digits is divisible by 4. Why? Because 100 is perfectly divisible by 4. Whether you have 300 or 3,000,000, those hundreds and above are automatically divisible by 4. You only need to check the tens and units. (For example, in 8,732, just look at 32. 32÷4=8, so the entire number is divisible by 4).
- A number is divisible by 6 if the number passes the divisibility rules for both 2 and 3. Because 6 is the product of the primes 2 and 3, any number divisible by 6 must be even (passing the rule for 2) and its digits must sum to a multiple of 3 (passing the rule for 3).
Once we understand how single numbers are built, we can analyze the relationships between numbers. When we compare the prime factorizations of two integers, we uncover their commonalities and their collective scale.
The Greatest Common Divisor (GCD)
The Greatest Common Divisor of two or more integers is the largest positive integer that divides each of the integers without leaving a remainder. In educational contexts, be aware that the term Greatest Common Divisor is mathematically synonymous with the term Greatest Common Factor (GCF).

To find the GCD, we look at the prime factorizations of our two numbers to isolate the mathematical DNA they share. The Greatest Common Divisor of two numbers is calculated by multiplying all the common prime factors shared by both numbers at their lowest exponent levels.
Consider 60 and 72:
- 60=22×31×51
- 72=23×32
Which bases do they share? They both have a 2 and a 3. They do not both have a 5, so 5 is ignored. What are the lowest exponent levels for those shared primes?
- For 2: between 22 and 23, the lowest is 22.
- For 3: between 31 and 32, the lowest is 31.
Multiply those together: GCD=22×31=4×3=12. The largest number that perfectly divides both 60 and 72 is 12.
In some cases, two numbers share absolutely no prime factors. Two numbers are considered relatively prime if the Greatest Common Divisor of the two numbers is exactly 1. For example, 8 (23) and 15 (3×5) are both composite, but they share no prime components. Their GCD is 1, making them relatively prime.

The Least Common Multiple (LCM)
If divisors represent breaking numbers down, multiples represent building them up. A multiple of a given number is the product of that given number and any integer. The multiples of 5, for instance, are 5,10,15,20, and so on out to infinity.
When aligning two distinct periodic events or mathematical scales, we seek the lowest point at which they intersect. The Least Common Multiple of two or more integers is the smallest positive integer that is divisible by each of the original integers.
While the GCD requires the lowest powers of shared primes, calculating the LCM takes the exact opposite approach: The Least Common Multiple of two numbers is calculated by multiplying the highest power of each distinct prime factor present in the prime factorizations of those two numbers.
Let's use 60 and 72 again:
- 60=22×31×51
- 72=23×32
What are all the distinct prime bases present? 2, 3, and 5. What are the highest exponent levels for those primes across either number?
- For 2: the highest is 23.
- For 3: the highest is 32.
- For 5: the highest is 51.
Multiply those together: LCM=23×32×51=8×9×5=360. The first time the multiples of 60 and the multiples of 72 collide is at exactly 360.
One of the most beautiful and elegant proofs of the internal consistency of mathematics is how the GCD and LCM relate back to the original numbers.
When you find the GCD, you extract the minimum exponents. When you find the LCM, you extract the maximum exponents. If you multiply the GCD and the LCM together, you are effectively uniting the lowest and highest powers of every single prime factor shared between the two original numbers. The result is a perfect, lossless preservation of both original prime factorizations.
Because of this symmetry, the product of two positive integers is equal to the product of the Greatest Common Divisor and the Least Common Multiple of those same two integers.
The Product Rule for GCD and LCM: a×b=GCD(a,b)×LCM(a,b)
Let us test it with 60 and 72:
- The product of the original integers: 60×72=4,320
- The product of their GCD and LCM: 12×360=4,320
This perfect balance showcases why we study prime numbers, divisibility rules, and factorization. Numbers are not arbitrary labels we assign to quantities. They are highly structured entities bound by inviolable rules—and once you recognize that structure, you hold the keys to all arithmetic logic.