Prime Numbers: Definition, Rules, and How to Spot One
Written and checked with AI using the references below. This is not human expert review.
Quick answer
A prime number is a whole number greater than 1 that can only be divided evenly by 1 and itself. For example, 13 is prime because its only divisors are 1 and 13, while 12 is not prime because it can also be divided by 2, 3, 4, and 6.
What Makes a Number Prime
A prime number is a positive whole number greater than 1 that has exactly one positive divisor other than 1, meaning it cannot be broken into smaller whole-number factors. In plain terms: you can only divide it evenly by 1 and by itself. Every other division leaves a remainder.
The number 13 is a clean example. Try dividing 13 by 2, 3, 4, 5, 6, or any whole number up to 12, and you always get a remainder. Only 1 and 13 divide it evenly, so 13 is prime. The number 24, by contrast, has divisors 1, 2, 3, 4, 6, 8, 12, and 24, so it is not prime.
The First Primes, and the Special Case of 2
The first twelve prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, and 37. Notice that 2 is the only even prime. Every other even number is divisible by 2, which gives it a third divisor and rules it out. Because of this, 2 is sometimes called the “oddest” prime, and all primes beyond 2 are odd.
Understanding order of operations and divisibility rules can help you spot potential factors faster when you are testing larger numbers.
Why 1 Is Not Prime
This is the most common misconception. The number 1 is neither prime nor composite. It sits in its own category.
The reason matters: if 1 were counted as prime, the fundamental theorem of arithmetic (see below) would break down. That theorem says every whole number greater than 1 can be written as a product of primes in exactly one way. If 1 were prime, you could write, say, 6 as 2 × 3, or as 1 × 2 × 3, or as 1 × 1 × 2 × 3, giving infinitely many “different” factorizations. Excluding 1 keeps the factorization unique.
Primes vs. Composite Numbers
Every whole number greater than 1 falls into one of two groups:
- Prime: exactly two divisors, 1 and itself (examples: 2, 3, 5, 7, 11).
- Composite: three or more divisors, meaning it has at least one factor besides 1 and itself (examples: 4, 6, 9, 15, 35).
The numbers 0 and 1 belong to neither group. Zero has infinitely many divisors, and 1 has only one divisor (itself), so neither fits the prime definition.
How to Test Whether a Number Is Prime
The straightforward method is called trial division: you systematically check whether any whole number divides your target evenly. A key shortcut saves time. You only need to test divisors up to the square root of the number. If no factor turns up by then, the number is prime. Here is why: if a number n had a factor larger than its square root, the matching paired factor would have to be smaller than the square root, and you would have already found it.
Step-by-Step Trial Division
- Confirm the number is a whole number greater than 1.
- Calculate (or estimate) its square root.
- Test every whole number from 2 up to that square root. Divide your target by each candidate.
- If any division produces a whole-number result with no remainder, the number is composite.
- If none do, the number is prime.
Illustrative Example: Is 37 Prime?
(All arithmetic below is independently verifiable.)
Find the square root of 37. You only need to test whole-number divisors from 2 up to that square root.
- 37 ÷ 2 = 18.5 (not a whole number, remainder exists)
- 37 ÷ 3 = 12.333… (not a whole number)
- 37 ÷ 4 = 9.25 (not a whole number)
- 37 ÷ 5 = 7.4 (not a whole number)
- 37 ÷ 6 = 6.166… (not a whole number)
No divisor from 2 to 6 divides 37 evenly. Conclusion: 37 is prime.
Illustrative Example: Is 35 Prime?
Find the square root of 35. Test divisors from 2 up to that square root.
- 35 ÷ 2 = 17.5 (not a whole number)
- 35 ÷ 3 = 11.666… (not a whole number)
- 35 ÷ 4 = 8.75 (not a whole number)
- 35 ÷ 5 = 7 (whole number, no remainder)
Because 35 ÷ 5 = 7 exactly, 35 has the factors 1, 5, 7, and 35. It is composite, not prime.
When you find even one clean division like this, you can stop. The number is composite, and you know two of its factors right away.
Primes as Building Blocks of All Whole Numbers
The fundamental theorem of arithmetic states that every positive integer greater than 1 can be written as a product of primes in exactly one way (ignoring the order of the factors). This is also called unique prime factorization.
For example: 60 = 2 × 2 × 3 × 5. No other combination of primes multiplies to 60. This is why primes are often described as the atoms of arithmetic: every whole number is built from them, and the recipe is unique. You can explore how fraction simplification relies on finding shared prime factors in the numerator and denominator.
There Are Infinitely Many Primes
Euclid proved more than 2,000 years ago that the list of primes never ends. His proof used contradiction: assume a largest prime exists, multiply all known primes together and add 1, and the result is either prime itself or divisible by a prime not on the original list. Either way, the assumed largest prime was not actually the last one.
Despite this infinite supply, primes become rarer as numbers grow larger. Finding and verifying very large primes is an active area of mathematics, with the largest known primes having tens of millions of digits.
Common Mistakes When Identifying Primes
Calling 1 a prime. As explained above, 1 is excluded by definition because including it would destroy unique factorization.
Assuming all primes are odd. The number 2 is prime and even. It is the only even prime, but it is still prime.
Stopping the square-root test too early. If you test only up to 5 for a number like 49, you miss the factor 7 (since 7 × 7 = 49 and the square root of 49 is exactly 7). Always test up to and including the square root.
Forgetting that negative numbers and fractions are outside the definition. Primality applies to positive integers only. The number -7 or 1/2 is neither prime nor composite.
Frequently asked questions
Is the number 2 really prime if it is even?
Yes. Two is prime because its only divisors are 1 and 2. Every other even number has 2 as an additional divisor, giving it at least three divisors total and making it composite. Two is the only even prime, which is why mathematicians sometimes call it the oddest prime.
What is the difference between a prime and a composite number?
A prime has exactly two divisors: 1 and itself. A composite number has three or more divisors, meaning at least one factor besides 1 and itself. The numbers 0 and 1 are neither prime nor composite. Every whole number greater than 1 falls into exactly one of these two categories.
How high do I need to check when testing if a number is prime?
You only need to test whole-number divisors up to the square root of the number. If no divisor in that range divides evenly, the number is prime. For example, to test 37, you check up to about 6.08, so you test 2, 3, 4, 5, and 6 only.
Are there infinitely many prime numbers?
Yes. Euclid proved this in Book IX of his Elements using a proof by contradiction. The argument shows that no matter how many primes you list, you can always construct a number that reveals at least one more prime not on the list. The supply of primes is endless.
Why do primes matter outside of pure math?
Prime factorization is the foundation of modern encryption. Systems like RSA encryption rely on the fact that multiplying two large primes is easy, but factoring the result back into those primes is computationally very hard. This difficulty protects online banking, messaging, and other secure communications.
Sources
- Prime Number -- from Wolfram MathWorld · mathworld.wolfram.com
- Prime numbers · Maths History (mathshistory.st-andrews.ac.uk)
- Fundamental Theorem of Arithmetic -- from Wolfram MathWorld · mathworld.wolfram.com
Written by AI; checked through automated evidence and editorial review. References retrieved October 11, 2026.
Spotted an error? Tell us what needs correcting.