Math glossary

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 12=3·412=3\cdot4. 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.
A three-by-four array of twelve dots and a single row of thirteen dots illustrating factor pairs
Twelve can form a rectangle with both sides longer than one. Thirteen can only form a 1-by-13 array, up to rotation.

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 99−25=7499-25=74 are composite. A sieve reproduces the table by crossing out multiples of the primes through 100=10\sqrt{100}=10. 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 n=abn=ab with both factors greater than 1, the smaller factor cannot exceed n\sqrt n. 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, 9=3·39=3\cdot3 and 35=5·735=5\cdot7. 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, 84=22·3·784=2^2\cdot3\cdot7. 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?

  1. The only primes at or below 17\sqrt{17} are 2 and 3.
  2. Seventeen is odd and its digit sum is 8, which is not divisible by 3.
  3. Neither test finds a factor. Therefore 17 is prime.

Example 2

Is 21 prime or composite?

  1. It is odd, so divisibility by 2 does not settle the question.
  2. Its digit sum is 2+1=32+1=3, so 3 divides it.
  3. Since 21=3·721=3\cdot7, it is composite.

Example 3

Is 49 prime?

  1. Its square root is 7.
  2. Stopping before 7 would miss a divisor exactly at the boundary.
  3. Because 49=7249=7^2, it is composite.

Example 4

Find the prime factorization of 84.

  1. Divide by 2 to get 84=2·4284=2\cdot42.
  2. Divide 42 by 2 again to get 84=22·2184=2^2\cdot21.
  3. Since 21=3·721=3\cdot7, the prime factorization is 22·3·72^2\cdot3\cdot7.

Example 5

Test whether 97 is prime.

  1. Its square root lies between 9 and 10.
  2. Test the primes 2, 3, 5, and 7. The divisions give remainders 1, 1, 2, and 6.
  3. None divides evenly, so 97 is prime.

Example 6

Can 8 and 9 be relatively prime if both are composite?

  1. The prime factorization of 8 is 232^3.
  2. The prime factorization of 9 is 323^2.
  3. 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 n=1n=1

For n=1n=1, 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 45=5·945=5\cdot9 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

  1. Classify 29 as prime or composite.
  2. Find a nontrivial factor of 91.
  3. Find the prime factorization of 100.

Answers and Reasoning

  1. It is prime. None of 2, 3, or 5 divides 29.
  2. 91=7·1391=7\cdot13, so 7 and 13 are both nontrivial factors.
  3. 100=102=(2·5)2=22·52100=10^2=(2\cdot5)^2=2^2\cdot5^2.

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 4=2·24=2\cdot2.

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

  1. OpenStax, Contemporary Mathematics: Prime and Composite Numbers. OpenStax
  2. Virginia Tech OpenDSA, Senior Algorithms: Finding Prime Numbers (Spring 2025). Virginia Tech
  3. OpenStax, Prealgebra 2e: Find Multiples and Factors. OpenStax
  4. Central Board of Secondary Education, Applied Mathematics: Numbers and Quantification. CBSE Academic
  5. OpenStax, Prealgebra 2e: Prime Factorization and the Least Common Multiple. OpenStax