How Math Works
Numbers & Operationsmethodfoundations

Prime Factorization

Prime factorization breaks a number into its prime Legos.

The formula

N = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ

How to read it: writing a number purely as a product of primes that can't be broken down any further

N
the whole number you want to factor
p₁, p₂, …, pₖ
the prime factors — primes like 2, 3, 5, 7 that don't split further
a₁, a₂, …, aₖ
how many times each prime is multiplied in (the exponent)

The hook

Every whole number is built, in exactly one way, from a few prime 'Lego blocks' multiplied together.

In plain words

A single number broken down into a product of primes only — 2, 3, 5, 7, and so on.

The intuition

Keep dividing a number by 2, then 3, and so on, and eventually only unbreakable primes are left. Those are the number's 'ingredients'. The ingredient list is unique for each number — this is the uniqueness of prime factorization.

How it's built

Divide by 2 while you can, then 3, then 5, and so on. Keep dividing each quotient until you reach 1. When the same prime appears repeatedly, bundle it into an exponent.

Example

Divide 60: 60÷2=30, 30÷2=15, 15÷3=5, 5÷5=1. So 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5.

Common mistake

1 is not a prime, so it never appears in a factorization. And numbers like 4 or 6 that split further can't be prime factors.

Where it's used

Counting divisors, finding the GCD and LCM, reducing fractions — it's the starting point for almost every calculation about the structure of numbers.

Where it came from

The fact that 'every number is a unique product of primes' is called the fundamental theorem of arithmetic, and its seeds are already in Euclid's Elements.

Quick check

Which of these is the correct prime factorization of 12?

  • 2 × 6
  • 2² × 3
  • 3 × 4
  • 2 × 3²

Practice

Prime factorize 36 (bundle repeats into exponents).

Answer: undefined

Solution:
  1. 36 ÷ 2 = 18, 18 ÷ 2 = 9
  2. 9 ÷ 3 = 3, 3 ÷ 3 = 1
  3. 36 = 2 × 2 × 3 × 3 = 2² × 3²

Takeaway: Divide by the smallest primes in turn until you reach 1.

What number is 2³ × 5?

Answer: 40

Solution:
  1. 2³ = 8
  2. 8 × 5 = 40

Takeaway: Multiply the prime factors back and you get the original number.

How many DISTINCT prime factors does 90 have?

Answer: 3

Solution:
  1. 90 = 2 × 45 = 2 × 3² × 5
  2. The distinct primes are 2, 3, 5
  3. → 3 of them

Takeaway: A repeated prime still counts as just one distinct kind.

Prime factorize 84.

Answer: undefined

Solution:
  1. 84 ÷ 2 = 42, 42 ÷ 2 = 21
  2. 21 ÷ 3 = 7, 7 ÷ 7 = 1
  3. 84 = 2² × 3 × 7

Takeaway: If 2 no longer divides, move on to 3, 5, 7, and so on.

Related mathematicians

Keep learning in the app

Touch-and-drag widgets, self-graded practice and daily formulas — free on iOS and Android.