Mathwords logoMathwords

Prime Numbers — Definition, Formula & Examples

A prime number is a whole number greater than 1 that can only be divided evenly by 1 and itself. Examples include 2, 3, 5, 7, 11, and 13.

An integer p>1p > 1 is prime if and only if its only positive divisors are 11 and pp. Equivalently, pp is prime if whenever p=abp = ab for positive integers aa and bb, then a=1a = 1 or b=1b = 1.

How It Works

To check whether a number nn is prime, test whether any integer from 22 up to n\sqrt{n} divides it evenly. If none do, the number is prime. You only need to check up to n\sqrt{n} because if n=a×bn = a \times b and both factors are larger than n\sqrt{n}, their product would exceed nn. Any whole number greater than 1 that is not prime is called composite, meaning it can be broken into smaller factors.

Worked Example

Problem: Is 29 a prime number?
Step 1: Find the square root of 29 to determine which divisors to test.
295.39\sqrt{29} \approx 5.39
Step 2: Test all primes from 2 up to 5: check 2, 3, and 5.
29÷2=14.5,29÷39.67,29÷5=5.829 \div 2 = 14.5, \quad 29 \div 3 \approx 9.67, \quad 29 \div 5 = 5.8
Step 3: None of these divisions produce a whole number, so no integer from 2 to 5 divides 29 evenly.
Answer: 29 is a prime number because its only positive divisors are 1 and 29.

Why It Matters

Prime numbers are the building blocks of all whole numbers — every integer greater than 1 can be written as a unique product of primes (the Fundamental Theorem of Arithmetic). Modern encryption systems like RSA rely on the difficulty of factoring large numbers into their prime components, making primes essential to internet security.

Common Mistakes

Mistake: Thinking 1 is a prime number.
Correction: By definition, a prime must be greater than 1. The number 1 has only one positive divisor (itself), while primes must have exactly two: 1 and the number itself.