A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself. The two conditions matter: the number must exceed 1, and it must have exactly two factors. That definition is fixed by convention across number theory, so it doesn't change by country, textbook, or year — the same rule that made 2 prime when Euclid wrote about it around 300 BCE still applies in a classroom today. What trips people up is the boundary case hiding in plain sight: 1 is not prime, and 1 is not composite either.
The Definition That Actually Decides Membership
The phrase "greater than 1" does the quiet work in the standard definition. A prime has exactly two distinct positive divisors, and 1 has only one divisor — itself — so it fails the count. Composite numbers have three or more divisors, which is why they sit in a separate bucket. Zero is out too, since every number divides it.
Check 7 by listing divisors: 1 and 7. Two divisors, so it's prime. Check 4: 1, 2, and 4 — three divisors, so it's composite. Check 2: divisors are 1 and 2, which qualifies, and because 2 is even many people wrongly assume it can't be prime. It is the only even prime, since every other even number is divisible by 2.
The concept is ancient rather than modern. Euclid's Elements, Book IX, contains a proof that there are infinitely many primes, using an argument that still appears in textbooks unchanged. That longevity is useful context: when a definition has survived roughly 2,300 years without revision, the exam question is unlikely to spring a surprise on you.
What the definition does not require is anything about how the number looks. A prime can be a two-digit number, a hundred-digit number, or a number larger than the number of atoms in the observable universe. Divisibility is the only test that matters.
The First 25 Primes and Why the Gaps Wobble
Below 100 there are exactly 25 primes. The list runs 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, and 97. Of the numbers 1 through 100, that leaves 25 primes, 1 unit, and 74 composites.
| Range | Count of primes | Boundary values |
|---|---|---|
| 1–10 | 4 | 2, 3, 5, 7 |
| 11–20 | 4 | 11, 13, 17, 19 |
| 21–30 | 2 | 23, 29 |
| 31–40 | 2 | 31, 37 |
| 41–50 | 3 | 41, 43, 47 |
| 51–60 | 2 | 53, 59 |
| 61–70 | 2 | 61, 67 |
| 71–80 | 3 | 71, 73, 79 |
| 81–90 | 2 | 83, 89 |
| 91–100 | 1 | 97 |
The gaps are the interesting part. Between 2 and 3 the gap is 1, the smallest possible spacing between distinct primes. Between 89 and 97 the gap is 8. The table above shows density thinning as the numbers climb, but not smoothly — the 41–50 decade holds three primes while 21–30 holds two. That irregularity is a real feature, not a rounding error.
Consecutive primes can also be twins, meaning they differ by 2. Examples are 3 and 5, 11 and 13, 41 and 43, and 71 and 73. Whether infinitely many twin pairs exist remains an open question in number theory, which is a decent indication that prime gaps are harder to pin down than prime membership.
Counting primes up to a large limit is its own field. The prime-counting function π(x) gives the number of primes at or below x, and for 100 it returns 25, matching the list. The Prime Number Theorem describes how π(x) behaves for enormous x, and it's the tool mathematicians use when counting rather than checking.
The 2-Second Test That Works Below 100
The practical shortcut most people need is trial division by primes up to the square root of the number. If none divide evenly, the number is prime. For anything under 100, the square root is under 10, so you only need to test 2, 3, 5, and 7 — four checks, no calculator required.
Worked example: is 91 prime? Test 2: 91 is odd, so no. Test 3: digits 9 + 1 = 10, and 10 is not divisible by 3, so no. Test 5: it ends in 1, not 0 or 5, so no. Test 7: 7 × 13 = 91, so yes, 91 is divisible by 7. That makes 91 composite. The square-root rule is what keeps the test short.
The rule is valid because of a factorization fact: if a number n has a divisor larger than its square root, it must also have a matching divisor smaller than the square root. So once you've checked everything up to √n, anything left is prime by elimination. This is why you never need to test 91 against 13 when you've already tested 7.
Failure case worth knowing: the digit-sum test for 3 only works for 3 and 9, and it's common to see people apply "add the digits" to test for 7 or 11. It fails. The test for 11 is different (alternating digit sums), and the test for 7 is roughly a long-division exercise at this scale. Slow and correct beats fast and wrong.
For a two-digit number ending in a digit other than 0, 2, 4, 5, 6, or 8, the most likely reason it's composite is a small factor like 3 or 7. Spot-check those first, then work upward. That ordering reflects which small factors catch the most non-primes.
Why 1 Was Never Prime — and the One Textbook Era That Disagreed
Here's an information-gain point you won't find on most explainer pages: 1 wasn't always excluded everywhere. In the late 19th and early 20th centuries, some textbooks and tables listed 1 as prime. The reason was different phrasing — some mathematicians defined a prime as a number divisible only by 1 and itself, which 1 technically satisfies. The modern convention of requiring the number to exceed 1 became standard because the alternative breaks results.
If 1 were prime, the Fundamental Theorem of Arithmetic would collapse. That theorem says every integer greater than 1 can be factored into primes in exactly one way, ignoring order. If 1 counted, then 6 = 2 × 3 = 2 × 3 × 1 = 2 × 3 × 1 × 1, and uniqueness fails. Mathematicians adopted the greater-than-1 rule precisely to preserve that theorem, which is the backbone of modern algebra and cryptography.
The 2 is a special case worth flagging for anyone learning the list. It's the only even prime, because every other even number is divisible by 2 and therefore has at least three divisors. Students who've internalized "even numbers aren't prime" often write 2 off and get the list wrong. It's the exception, and it's the first item in any correct list.
Edge case that trips up beginners: 0 and negative numbers. Neither is prime, and negative numbers in particular can't be since primes are defined on positive integers by convention. A number like −7 has divisors 1, 7, and −7, which disqualifies it from the two-divisor definition as used in this context.
How to Decide Primality in a Few Lines of Reasoning
The number of divisors test, the square-root test, and the factorization approach all give the same answer — they're three routes to the same conclusion. The trick is picking the fastest one for the number you're holding. For two digits, divisor listing takes ten seconds. For four or five digits, square-root testing is the realistic option unless the number is obviously even or ends in 5.
Divisor listing works because small numbers have few divisors. Take 19: divisors are 1 and 19, two of them, so prime. Take 20: 1, 2, 4, 5, 10, and 20 — six divisors, clearly composite. Listing stops the moment you find a third divisor. If you find one before reaching the number itself, you're done.
Square-root testing works for anything. Take 143. The square root is just under 12, so test primes 2, 3, 5, 7, and 11. Divisibility by 11 is the catch here: 1 + 3 = 4, and 4 is not equal to the middle digit 4 in the alternating-sum test, but 143 ÷ 11 = 13 exactly, so 143 is composite. The alternating-sum shortcut is worth knowing because 11 is the most-missed small factor after 7.
A failure scenario worth memorizing: numbers that look prime because they end in 1, 3, 7, or 9 aren't guaranteed prime. 51 ends in 1 and is composite (3 × 17). 57 ends in 7 and is composite (3 × 19). 87 ends in 7 and is composite (3 × 29). The digit-sum test catches all three, which is why it's the first test after checking the last digit.
For larger numbers, deterministic primality tests exist and run in polynomial time. These are the tools used in web security, where prime numbers form the foundation of public-key cryptography. That application is why the question isn't merely academic — the property that makes a number prime is what makes it useful for encryption.
Where Primes Do Real Work in Modern Systems
The most consequential use of primes is the RSA algorithm, developed in 1977 by Rivest, Shamir, and Adleman, which underlies much of the encryption protecting web traffic. RSA works by multiplying two large primes together and publishing the product while keeping the primes secret; factoring the product back into its primes is believed to be computationally infeasible at current key sizes. The security rests directly on the difficulty of factorizing numbers built from two primes.
RSA keys are not brute-forceable by trial division at realistic sizes. Current common key lengths are 2048 and 4096 bits, and the primes involved have hundreds of digits. The square-root test that works in milliseconds for 143 has no practical application here — nobody is listing divisors of a 617-digit number, because the sun would burn out first.
Beyond RSA, primes appear in hash table sizing, where hash functions often use prime-sized arrays to reduce clustering of outputs, and in pseudorandom number generation and error-correcting codes. The common thread is that primes have no internal divisors, which makes them useful for spreading data evenly.
The cost computation is what makes RSA's design intuitive. Factoring a 2048-bit RSA modulus by trial division would require checking roughly the square root of that number, which is around a 1024-bit number of candidates. Comparing that candidate count to the total number of operations any computer could perform before the sun's expiration shows why factoring is described as infeasible rather than merely slow — the gap is not a matter of faster hardware.
One caveat: this applies to classical computing. Quantum algorithms offer faster factoring, and the timeline for practical large-scale attacks is a moving target — too fast-changing to pin down here. For the purposes of this article, what's stable is why primes matter in the first place.
Composite Numbers, Factors, and the Misfiled Cases
Everything that's not prime and greater than 1 is composite, which means the only three categories are: prime, composite, and the unit 1. That three-way split is the cleanest mental model, and it's the one worth carrying into exams.
Factorization matters when working with composites. Every composite number can be broken into a unique product of primes — 12 = 2 × 2 × 3, 90 = 2 × 3 × 3 × 5. The Fundamental Theorem of Arithmetic guarantees that factorization is unique for each composite, which is what allows arithmetic to be consistent in algebra and beyond.
The traditional exam trap is assuming every odd number is prime. 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 69, 75, 77, 81, 85, 87, 91, 93, and 95 are all odd composites below 100, and there are 24 of them alongside the 25 primes. The "odd = prime" heuristic more often fails than succeeds for two-digit numbers, which is why the shortcut is taught against.
The other misfiled case is 2, mentioned earlier, plus 3 and 5 which sound composite to beginners because they're small. Small numbers have few divisors by nature, so 3 has only 1 and 3, and 5 has only 1 and 5. Size is not the test.
Contrast this with the classic "is 1 prime" confusion. 1 was historically listed as prime in some early tables, and no counterexample in a modern textbook exists — the modern convention is universal, and the historic exception is a footnote worth knowing mostly so you understand why the "greater than 1" clause exists.
What Primality Talk Gets Wrong, From 0 to Negative Numbers
Boundaries are where errors live. 0 is divisible by every whole number and has infinitely many divisors, so it can't be prime; it also can't be composite because composite numbers must have a finite, countable set of divisors. The result is that 0 belongs to neither category.
Negative numbers are excluded because the prime definition applies to positive integers only. A number like −13 has divisors 1, 13, and −13 — three divisors, but the definition of "prime" is scoped to numbers above 1. That scope has remained stable for over a century.
One edge case is at 1. Its divisor count is exactly one divisor, but that divisor is 1 itself, so it fails the "two distinct divisors" test. That's why 1 is classified as a unit rather than as prime or composite. The Unicode numeral one isn't a trick answer here — the whole category is simply "not in the binary."
A failure scenario in a real classroom setting: a student computes √91 ≈ 9.54 and tests 2, 3, 5, 7, then concludes prime because 9 isn't prime and the square root isn't reached. The correct method tests primes up to 7 (since √91 < 11), which includes 7, and 7 × 13 = 91 exposes the composite. Stopping at 7 is correct, but only if 7 is actually tested.
Another trap: decimalizing the square root and rounding down. For 97, √97 ≈ 9.85; the primes to test are 2, 3, 5, 7 (since 11 > 9.85), and none divide 97, so 97 is prime. Rounding up to 11 and testing it wastes time but doesn't change the answer — 11 doesn't divide 97 either. Rounding down to 9 and skipping 9 is fine, since 9 equals 3 × 3 and 3 was already tested. The rule is "test primes up to the rounded-down square root."
The Question Behind the Question
People who ask what a prime number is usually want one of three things: a definition to memorize for a test, a way to check whether a specific number qualifies, or a list they can reference. All three are answered by the same two conditions — greater than 1, exactly two divisors — plus the trial-division shortcut by primes up to the square root.
The most useful single takeaway is the exclusion rule. A prime must have as its divisors only 1 and itself, and that means 1 is out, 0 is out, negatives are out, and the list begins at 2. Once that boundary is secure, every other question reduces to checking small factors, and small factors are the only thing that matters below 100.
Primes sit at the intersection of elementary arithmetic and serious cryptography. The same square-root rule that catches 91 as 7 × 13 scales conceptually into the factoring problem that makes RSA encryption secure, and the same uniqueness theorem that excludes 1 as prime is what makes both fields work. That continuity is worth understanding, because it explains why the definition isn't arbitrary.
Stable definitions don't change, so the math here is the same in 2026 as it was in 1950. The applications shift, but the conditions don't. Anyone learning primes can rely on the same two-condition test for the rest of their life.
FAQ
Is 1 a prime number?
No — and the exclusion is deliberate. A prime must have exactly two distinct positive divisors, and 1 has only one (itself). Historically, some early 20th-century tables did list 1 as prime, but the modern convention requires numbers greater than 1, and that rule is preserved because it keeps prime factorization unique: 6 = 2 × 3, not 2 × 3 × 1.
What is the smallest prime number?
2 is the smallest prime and the only even one, because every other even number is divisible by 2 and therefore has at least three divisors. This trips up students who've learned to associate primes with odd numbers — 2 breaks that pattern, and any correct list of primes starts with it.
How do I check if a large number is prime?
Test divisibility by every prime up to the square root of the number. If none divide it evenly, it's prime. For a number like 143, the square root is about 11.96, so test 2, 3, 5, 7, and 11 — and 11 × 13 = 143, which reveals it as composite. For numbers with hundreds of digits, that approach is impractical, and computational primality tests are used instead.
Are all odd numbers prime?
No — 9, 15, 21, 25, 27, 33, and dozens of other odd numbers below 100 are composite. Any odd number ending in 5 is divisible by 5, and any odd number whose digits sum to a multiple of 3 is divisible by 3, so 21 and 27 are caught by the digit-sum test. Oddness is a weak hint, not a proof.
What are twin primes?
Twin primes are pairs of primes that differ by 2, such as 3 and 5, 11 and 13, 41 and 43, and 71 and 73. Whether infinitely many such pairs exist remains unproven in number theory. The eye-catching detail is that 2 is the only even prime, so twin primes aside from 3 and 5 are always odd — the spacing of 2 is the narrowest possible for any larger pair.
Can a prime number be negative?
No — the definition is scoped to positive integers greater than 1. Negative numbers like −7 have divisors including 1, 7, and −7, but they don't fit the category because the standard convention excludes anything below 2. This is a convention, not a proof, and it is uniform in modern textbooks.
What's the difference between prime and composite?
Prime numbers have exactly two divisors (1 and themselves), and composite numbers have three or more. The number 1 has one divisor and belongs to neither group, which means the three categories together account for every integer. A composite like 12 has six divisors, and every composite has at least one prime factor.
How many primes are there below 100?
There are 25 primes below 100, and the largest is 97. Counted in decades, the range 1–10 and 11–20 each hold four, while 21–30 and 31–40 each hold two, showing how density wobbles rather than declining steadily as numbers climb.