Prime and Composite Numbers: Definitions and Chart to 100
Tell prime and composite numbers apart using factor pairs. Use the complete chart through 100, six examples, and practice questions.
TL;DR
A prime number has exactly two positive factors. A composite number has more than two. Both are whole numbers greater than 1. Use factor pairs or divisibility tests to tell them apart.
Key Points
- A prime has positive factors 1 and itself.
- A composite can be written as a product of two integers greater than 1.
- The number 2 is the only even prime, and 4 is the smallest composite.
- Zero and 1 are neither prime nor composite in the standard whole-number classification.
- There are 25 primes and 74 composites from 1 through 100.
What are prime and composite numbers?
An integer greater than 1 is prime if its only positive factors are 1 and the number itself. It is composite if it has another positive factor. For example, 13 is prime. The number 12 is composite because . OpenStax’s number theory chapter distinguishes these classes by their factors.
| Class | Positive factors | Example |
|---|---|---|
| Prime | Exactly two | 13 has factors 1 and 13. |
| Composite | More than two | 12 has factors 1, 2, 3, 4, 6, and 12. |
| Neither | Outside the whole-number definition for numbers greater than 1 | 1 has only one positive factor. |
Which numbers from 1 to 100 are prime or composite?
Here is a complete classification table for the positive numbers from 1 through 100. The number 1 appears in neither column.
| Numbers | Primes | Composites |
|---|---|---|
| 1–10 | 2, 3, 5, 7 | 4, 6, 8, 9, 10 |
| 11–20 | 11, 13, 17, 19 | 12, 14, 15, 16, 18, 20 |
| 21–30 | 23, 29 | 21, 22, 24, 25, 26, 27, 28, 30 |
| 31–40 | 31, 37 | 32, 33, 34, 35, 36, 38, 39, 40 |
| 41–50 | 41, 43, 47 | 42, 44, 45, 46, 48, 49, 50 |
| 51–60 | 53, 59 | 51, 52, 54, 55, 56, 57, 58, 60 |
| 61–70 | 61, 67 | 62, 63, 64, 65, 66, 68, 69, 70 |
| 71–80 | 71, 73, 79 | 72, 74, 75, 76, 77, 78, 80 |
| 81–90 | 83, 89 | 81, 82, 84, 85, 86, 87, 88, 90 |
| 91–100 | 97 | 91, 92, 93, 94, 95, 96, 98, 99, 100 |
The prime column has 25 entries. Since there are 99 values from 2 through 100, the other are composite. A sieve reproduces the table by crossing out multiples of the primes through . Virginia Tech’s algorithm lesson shows why crossing out can start at the square of each prime.
How can you tell whether a number is prime or composite?
You only need to find one nontrivial factor to prove a number composite. Try divisibility by 2, 3, 5, and other primes no larger than the square root. If with both factors greater than 1, the smaller factor cannot exceed . A check up through that boundary can therefore establish primality.
OpenStax’s multiples and factors lesson lists divisibility tests. An even number greater than 2 is composite, because 2 divides it. An odd number can also be composite. For instance, and . The CBSE applied mathematics chapter also distinguishes prime numbers from numbers with further factors.
For larger numbers, use a sieve to find many primes up to a limit, or follow the prime number formulas guide for other tests and why simple digit patterns do not prove primality.
Why do factorization and relatively prime pairs matter?
Every integer greater than 1 is either prime or a product of primes. Its prime factorization is unique up to the order of the factors. For example, . The prime factorization guide shows how to split a composite into smaller factors until all remaining factors are prime.
Two integers are relatively prime if their greatest common divisor is 1. The words describe the pair. For example, 8 and 9 are each composite, but their prime factors are different. OpenStax’s factorization material uses prime factors to compare multiples and common factors.
Examples of Prime and Composite Numbers
Example 1
Is 17 prime?
- The only primes at or below are 2 and 3.
- Seventeen is odd and its digit sum is 8, which is not divisible by 3.
- Neither test finds a factor. Therefore 17 is prime.
Example 2
Is 21 prime or composite?
- It is odd, so divisibility by 2 does not settle the question.
- Its digit sum is , so 3 divides it.
- Since , it is composite.
Example 3
Is 49 prime?
- Its square root is 7.
- Stopping before 7 would miss a divisor exactly at the boundary.
- Because , it is composite.
Example 4
Find the prime factorization of 84.
- Divide by 2 to get .
- Divide 42 by 2 again to get .
- Since , the prime factorization is .
Example 5
Test whether 97 is prime.
- Its square root lies between 9 and 10.
- Test the primes 2, 3, 5, and 7. The divisions give remainders 1, 1, 2, and 6.
- None divides evenly, so 97 is prime.
Example 6
Can 8 and 9 be relatively prime if both are composite?
- The prime factorization of 8 is .
- The prime factorization of 9 is .
- There is no common prime factor. Their greatest common divisor is 1, so they are relatively prime.
What mistakes should you check for?
Mistake 1: Counting 1 and itself as two factors when
For , those descriptions name the same factor. One has one distinct positive factor. See why one is neither prime nor composite for more on this exception.
Mistake 2: Classifying every odd number as prime
Odd values avoid divisibility by 2. They may still have other factors, as shows. Check odd prime divisors through the square root.
Mistake 3: Checking only divisors below the square root
A perfect square such as 49 may have no other small factor. Include the square root itself if it is an integer.
Try It Yourself
- Classify 29 as prime or composite.
- Find a nontrivial factor of 91.
- Find the prime factorization of 100.
Answers and Reasoning
- It is prime. None of 2, 3, or 5 divides 29.
- , so 7 and 13 are both nontrivial factors.
- .
Questions About Primes and Composites
What is the smallest prime? What is the smallest composite?
The smallest prime is 2. The smallest composite is 4 because .
Is zero a composite number?
No. The standard classification uses whole numbers greater than 1. Zero lies outside it.
Are there infinitely many primes?
Yes. If a finite list included every prime, the product of all of them plus 1 would be divisible by none of the listed primes. That new number is greater than 1, so its factorization contains a prime that was missing from the list.
Conclusion
- Use distinct positive factors to classify a whole number greater than 1.
- Test possible prime divisors through the square root.
- Use prime factors to explain why a number is composite or why a pair has no common factor above 1.
Read More
Research Behind This Article
- OpenStax, Contemporary Mathematics: Prime and Composite Numbers. OpenStax
- Virginia Tech OpenDSA, Senior Algorithms: Finding Prime Numbers (Spring 2025). Virginia Tech
- OpenStax, Prealgebra 2e: Find Multiples and Factors. OpenStax
- Central Board of Secondary Education, Applied Mathematics: Numbers and Quantification. CBSE Academic
- OpenStax, Prealgebra 2e: Prime Factorization and the Least Common Multiple. OpenStax