Arithmetic

Prime Numbers and Prime Factorization

Last updated: March 2026 · Beginner
Before you start

You should be comfortable with:

A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. A composite number has more than two factors. Prime factorization breaks any composite number down into a product of primes — like finding the atomic building blocks of a number.

Prime vs. Composite

NumberFactorsType
21, 2Prime
31, 3Prime
41, 2, 4Composite
51, 5Prime
61, 2, 3, 6Composite
71, 7Prime
81, 2, 4, 8Composite
91, 3, 9Composite
101, 2, 5, 10Composite

Special cases:

  • 1 is neither prime nor composite (it has only one factor)
  • 2 is the only even prime number (every other even number is divisible by 2)

Prime Numbers Under 100

2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,972, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

That is 25 prime numbers under 100. The rest (other than 1) are composite.

How to Test if a Number Is Prime

To check whether a number nn is prime, try dividing by every prime up to n\sqrt{n}. If none divide evenly, the number is prime.

Example 1: Is 29 prime?

295.4\sqrt{29} \approx 5.4, so check primes up to 5: 2, 3, 5.

  • 29÷2=14.529 \div 2 = 14.5 — not divisible
  • 29÷39.6729 \div 3 \approx 9.67 — not divisible
  • 29÷5=5.829 \div 5 = 5.8 — not divisible

No prime factor found. 29 is prime.

Example 2: Is 51 prime?

517.1\sqrt{51} \approx 7.1, so check primes up to 7: 2, 3, 5, 7.

  • 51÷2=25.551 \div 2 = 25.5 — no
  • 51÷3=1751 \div 3 = 17yes!

51=3×1751 = 3 \times 17. 51 is composite.

Prime Factorization

Every composite number can be written as a product of prime numbers. This representation is unique (up to the order of the factors) — this is called the Fundamental Theorem of Arithmetic.

The Factor Tree Method

  1. Write the number at the top
  2. Split it into any two factors
  3. If a factor is prime, circle it (it is done)
  4. If a factor is composite, split it again
  5. Continue until all branches end in primes

Example 3: Prime Factorization of 60

Start: 60=6×1060 = 6 \times 10

Split 6: 6=2×36 = 2 \times 3 (both prime)

Split 10: 10=2×510 = 2 \times 5 (both prime)

60=2×3×2×5=22×3×560 = 2 \times 3 \times 2 \times 5 = 2^2 \times 3 \times 5

Example 4: Prime Factorization of 72

Start: 72=8×972 = 8 \times 9

Split 8: 8=2×4=2×2×28 = 2 \times 4 = 2 \times 2 \times 2

Split 9: 9=3×39 = 3 \times 3

72=2×2×2×3×3=23×3272 = 2 \times 2 \times 2 \times 3 \times 3 = 2^3 \times 3^2

Example 5: Prime Factorization of 180

Start: 180=18×10180 = 18 \times 10

18=2×9=2×3×318 = 2 \times 9 = 2 \times 3 \times 3

10=2×510 = 2 \times 5

180=2×3×3×2×5=22×32×5180 = 2 \times 3 \times 3 \times 2 \times 5 = 2^2 \times 3^2 \times 5

The Division Method (Alternative)

Divide by the smallest prime that works, then divide the quotient, and repeat:

180÷2=90180 \div 2 = 90 90÷2=4590 \div 2 = 45 45÷3=1545 \div 3 = 15 15÷3=515 \div 3 = 5 5÷5=15 \div 5 = 1

180=2×2×3×3×5=22×32×5180 = 2 \times 2 \times 3 \times 3 \times 5 = 2^2 \times 3^2 \times 5

Both methods give the same result.

Why Prime Factorization Matters

Prime factorization is the key to:

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Is 37 prime or composite?

376.1\sqrt{37} \approx 6.1. Check 2, 3, 5: none divide 37 evenly.

37 is prime.

Problem 2: Is 87 prime or composite?

87÷3=2987 \div 3 = 29. Divisible by 3.

87 is composite (87=3×2987 = 3 \times 29).

Problem 3: Find the prime factorization of 48

48=2×24=2×2×12=2×2×2×6=2×2×2×2×348 = 2 \times 24 = 2 \times 2 \times 12 = 2 \times 2 \times 2 \times 6 = 2 \times 2 \times 2 \times 2 \times 3

48=24×348 = 2^4 \times 3

Problem 4: Find the prime factorization of 150

150÷2=75150 \div 2 = 75, 75÷3=2575 \div 3 = 25, 25÷5=525 \div 5 = 5, 5÷5=15 \div 5 = 1

150=2×3×52150 = 2 \times 3 \times 5^2

Problem 5: Find the prime factorization of 360

360÷2=180360 \div 2 = 180, 180÷2=90180 \div 2 = 90, 90÷2=4590 \div 2 = 45, 45÷3=1545 \div 3 = 15, 15÷3=515 \div 3 = 5, 5÷5=15 \div 5 = 1

360=23×32×5360 = 2^3 \times 3^2 \times 5

Key Takeaways

  • Prime numbers have exactly 2 factors (1 and themselves); composite numbers have more
  • 1 is neither prime nor composite; 2 is the only even prime
  • To test for primality, check divisibility by primes up to n\sqrt{n}
  • Prime factorization expresses any composite number as a product of primes
  • Use the factor tree or division method — both give the same result
  • Every number has exactly one prime factorization (Fundamental Theorem of Arithmetic)

Return to Arithmetic for more foundational math topics.

Last updated: March 29, 2026