Skip to content

What Is a Prime Number? Definition, Examples & Properties

Start with 2, not 1. That small detail keeps arithmetic clean. A prime number is a whole number greater than 1 with exactly two positive divisors: 1 and itself. So 2, 3, 5, 7, and 11 are prime; 4, 6, 8, and 9 are composite because each has an extra divisor.

Definition and First Examples

A divisor is a whole number that divides another whole number with no remainder. Under the prime definition, a number qualifies only when its divisor list is as short as possible without falling to 1. For 5, the divisors are 1 and 5. For 9, the divisors are 1, 3, and 9, so 9 is not prime.

This makes primes easy to describe and harder to predict. They are simple to define, yet their pattern across the integers is uneven and full of surprises.

Prime Examples

  • Single-digit primes: 2, 3, 5, 7
  • Two-digit primes: 11, 13, 17, 19, 23, 29
  • A larger example: 97 is prime because no whole number other than 1 and 97 divides it evenly.

Common Non-Examples

  • 1 is not prime.
  • 4 is composite because 4 = 2 × 2.
  • 15 is composite because 15 = 3 × 5.
  • 21 is composite because 21 = 3 × 7.

Basic Properties That Always Hold

Several facts appear again and again in number theory. They are short statements, but each describes a basic part of prime-number behavior.

  • 2 is the only even prime. Every other even number is divisible by 2, so it has more than two positive divisors.
  • Every prime greater than 2 is odd.
  • Every whole number greater than 1 has at least one prime divisor.
  • If a prime is greater than 3, it must have the form 6k − 1 or 6k + 1. The reverse is not true: 25 = 6 × 4 + 1, yet 25 is composite.
  • Any two distinct primes are co-prime because they do not share a common divisor other than 1.

These properties do not generate every prime, but they remove many composite candidates and explain why primes behave differently from ordinary odd numbers.

Why 1 Is Not Prime

The exclusion of 1 is not arbitrary. It protects one of the most useful facts in arithmetic: every integer greater than 1 breaks into prime factors in one and only one way, apart from order.

If 1 were called prime, that uniqueness would disappear. The number 6 could be written as 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3, with no natural stopping point. By keeping 1 outside the prime list, mathematics keeps prime factorization unique.

Prime Numbers and Unique Factorization

Every integer greater than 1 is either prime itself or can be written as a product of primes. That factorization is unique up to the order of the factors. This result is called the Fundamental Theorem of Arithmetic.

Here is what that looks like in practice:

  • 60 = 2 × 2 × 3 × 5 = 22 × 3 × 5
  • 84 = 2 × 2 × 3 × 7 = 22 × 3 × 7
  • 97 stays as 97 because it is prime.

Prime factorization appears in divisibility questions, greatest common divisors, least common multiples, modular arithmetic, algebraic structures, and computational methods. It gives every positive integer greater than 1 a stable factor structure.

Main facts that define prime numbers and their role in number theory.
TopicSummary
Formal DefinitionInteger greater than 1 with exactly two positive divisors
Smallest Prime2
Only Even Prime2
Is 1 Prime?No
Infinite Set?Yes
Prime Counting Functionπ(x) counts primes less than or equal to x
Typical Density Near xAbout 1 / ln(x)
Classical SieveSieve of Eratosthenes
Common Fast Test MethodProbable-prime testing, often with repeated checks
Modern UsesCryptography, finite fields, coding theory, and algorithms

How Primes Are Spread Among Integers

Prime numbers never run out. Euclid proved this more than two thousand years ago: given any finite list of primes, arithmetic can produce a number with a prime divisor outside that list. The set of primes is therefore infinite.

Infinite does not mean frequent. As numbers grow, primes become less common. Their positions do not follow a simple repeating pattern, and there is no elementary formula that lists every prime and only primes in order.

