Pre Algebra

Prime Factorization

Last updated: March 2026 · Beginner
Before you start

You should be comfortable with:

Real-world applications
Electrical

Voltage drop, wire sizing, load balancing

Every whole number greater than 11 is either prime or composite, and every composite number can be broken down into a unique product of prime factors. This idea — called the fundamental theorem of arithmetic — is one of the most important facts in all of mathematics. Prime factorization is the tool that makes GCF and LCM calculations systematic, simplifies fractions efficiently, and builds the foundation for algebra topics like factoring polynomials.

Prime vs Composite Numbers

Prime Numbers

A prime number is a whole number greater than 11 that has exactly two factors: 11 and itself.

The first several prime numbers are:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 2,\ 3,\ 5,\ 7,\ 11,\ 13,\ 17,\ 19,\ 23,\ 29,\ 31,\ 37,\ 41,\ 43,\ 47,\ \ldots

Key facts about primes:

  • 22 is the only even prime. Every other even number is divisible by 22 (and therefore has more than two factors).
  • 11 is neither prime nor composite. By convention, 11 is excluded because it has only one factor (itself).
  • There are infinitely many primes. No matter how far you count, there are always more primes ahead.

Composite Numbers

A composite number is a whole number greater than 11 that has more than two factors. In other words, it can be divided evenly by at least one number other than 11 and itself.

Examples: 4,6,8,9,10,12,14,15,4, 6, 8, 9, 10, 12, 14, 15, \ldots

Example 1: Classify Numbers as Prime or Composite

Classify: 1717, 2121, 22, 5151

  • 1717: factors are 11 and 1717 only. Prime.
  • 2121: 21=3×721 = 3 \times 7, so it has factors 1,3,7,211, 3, 7, 21. Composite.
  • 22: factors are 11 and 22 only. Prime. (The smallest and only even prime.)
  • 5151: digit sum =5+1=6= 5 + 1 = 6, divisible by 33. 51=3×1751 = 3 \times 17. Composite.

How to Test if a Number Is Prime

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

Example 2: Is 97 Prime?

979.85\sqrt{97} \approx 9.85, so test primes up to 99: that means 2,3,5,72, 3, 5, 7.

  • 97÷2=48.597 \div 2 = 48.5 — not divisible
  • 97÷397 \div 3: digit sum =9+7=16= 9 + 7 = 16, not divisible by 33
  • 97÷5=19.497 \div 5 = 19.4 — not divisible
  • 97÷713.8697 \div 7 \approx 13.86 — not divisible

No prime up to 99 divides 9797, so 9797 is prime.

The Sieve of Eratosthenes

The Sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to a given limit. It works by systematically eliminating composite numbers.

How it works (finding primes up to 30):

  1. Write out all numbers from 22 to 3030
  2. Circle 22 (prime). Cross out every multiple of 22: 4,6,8,10,12,14,16,18,20,22,24,26,28,304, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30
  3. The next uncrossed number is 33 (prime). Cross out every multiple of 33 not already crossed: 9,15,21,279, 15, 21, 27
  4. The next uncrossed number is 55 (prime). Cross out every multiple of 55 not already crossed: 2525
  5. 305.5\sqrt{30} \approx 5.5, so we stop checking here

Primes up to 30: 2,3,5,7,11,13,17,19,23,292, 3, 5, 7, 11, 13, 17, 19, 23, 29

The sieve is efficient because each step eliminates many composites at once. For finding all primes up to a moderate number (say, 100100 or 200200), it is faster than testing each number individually.

Factor Trees

A factor tree is a diagram that breaks a composite number down into its prime factors step by step. At each level, you split a number into two factors. You keep splitting until every branch ends at a prime.

Example 3: Factor Tree for 60

Start with 6060 and find any factor pair:

60=2×3060 = 2 \times 30

22 is prime (stop). Now break down 3030:

30=2×1530 = 2 \times 15

22 is prime (stop). Now break down 1515:

15=3×515 = 3 \times 5

Both 33 and 55 are prime (stop).

Reading the primes at the ends of all branches:

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

Example 4: Factor Tree for 72

72=8×972 = 8 \times 9

Break down 88:

8=2×4=2×2×2=238 = 2 \times 4 = 2 \times 2 \times 2 = 2^3

Break down 99:

9=3×3=329 = 3 \times 3 = 3^2

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

Does the Starting Split Matter?

No. You can start with any factor pair and you will always arrive at the same set of prime factors. This is guaranteed by the fundamental theorem of arithmetic.

For example, starting 7272 differently:

