Prime & composite numbers
Theory
A prime number has exactly two factors, \(1\) and itself; a composite number has more than two. Count a number's factors to sort it. The number \(1\) is neither, and \(2\) is the only even prime.
A factor divides a number exactly, with no remainder. Count a number's factors to sort it.
A prime number has exactly two factors: \(1\) and the number itself.
A composite number has more than two factors.
The number \(1\) has only one factor, so it is neither prime nor composite. The number \(2\) is the only even prime.
List every factor, count them, then sort the number.
| Number | Factors | How many | Type |
|---|---|---|---|
| \(1\) | \(1\) | \(1\) | neither |
| \(2\) | \(1, 2\) | \(2\) | prime |
| \(7\) | \(1, 7\) | \(2\) | prime |
| \(12\) | \(1, 2, 3, 4, 6, 12\) | \(6\) | composite |
How to sort a number
- List the factors. Find every number that divides it exactly.
- Count them. Exactly two means prime; more than two means composite.
- Check the special cases. \(1\) is neither, and \(2\) is the only even prime.
Nothing but \(1\) and \(23\) divides it. Two factors, so \(23\) is prime.
| \text{factors of }23 | \(=\) | 1,\ 23 |
Four factors, so \(21\) is composite.
| \text{factors of }21 | \(=\) | 1,\ 3,\ 7,\ 21 |
Only one factor, so it fits neither group.
| \text{factors of }1 | \(=\) | 1 |
Every even number above \(2\) also has \(2\) as a factor, so the answer is \(2\).
| \text{factors of }2 | \(=\) | 1,\ 2 |
Common pitfalls
Frequently asked questions
What is a prime number?
A number with exactly two factors, \(1\) and itself. \(7\) is prime because only \(1\) and \(7\) divide it.
What is a composite number?
A number with more than two factors. \(12\) is composite because \(1, 2, 3, 4, 6\) and \(12\) all divide it.
Is 1 prime or composite?
Neither. \(1\) has only one factor, itself, so it does not fit either group.
Why is 2 special?
\(2\) is the only even prime. Every other even number also has \(2\) as a factor, giving it more than two factors.
How do you check if a number is prime?
Try dividing by the small primes \(2, 3, 5\) and \(7\). If any divides it exactly, it is composite; if none does, it is prime.