← Pre-Algebra

Pre-Algebra

GCF, LCM, and Prime Factorization

Lesson

Every whole number greater than 1 can be written as a product of prime numbers. A prime number has exactly two factors: 11 and itself.

The first few primes: 2,3,5,7,11,13,17,19,232, 3, 5, 7, 11, 13, 17, 19, 23 \dots

Prime factorization

Break a number down by dividing out primes one at a time. For 6060:

60=230=2215=223560 = 2 \cdot 30 = 2 \cdot 2 \cdot 15 = 2 \cdot 2 \cdot 3 \cdot 5

So 60=223560 = 2^2 \cdot 3 \cdot 5.

Once you have prime factorizations, two of the most useful tools fall out for free:

GCF — Greatest Common Factor

The largest number that divides two numbers evenly. From the prime factorizations, take the shared primes at their smallest power.

LCM — Least Common Multiple

The smallest number both numbers divide into. Take every prime that appears, at its largest power.

Worked example — GCF(12, 18)

12=223,18=23212 = 2^2 \cdot 3, \quad 18 = 2 \cdot 3^2

Shared primes at smallest power: 23=62 \cdot 3 = 6.

Worked example — LCM(12, 18)

Every prime at largest power: 2232=49=362^2 \cdot 3^2 = 4 \cdot 9 = 36.

Real-world cue: GCF is for problems about dividing into equal groups (largest piece, most groups). LCM is for problems where two things repeat and you want them to line up (next time both happen together).

Practice

Work through these. Stuck? Click Get a hint.

Warm-Up

Quick problems to get going.

Problem 1

Smallest prime factor of 12\text{Smallest prime factor of } 12

Problem 2

GCF(6,9)\text{GCF}(6, 9)

Problem 3

LCM(2,3)\text{LCM}(2, 3)

Problem 4

Largest prime factor of 10\text{Largest prime factor of } 10

Practice

Standard problems matching the lesson.

Problem 5

GCF(12,18)\text{GCF}(12, 18)

Problem 6

GCF(20,30)\text{GCF}(20, 30)

Problem 7

GCF(15,25)\text{GCF}(15, 25)

Problem 8

GCF(24,36)\text{GCF}(24, 36)

Problem 9

LCM(4,6)\text{LCM}(4, 6)

Problem 10

LCM(5,10)\text{LCM}(5, 10)

Problem 11

LCM(3,7)\text{LCM}(3, 7)

Problem 12

LCM(8,12)\text{LCM}(8, 12)

Problem 13

Number of distinct prime factors of 30\text{Number of distinct prime factors of } 30

Problem 14

Number of distinct prime factors of 60\text{Number of distinct prime factors of } 60

Problem 15

Largest prime factor of 42\text{Largest prime factor of } 42

Problem 16

Smallest prime factor of 49\text{Smallest prime factor of } 49

Problem 17

LCM(10,15)\text{LCM}(10, 15)

Problem 18

GCF(28,42)\text{GCF}(28, 42)

Challenge

Harder problems — edge cases, trickier numbers, multiple steps.

Problem 19

GCF(48,60)\text{GCF}(48, 60)

Problem 20

GCF(72,108)\text{GCF}(72, 108)

Problem 21

LCM(12,15)\text{LCM}(12, 15)

Problem 22

LCM(9,12)\text{LCM}(9, 12)

Problem 23

Number of distinct prime factors of 210\text{Number of distinct prime factors of } 210

Problem 24

Largest prime factor of 105\text{Largest prime factor of } 105

Problem 25

LCM(18,24)\text{LCM}(18, 24)

Ask the tutor

Stuck on a concept? Want another example? Ask anything about this topic.

Type your own question below, or tap one of the suggestions. The tutor can re-explain the lesson, work through a specific problem with you, generate fresh practice tuned to where you are, or check your reasoning.

Quiz

Test yourself on this topic →

10 questions, no hints. About 5 minutes.