72=2×36=2×6×6=2×(2×3)×(2×3)=23×3272 = 2 \times 36 = 2 \times 6 \times 6 = 2 \times (2 \times 3) \times (2 \times 3) = 2^3 \times 3^2

Same result.

Example 5: Factor Tree for 180

180=10×18180 = 10 \times 18

Break down 1010: 10=2×510 = 2 \times 5

Break down 1818: 18=2×9=2×3×318 = 2 \times 9 = 2 \times 3 \times 3

Combine:

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

Writing Prime Factorization with Exponents

When the same prime appears multiple times, use exponents to write the factorization compactly.

NumberFactor Tree ResultWith Exponents
24242×2×2×32 \times 2 \times 2 \times 323×32^3 \times 3
45453×3×53 \times 3 \times 532×53^2 \times 5
1001002×2×5×52 \times 2 \times 5 \times 522×522^2 \times 5^2
3603602×2×2×3×3×52 \times 2 \times 2 \times 3 \times 3 \times 523×32×52^3 \times 3^2 \times 5

Convention: Write primes in ascending order (22 before 33 before 55, etc.).

Using Prime Factorization to Find GCF and LCM

Prime factorization makes GCF and LCM calculations straightforward, especially for larger numbers where listing all factors or multiples would be tedious.

GCF: Shared Primes, Smaller Exponents

Example 6: GCF of 84 and 126

84=22×3×784 = 2^2 \times 3 \times 7 126=2×32×7126 = 2 \times 3^2 \times 7

Shared primes: 22, 33, 77.

  • 22: smaller exponent is 212^1
  • 33: smaller exponent is 313^1
  • 77: smaller exponent is 717^1

GCF(84,126)=2×3×7=42\text{GCF}(84, 126) = 2 \times 3 \times 7 = 42

LCM: All Primes, Larger Exponents

Example 7: LCM of 84 and 126

Using the same factorizations:

  • 22: larger exponent is 222^2
  • 33: larger exponent is 323^2
  • 77: larger exponent is 717^1

LCM(84,126)=22×32×7=4×9×7=252\text{LCM}(84, 126) = 2^2 \times 3^2 \times 7 = 4 \times 9 \times 7 = 252

Verification using the relationship:

GCF×LCM=42×252=10,584\text{GCF} \times \text{LCM} = 42 \times 252 = 10{,}584 84×126=10,584Checks out.84 \times 126 = 10{,}584 \quad \text{Checks out.}

The Fundamental Theorem of Arithmetic

The fundamental theorem of arithmetic states:

Every integer greater than 11 is either a prime or can be written as a product of primes in exactly one way (ignoring the order of the factors).

This means:

  • Existence: Every composite number can be broken into primes
  • Uniqueness: There is only one way to do it (the same primes with the same exponents)

For example, 360=23×32×5360 = 2^3 \times 3^2 \times 5 is the only prime factorization of 360360. No matter which factor tree you draw, you always end up with three 22s, two 33s, and one 55.

This uniqueness is what makes prime factorization so powerful — it gives every number a “fingerprint” that you can use reliably for GCF, LCM, and fraction operations.

Real-World Application: Electrician — Wire Bundling

An electrician has three cable runs: one with 2424 wires, one with 3636 wires, and one with 6060 wires. To organize them neatly into the junction box, the electrician wants to bundle wires into equal-sized groups with no wires left over. What is the largest bundle size?

Use prime factorization to find the GCF:

24=23×324 = 2^3 \times 3 36=22×3236 = 2^2 \times 3^2 60=22×3×560 = 2^2 \times 3 \times 5

Shared primes with smallest exponents:

  • 22: smallest is 22=42^2 = 4
  • 33: smallest is 31=33^1 = 3

GCF(24,36,60)=4×3=12\text{GCF}(24, 36, 60) = 4 \times 3 = 12

The electrician bundles wires in groups of 12:

  • 24÷12=224 \div 12 = 2 bundles
  • 36÷12=336 \div 12 = 3 bundles
  • 60÷12=560 \div 12 = 5 bundles

That is 1010 total bundles, all the same size, with no loose wires.