Mathematicians describe this thinning pattern with the prime-counting function π(x), which counts how many primes are less than or equal to x. The Prime Number Theorem states that π(x) behaves like x / ln(x) for large x. This means the local density of primes near x is approximately 1 / ln(x).

  • π(10) = 4
  • π(100) = 25
  • π(1000) = 168

These counts show how prime density changes. Primes are packed closely near the beginning of the number line, while wider gaps appear as the numbers grow.

Related Prime Families

Number theory groups some primes into families based on formulas or relationships between neighboring values.

Twin Primes

Twin primes are pairs such as (3, 5), (5, 7), and (11, 13). The difference between the two primes is 2. It is still unknown whether infinitely many twin-prime pairs exist.

Mersenne Primes

A Mersenne prime has the form 2p − 1, where p is prime and the resulting number is also prime. The condition on p is necessary but not sufficient. For example, 211 − 1 = 2047, and 2047 is composite because 2047 = 23 × 89.

Fermat Primes

Fermat primes have the form 22n + 1. The known prime values in this family are 3, 5, 17, 257, and 65537. Many later Fermat numbers have been shown to be composite.

Sophie Germain and Safe Primes

If p is prime and 2p + 1 is also prime, then p is called a Sophie Germain prime, while 2p + 1 is called a safe prime. These numbers appear in algebra and in some cryptographic constructions.

How Mathematicians Check Primality

A basic primality check uses the following fact: if a number n is composite, then it has at least one factor not larger than √n. Testing possible divisors beyond the square root is therefore unnecessary. For small numbers, this method works well. A value can also be tested with the prime number checker.

When many small primes are needed, the classical method is the Sieve of Eratosthenes. It starts with a range of integers, removes multiples of each discovered prime, and leaves the prime numbers behind.

For very large integers, mathematicians and computer scientists use faster tests. Miller–Rabin is widely used because repeated rounds can reduce the probability of a false prime result to an extremely low level. Deterministic polynomial-time tests also exist, including AKS, although practical software often uses faster methods suited to the size and type of number being tested.

Prime Numbers in Modern Mathematics and Computing

Arithmetic modulo a prime has a useful property: every nonzero residue has a multiplicative inverse. This creates a finite field, which is why prime moduli appear often in algebra and number theory.

Prime numbers also appear throughout computing. Public-key systems such as RSA use very large prime factors and rely on the difficulty of factoring the resulting product. Finite fields of prime size or prime-power size appear in coding theory, elliptic-curve systems, error correction, and algorithm design. Primes are not limited to classroom arithmetic; they are used in working computational systems.

Prime Numbers, Composite Numbers, and Co-Primes

These terms are related, but they do not describe the same thing.

  • Prime number: a single integer greater than 1 with exactly two positive divisors.
  • Composite number: a single integer greater than 1 with more than two positive divisors.
  • Co-prime numbers: a pair of integers whose greatest common divisor is 1.

A number does not need to be prime to belong to a co-prime pair. For example, 8 and 15 are co-prime because they share no common positive divisor other than 1, even though both numbers are composite.

Prime describes one number. Co-prime describes a relationship between two or more numbers.

Common Questions About Prime Numbers

Is 1 a prime number?

No. A prime number must have exactly two positive divisors. The number 1 has only one positive divisor, namely 1 itself. Excluding 1 also keeps prime factorization unique.

Is 2 the only even prime?

Yes. Any even number greater than 2 is divisible by 2 and therefore has at least three positive divisors: 1, 2, and the number itself.

Are all odd numbers prime?

No. Many odd numbers are composite, including 9, 15, 21, and 25. Being odd removes divisibility by 2, but it does not remove other possible divisors.

Do prime numbers ever end?

No. There are infinitely many prime numbers. Euclid proved that any finite list of primes can be extended, so the list never stops.

What is the difference between a prime number and co-prime numbers?

A prime number is one number with exactly two positive divisors. Co-prime numbers are numbers whose greatest common divisor is 1. A pair can be co-prime even when neither number is prime.