The short answer: Prime factorization writes a whole number greater than 1 as a product of primes. Every such number has exactly one prime factorization apart from the order of the factors, a fact known as the fundamental theorem of arithmetic. For example, 360 = 2³ × 3² × 5. Factor trees and repeated division both find it; the exponents are the part worth keeping.

Key takeaways

  • Every integer above 1 has one prime factorization, up to the order of the factors.
  • 1 is neither prime nor composite and has no prime factorization.
  • Stop only when every branch ends at a prime.
  • Exponents record repeated primes, so write 2³ × 3² × 5 rather than repeating factors.
  • To test whether n is prime, trial division only needs primes up to √n.

What prime factorization means

Prime factorization is the process of writing a whole number greater than 1 as a product of prime numbers. The primes are the atoms of multiplication: 2, 3, 5, 7, 11, 13, and so on. Because every composite number can be split into smaller factors, repeating the split eventually leaves only primes.

The result is unique. The fundamental theorem of arithmetic says that every integer greater than 1 has exactly one prime factorization, apart from the order in which the factors are written. So 360 is always 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5, whether you start from 36 × 10, 4 × 90, or 12 × 30. Different factor trees can look different along the way; they cannot end differently.

Primes, composites, and the numbers that are neither

A prime number has exactly two distinct positive divisors: 1 and itself. 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29 are the first ten. 2 is the only even prime, because every other even number is divisible by 2. A composite number has more than two positive divisors, such as 4, 9, 15, 21, or 100.

Two numbers sit outside both groups. 1 has only one positive divisor, so it is neither prime nor composite; it is called a unit. 0 is divisible by every positive integer, so it cannot be prime either, and no finite product of primes equals 0.

Negative integers are not prime under the standard definition. Their factorization is written with a unit factor: −360 = −1 × 2³ × 3² × 5. The primes themselves stay positive, and the minus sign is set aside before factoring.

Divisibility rules that shorten the work

Before drawing a tree, check the small primes with divisibility rules. For 2, the last digit is even. For 3, the digit sum is divisible by 3: 1,083 sums to 12, so 1,083 = 3 × 361 = 3 × 19². For 5, the last digit is 0 or 5.

The rule for 7 doubles the last digit and subtracts it from the rest: for 203, 20 − 2(3) = 14, which is divisible by 7, so 203 = 7 × 29. The rule for 11 takes the alternating sum of digits: for 4,917, 4 − 9 + 1 − 7 = −11, so 4,917 = 11 × 447 = 11 × 3 × 149.

These tests are shortcuts, not proofs: 221 = 13 × 17 passes the rules for 2, 3, 5, 7, and 11, yet it factors. When they fail, divide.

Factor trees, step by step

Start with the number at the top and split it into any pair of factors. Split each composite branch again, and circle a branch when it is prime. For 360: 360 = 36 × 10; 36 = 6 × 6 = (2 × 3) × (2 × 3); and 10 = 2 × 5. The circled primes are 2, 2, 2, 3, 3, and 5, so 360 = 2³ × 3² × 5.

A different first split gives the same collection: 360 = 4 × 90 = (2 × 2) × (9 × 10) = 2² × 3² × 2 × 5, which also collapses to 2³ × 3² × 5. The tree is a bookkeeping device; the theorem guarantees the destination.

Always multiply back as a check: 8 × 9 × 5 = 360. If the product is wrong, a branch was left composite or a factor was dropped.

Repeated division: the ladder method

Repeated division is tidier for large numbers. Divide by the smallest prime that goes in evenly, write the quotient underneath, and repeat until the quotient is 1. The primes down the left side are the factorization.

For 360: 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5, and 5 ÷ 5 = 1. Reading the divisors gives 2³ × 3² × 5. For 504: 504 ÷ 2 = 252, ÷ 2 = 126, ÷ 2 = 63, ÷ 3 = 21, ÷ 3 = 7, ÷ 7 = 1, so 504 = 2³ × 3² × 7, and 8 × 9 × 7 = 504.

Divide by a prime, not a composite: dividing 360 by 4 first works arithmetically, but it adds steps and invites a missed factor. Smallest-prime-first keeps the exponents grouped.

How far to test: the square-root limit

If a composite number is written n = a × b with both factors greater than 1, at least one factor is at most √n; otherwise their product would exceed n. So to decide whether n is prime, test only the primes up to √n. If none divides n, n is prime.

