Every whole number greater than 1 is built from prime numbers the way a building is built from bricks. The factors of a number are the pieces it divides into evenly; the prime factorization is the list of prime bricks; the factor tree is the diagram that finds them; and the GCF and LCM are what you get when you compare two numbers' bricks. Here is the math, with worked examples you can check by hand.
What Is a Factor?
A factor is a whole number that divides another number exactly, leaving no remainder. For 36, the factors are 1, 2, 3, 4, 6, 9, 12, 18, and 36 — nine in total. The fastest way to find them is the square-root shortcut: you only need to test divisors up to the square root. For 36, √36 = 6, so six divisions find all nine factors. The full method is in the guide on how to find factors of a number.
Prime Factorization: Two Methods
Prime factorization writes a number as a product of primes only. For 60, that is 2² × 3 × 5. There are two ways to get there:
The division (ladder) method: divide by the smallest prime that divides evenly, repeat with the quotient, stop at 1. 60 ÷ 2 = 30, ÷ 2 = 15, ÷ 3 = 5, ÷ 5 = 1 → 2, 2, 3, 5.
The factor tree method: split into any two factors, then split each factor again until every branch ends in a prime. 60 → 6 × 10 → (2 × 3) × (2 × 5). Same primes, same answer — every number greater than 1 has exactly one prime factorization, so any correct tree or ladder ends in the same leaves.
The Factor Tree for 48
Split 48 into 8 × 6. Then 8 = 2 × 4 = 2 × 2 × 2, and 6 = 2 × 3. The leaves are 2, 2, 2, 2, and 3, so 48 = 2⁴ × 3. Try a different start — 12 × 4 — and the leaves come out the same five primes in a different order. The one mistake to avoid: adding the leaves instead of multiplying them. 2 + 2 + 2 + 2 + 3 = 11; 2 × 2 × 2 × 2 × 3 = 48. Always multiply back to verify.
GCF and LCM from Prime Factors
Break both numbers into primes, then take the lowest powers of the shared primes for the GCF and the highest powers for the LCM:
- 12 = 2² × 3; 18 = 2 × 3² → GCF = 2 × 3 = 6, LCM = 2² × 3² = 36.
- Self-check: GCF × LCM = the product of the two numbers. 6 × 36 = 216 = 12 × 18. If your two answers do not multiply to the product, one of them is wrong.
In words: GCF goes down (dividing, smaller), LCM goes up (multiples, bigger). GCF simplifies fractions (18/24 → 3/4); LCM adds them (1/4 + 1/6 = 5/12 via LCM 12).
Why Developers Should Care
Prime factorization is the same idea behind RSA encryption: factoring small numbers is easy, factoring very large numbers is so hard for computers that it keeps online banking secure. And the counting formula is a neat piece of math: from the exponents, add 1 to each and multiply. 360 = 2³ × 3² × 5 → (3+1) × (2+1) × (1+1) = 24 factors. If you build anything that computes factors, test it against a known pair: the factors of 36 must be exactly 1, 2, 3, 4, 6, 9, 12, 18, 36.
The Bottom Line
Factors come in pairs, prime factorization is unique, the factor tree is the visual route to it, and GCF × LCM = the product is your self-check. If you want to verify a hand calculation, a free factors of a number tool runs the same math instantly — factors, factor pairs, prime factorization, GCF and LCM in one step.
Top comments (0)