Math Lab
Home/Class X/Ch 1/HCF and LCM by prime factorisation

HCF and LCM by prime factorisation

If you know the prime factorisations of two numbers, finding their HCF (highest common factor, also called GCD) and their LCM (least common multiple) is essentially mechanical. No long division, no guessing , just compare exponents.

Definitions

The HCF (or GCD) of integers aa and bb is the largest positive integer that divides both. The LCM is the smallest positive integer that is a multiple of both.

If a=p1a1p2a2pkak,b=p1b1p2b2pkbk,a = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k}, \qquad b = p_1^{b_1} p_2^{b_2} \cdots p_k^{b_k}, where we have padded with zero exponents so that the same prime list works for both, then HCF(a,b)=i=1kpimin(ai,bi),LCM(a,b)=i=1kpimax(ai,bi).\operatorname{HCF}(a,b) = \prod_{i=1}^{k} p_i^{\min(a_i, b_i)}, \qquad \operatorname{LCM}(a,b) = \prod_{i=1}^{k} p_i^{\max(a_i, b_i)}.

Theorem and the product rule

Product rule. For any two positive integers aa and bb, HCF(a,b)LCM(a,b)=ab.\operatorname{HCF}(a,b) \cdot \operatorname{LCM}(a,b) = a \cdot b.

The proof is one line using exponents: for any prime pp, min(ai,bi)+max(ai,bi)=ai+bi\min(a_i, b_i) + \max(a_i, b_i) = a_i + b_i, so the exponent of pp on both sides is the same. Multiplying over all primes gives the rule.

Warning. The product rule fails for three or more numbers. For example, HCF(2,3,4)=1\operatorname{HCF}(2,3,4) = 1 and LCM(2,3,4)=12\operatorname{LCM}(2,3,4) = 12, but 234=242 \cdot 3 \cdot 4 = 24.

There are several practical consequences. (i) If you know any two of aa, bb, HCF\operatorname{HCF}, LCM\operatorname{LCM}, you can find the fourth (when you know one of aa or bb). (ii) The HCF is always a divisor of the LCM. (iii) If HCF(a,b)=1\operatorname{HCF}(a,b) = 1, we say aa and bb are coprime (or relatively prime); in that case LCM(a,b)=ab\operatorname{LCM}(a,b) = ab.

The same idea extends to several numbers. For a,b,ca, b, c, the HCF is the product of pminp^{\min} over all primes (min taken across all three exponents), and the LCM is the product of pmaxp^{\max}. So once the prime factorisations are written down, HCF and LCM are just "stack the columns and take min/max".

This method has a real-world feel. Two traffic lights blink every 4848 and 6060 seconds , when do they blink together again? The LCM of 4848 and 6060. Three friends jog around a circular track with lap times 2424, 3636, and 5454 seconds , when do they next meet at the start? The LCM of 24,36,5424, 36, 54. Cutting wires of length 1.201.20 m and 1.801.80 m into equal pieces of greatest length? The HCF.

Worked examples

Example 1. Find the HCF and LCM of 9696 and 404404.

96=25×396 = 2^5 \times 3, and 404=22×101404 = 2^2 \times 101. Common primes: only 22, with min(5,2)=2\min(5,2) = 2. HCF=22=4.\operatorname{HCF} = 2^2 = 4. LCM=25×3×101=32×303=9696.\operatorname{LCM} = 2^5 \times 3 \times 101 = 32 \times 303 = 9696. Check: 4×9696=38784=96×4044 \times 9696 = 38784 = 96 \times 404. ✓

Example 2. Find the HCF and LCM of 66, 7272, 120120.

6=2×36 = 2 \times 3, 72=23×3272 = 2^3 \times 3^2, 120=23×3×5120 = 2^3 \times 3 \times 5.

For each prime take min across all three rows for HCF and max for LCM.

Prime 22: min =1= 1, max =3= 3. Prime 33: min =1= 1, max =2= 2. Prime 55: min =0= 0, max =1= 1. HCF=2×3=6,LCM=23×32×5=360.\operatorname{HCF} = 2 \times 3 = 6, \qquad \operatorname{LCM} = 2^3 \times 3^2 \times 5 = 360.

Example 3. Two numbers are in the ratio 15:1115 : 11. If their HCF is 1313, find the numbers and their LCM.

Two numbers in ratio 15:1115:11 can be written as 15k15k and 11k11k. Since HCF(15,11)=1\operatorname{HCF}(15,11) = 1, the HCF of 15k15k and 11k11k is kk. So k=13k = 13, giving numbers 15×13=19515 \times 13 = 195 and 11×13=14311 \times 13 = 143. Then LCM=195×14313=15×143=2145.\operatorname{LCM} = \frac{195 \times 143}{13} = 15 \times 143 = 2145.

Example 4. Three bells ring at intervals of 99, 1212, and 1515 minutes. They all rang together at 8:008:00 a.m. When will they next ring together?

LCM(9,12,15)(9,12,15). 9=329 = 3^2, 12=22×312 = 2^2 \times 3, 15=3×515 = 3 \times 5. LCM =22×32×5=180= 2^2 \times 3^2 \times 5 = 180 minutes =3= 3 hours.

They ring together again at 11:0011:00 a.m.

Example 5. Can the HCF of two numbers be 1818 and their LCM be 380380?

If yes, then HCF should divide LCM: 1838018 \mid 380? 380/18=21.11380 / 18 = 21.11\ldots , not an integer. Contradiction. So no, such numbers do not exist.

Try it yourself

  1. Find the HCF and LCM of 2626 and 9191.
  2. Find the HCF and LCM of 510510 and 9292.
  3. Find the HCF and LCM of 336336 and 5454, and verify the product rule.
  4. Find the LCM of 1212, 1515, 2121.
  5. Find the HCF of 4040, 6060, 7575.
  6. The HCF of two numbers is 99 and their LCM is 9090. If one number is 1818, find the other.
  7. Two tankers, of capacities 850850 and 680680 litres, are filled with the same kind of oil from a common container. Find the maximum capacity of a vessel that can measure the oil in either tanker an exact number of times.
  8. Three runners complete a lap in 4848, 6060, and 7272 seconds. When do they next meet at the starting point?
  9. If HCF(a,b)=1\operatorname{HCF}(a,b) = 1 and ab=540a \cdot b = 540, list all possible pairs (a,b)(a,b).
  10. Show that for any a,ba, b, LCM(a,b)\operatorname{LCM}(a,b) is a multiple of HCF(a,b)\operatorname{HCF}(a,b).

Pitfalls / Insight

  • Product rule for three or more numbers is wrong. Use prime factorisation directly.
  • Don't forget to write 00 exponents for primes that appear in one number but not the other. They still count when comparing.
  • HCF divides LCM, and both divide the LCM , useful sanity check.

Insight. The "min and max" picture turns HCF/LCM questions into bookkeeping with exponents. Once you write the prime factorisations as columns, you can almost see the answer.

Practice quiz

Quick check on this topic.

Quiz
Quick check : HCF and LCM
6 questions · pick the best answer
Q1

LCM of 12,15,2112, 15, 21 is:

Q2

HCF of 40,60,7540, 60, 75 is:

Q3

If HCF(a,b)=1\operatorname{HCF}(a,b) = 1, then LCM(a,b)\operatorname{LCM}(a,b) equals:

Q4

Two numbers are in ratio 15:1115:11 with HCF 1313. The numbers are:

Q5

HCF(a,b)LCM(a,b)\operatorname{HCF}(a, b) \cdot \operatorname{LCM}(a, b) equals:

Q6

Does the product rule extend to three numbers?