For 97, √97 ≈ 9.85, so test 2, 3, 5, and 7. None divides 97, so 97 is prime. For 143, √143 ≈ 11.96, so test 2, 3, 5, 7, and 11. Since 11 × 13 = 143, the number is composite.

This bound tests primality, not a complete factorization: when a prime divides n, divide it out and apply the same limit to the quotient. Testing every number up to n instead of √n is why hand factoring feels slow.

Rebuilding the number and counting divisors

Exponents are not decoration. 2³ × 3² × 5 means three 2s, two 3s, and one 5. Writing 2 × 3 × 5 instead gives 30, not 360, which is the single most common transcription error.

The exponents also count divisors. For 360 = 2³ × 3² × 5¹, a divisor chooses an exponent for 2 from 0 to 3 (four options), for 3 from 0 to 2 (three options), and for 5 from 0 to 1 (two options). That gives 4 × 3 × 2 = 24 positive divisors, including 1 and 360.

The same exponents can be used to sum divisors: (1 + 2 + 4 + 8)(1 + 3 + 9)(1 + 5) = 15 × 13 × 6 = 1,170. The formula works because expanding the product enumerates every divisor exactly once. A perfect square has all even exponents, because it is a product of pairs: 144 = 2⁴ × 3².

GCD and LCM from prime factors

Prime factorization turns greatest common divisor and least common multiple into a comparison of exponents. For 84 = 2² × 3 × 7 and 90 = 2 × 3² × 5, the GCD uses the smaller exponent on each shared prime: 2¹ × 3¹ = 6. The LCM uses the larger exponent on every prime that appears: 2² × 3² × 5 × 7 = 1,260.

The check is the identity GCD(a, b) × LCM(a, b) = a × b for positive integers: 6 × 1,260 = 7,560 = 84 × 90. That identity is a two-number shortcut only. It fails for three numbers: 4, 6, and 10 have GCD 2 and LCM 60, while 2 × 60 = 120 is not 4 × 6 × 10 = 240. Use the exponent rule for any count: smallest exponent for the GCD, largest for the LCM.

Common mistakes and practical caveats

  • Stopping at a composite branch, leaving 9 or 15 in the tree. Every branch must end at a prime.
  • Starting the tree with 1. One does not split into smaller factors, and it is not prime.
  • Losing an exponent: writing 2 × 3 × 5 for 360 gives 30.
  • Calling every divisor a prime factor. 360 has 24 divisors but only three distinct prime factors.
  • Believing an odd number is prime. 91 = 7 × 13 and 51 = 3 × 17.
  • Testing divisors all the way to n rather than to √n.
  • Forgetting the unit −1 when factoring a negative integer.

Practical caveats matter at scale. Factoring a large semiprime, a product of two large primes, is computationally hard; RSA encryption depends on that difficulty. A calculator may display a wrong result above 2⁵³ because JavaScript numbers lose integer precision. For hand work, check every result by multiplication, and report exponents so the reader can verify the product.

Frequently asked questions

Is 1 a prime number?

No. A prime has exactly two distinct positive divisors; 1 has only one. It is a unit, and it has no prime factorization.

What is the prime factorization of 360?

360 = 2³ × 3² × 5, which is 8 × 9 × 5 = 360.

Why does a different factor tree give the same answer?

The fundamental theorem of arithmetic guarantees a unique prime factorization.

What is the difference between a factor and a prime factor?

A factor is any number that divides evenly; a prime factor must itself be prime. 360 has 24 factors but three distinct prime factors.

How do you know when to stop dividing?

Stop when the quotient reaches 1. For a primality test, stop once you have tried every prime up to √n.

Can you prime-factorize 0 or a negative number?

Zero has no prime factorization, since no finite product of primes is 0. Negative integers factor with a unit: −360 = −1 × 2³ × 3² × 5.

Further reading

Keep exploring

Read next Logarithm: Base, Product Rule, and Scale A logarithm is an exponent in disguise. Learn the definition, the product, quotient and power rules, change of… Read next Order of Operations: PEMDAS and Ambiguous Expressions PEMDAS is a shared convention, not a law of mathematics. Learn the real precedence rules, the exponent and… Read next Significant Figures: Counting, Rounding, and Precision Significant figures record how precisely a value was measured. Learn the counting rules, the addition and multiplication rules,…