Skip to main content

Prime Numbers and Prime Factorization — Complete Guide

Grade: 6-7 | Topic: Arithmetic

What You Will Learn

Prime numbers are the building blocks of all whole numbers. In this guide you will learn how to identify prime and composite numbers, how to test whether a number is prime, how to build a factor tree, and how to write prime factorization using exponents — skills that underpin fractions, LCM, GCF, and algebra.

Theory

Prime and composite numbers

A prime number is a whole number greater than 1 with exactly two factors: 1 and itself.

A composite number is a whole number greater than 1 with more than two factors — it can be divided evenly by at least one number besides 1 and itself.

The number 1 is special: it is neither prime nor composite.

NumberFactorsType
21, 2Prime
31, 3Prime
41, 2, 4Composite
71, 7Prime
121, 2, 3, 4, 6, 12Composite

The first ten prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

Note: 2 is the only even prime — every other even number is divisible by 2, giving it at least 3 factors.

How to test whether a number is prime

To check if a number nn is prime, test divisibility by every prime up to n\sqrt{n}. If none divide evenly, nn is prime.

For n=37n = 37: 376.1\sqrt{37} \approx 6.1, so test 2, 3, 5.

  • 37 ÷ 2 = 18.5 (no)
  • 37 ÷ 3 = 12.3… (no)
  • 37 ÷ 5 = 7.4 (no)

No prime up to 37\sqrt{37} divides evenly, so 37 is prime.

Prime factorization

The prime factorization of a composite number expresses it as a product of prime numbers. By the Fundamental Theorem of Arithmetic, every whole number greater than 1 has exactly one prime factorization (ignoring order).

Method 1 — Division ladder: Divide repeatedly by the smallest prime that goes in.

60÷2=3060 \div 2 = 30 30÷2=1530 \div 2 = 15 15÷3=515 \div 3 = 5 5÷5=15 \div 5 = 1

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

Method 2 — Factor tree: Split the number into any two factors, then keep splitting composite branches until all branches are prime.

For 60:

  • 60 → 6 × 10
  • 6 → 2 × 3
  • 10 → 2 × 5
  • Primes collected: 2, 3, 2, 5 → 22×3×52^2 \times 3 \times 5

Both methods give the same result.

Writing prime factorization with exponents

When a prime appears more than once, use exponents:

22×3×52^2 \times 3 \times 5

means 2×2×3×5=602 \times 2 \times 3 \times 5 = 60.

Worked Examples

Example 1 — Is 51 prime or composite?

517.1\sqrt{51} \approx 7.1, so test 2, 3, 5, 7.

  • 51 ÷ 2 = 25.5 (no)
  • 51 ÷ 3 = 17 ✓

Since 3 divides 51 evenly, 51 is composite: 51=3×1751 = 3 \times 17.

Example 2 — Prime factorization of 84 (division ladder)

84÷2=4284 \div 2 = 42 42÷2=2142 \div 2 = 21 21÷3=721 \div 3 = 7 7÷7=17 \div 7 = 1

Answer: 84=22×3×784 = 2^2 \times 3 \times 7

Example 3 — Prime factorization of 180 (factor tree)

Split: 180 = 4 × 45

  • 4 = 2 × 2
  • 45 = 9 × 5 = 3 × 3 × 5

Collect all primes: 2, 2, 3, 3, 5

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

Check: 4×9×5=4×45=1804 \times 9 \times 5 = 4 \times 45 = 180. ✓

Example 4 — Using prime factorization to find the GCF

Find the GCF of 48 and 60.

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

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

GCF = product of shared primes with the lower exponent = 22×3=122^2 \times 3 = 12.

Common Mistakes

Mistake 1 — Forgetting that 1 is not prime

❌ Writing the prime factorization of 12 as 1×2×2×31 \times 2 \times 2 \times 3.

12=22×312 = 2^2 \times 3. The number 1 is never included in prime factorization.

Mistake 2 — Stopping at a composite branch

❌ Factor tree for 36: 36 → 4 × 9, then stopping at 4 and 9.

✅ Continue branching: 4 = 2 × 2 and 9 = 3 × 3. All branches must end in primes: 36=22×3236 = 2^2 \times 3^2.

Mistake 3 — Thinking 2 is not prime because it is even

❌ Listing the primes as 3, 5, 7, 11… (skipping 2).

✅ 2 is prime — it has exactly two factors: 1 and 2. It is also the only even prime.

Practice Problems

Problem 1: Is 97 prime or composite?

Show Answer

979.8\sqrt{97} \approx 9.8, so test 2, 3, 5, 7.

  • 97 ÷ 2 = 48.5 (no)
  • 97 ÷ 3 = 32.3… (no)
  • 97 ÷ 5 = 19.4 (no)
  • 97 ÷ 7 = 13.9 (no)

97 is prime.

Problem 2: Find the prime factorization of 72.

Show Answer

72÷2=3672 \div 2 = 36, 36÷2=1836 \div 2 = 18, 18÷2=918 \div 2 = 9, 9÷3=39 \div 3 = 3, 3÷3=13 \div 3 = 1

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

Problem 3: Find the prime factorization of 126.

Show Answer

126÷2=63126 \div 2 = 63, 63÷3=2163 \div 3 = 21, 21÷3=721 \div 3 = 7

126=2×32×7126 = 2 \times 3^2 \times 7

Problem 4: Use prime factorization to find the LCM of 12 and 18.

Show Answer

12=22×312 = 2^2 \times 3

18=2×3218 = 2 \times 3^2

LCM = product of all primes with the higher exponent = 22×32=4×9=362^2 \times 3^2 = 4 \times 9 = 36.

Problem 5: List all prime numbers between 30 and 50.

Show Answer

31, 37, 41, 43, 47

Summary

  • A prime number has exactly two factors: 1 and itself. The number 1 is neither prime nor composite.
  • To test primality, check divisibility by all primes up to n\sqrt{n}.
  • Prime factorization writes a number as a product of primes — use a division ladder or factor tree.
  • Write repeated primes using exponents: 2×2×3=22×32 \times 2 \times 3 = 2^2 \times 3.
  • Prime factorization is the foundation for finding GCF and LCM.

Need help with prime numbers or factorization? Take a photo of your math problem and MathPal will solve it step by step. Open MathPal