Common Mistakes to Avoid

  1. Stopping a factor tree too early. Every branch must end at a prime. 12=3×412 = 3 \times 4 is not complete because 4=2×24 = 2 \times 2. The correct factorization is 12=22×312 = 2^2 \times 3.
  2. Calling 11 a prime. By mathematical convention, 11 is not prime. Including it in a factorization (like 12=1×22×312 = 1 \times 2^2 \times 3) is incorrect — the Fundamental Theorem of Arithmetic requires factorization into primes only, and 11 is not prime.
  3. Forgetting to use exponents. Writing 72=2×2×2×3×372 = 2 \times 2 \times 2 \times 3 \times 3 is correct but hard to read. The standard form is 72=23×3272 = 2^3 \times 3^2.
  4. Mixing up GCF and LCM exponent rules. For GCF, take the smaller exponent of shared primes. For LCM, take the larger exponent of all primes. Swapping these is the single most common error.
  5. Thinking different factor trees give different results. The path may differ (72=8×972 = 8 \times 9 vs 72=6×1272 = 6 \times 12), but the final set of primes is always the same.

Practice Problems

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

Problem 1: Classify each number as prime or composite: 2929, 3333, 4747, 8181.
  • 2929: test primes up to 295.4\sqrt{29} \approx 5.4 — not divisible by 2,3,52, 3, 5. Prime.
  • 33=3×1133 = 3 \times 11. Composite.
  • 4747: test primes up to 476.9\sqrt{47} \approx 6.9 — not divisible by 2,3,52, 3, 5. Prime.
  • 81=3481 = 3^4. Composite.
Problem 2: Write the prime factorization of 120120.

120=2×60=2×2×30=2×2×2×15=2×2×2×3×5120 = 2 \times 60 = 2 \times 2 \times 30 = 2 \times 2 \times 2 \times 15 = 2 \times 2 \times 2 \times 3 \times 5

Answer: 120=23×3×5120 = 2^3 \times 3 \times 5

Problem 3: Write the prime factorization of 252252.

252=2×126=2×2×63=2×2×9×7=2×2×3×3×7252 = 2 \times 126 = 2 \times 2 \times 63 = 2 \times 2 \times 9 \times 7 = 2 \times 2 \times 3 \times 3 \times 7

Answer: 252=22×32×7252 = 2^2 \times 3^2 \times 7

Problem 4: Use prime factorization to find the GCF of 9090 and 150150.

90=2×32×590 = 2 \times 3^2 \times 5, 150=2×3×52150 = 2 \times 3 \times 5^2.

Shared primes, smaller exponents: 212^1, 313^1, 515^1.

GCF=2×3×5=30\text{GCF} = 2 \times 3 \times 5 = 30

Answer: GCF(90,150)=30\text{GCF}(90, 150) = 30

Problem 5: Use prime factorization to find the LCM of 9090 and 150150.

Using the factorizations from Problem 4, take larger exponents:

212^1, 323^2, 525^2.

LCM=2×9×25=450\text{LCM} = 2 \times 9 \times 25 = 450

Answer: LCM(90,150)=450\text{LCM}(90, 150) = 450

Verification: 30×450=13,500=90×15030 \times 450 = 13{,}500 = 90 \times 150. Checks out.

Problem 6: Is 9191 prime? If not, write its prime factorization.

919.5\sqrt{91} \approx 9.5. Test primes up to 99: 2,3,5,72, 3, 5, 7.

  • 9191 is odd (not divisible by 22)
  • Digit sum =10= 10 (not divisible by 33)
  • Does not end in 00 or 55 (not divisible by 55)
  • 91÷7=1391 \div 7 = 13 (exact)

Answer: 9191 is composite. 91=7×1391 = 7 \times 13.

Problem 7: An electrician needs to split 4848, 6464, and 8080 wires into equal bundles. What is the largest bundle size?

48=24×348 = 2^4 \times 3, 64=2664 = 2^6, 80=24×580 = 2^4 \times 5.

Only shared prime is 22, smallest exponent is 24=162^4 = 16.

Answer: The largest bundle size is 16 wires (48÷16=348 \div 16 = 3, 64÷16=464 \div 16 = 4, 80÷16=580 \div 16 = 5 bundles).

Key Takeaways

  • Prime numbers have exactly two factors (11 and themselves); composite numbers have more than two
  • 22 is the only even prime, and 11 is neither prime nor composite
  • A factor tree breaks a number into primes by splitting at each level until all branches reach a prime
  • Prime factorization with exponents is the standard way to express a number’s prime breakdown (e.g., 72=23×3272 = 2^3 \times 3^2)
  • The fundamental theorem of arithmetic guarantees that every integer greater than 11 has a unique prime factorization
  • To find the GCF, take shared primes with the smaller exponent; to find the LCM, take all primes with the larger exponent
  • Factor trees can start with any factor pair — the final result is always the same

Return to Pre-Algebra for more topics in this section.

Last updated: March 29, 2026