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 and is the largest positive integer that divides both. The LCM is the smallest positive integer that is a multiple of both.
If where we have padded with zero exponents so that the same prime list works for both, then
Theorem and the product rule
Product rule. For any two positive integers and ,
The proof is one line using exponents: for any prime , , so the exponent of 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, and , but .
There are several practical consequences. (i) If you know any two of , , , , you can find the fourth (when you know one of or ). (ii) The HCF is always a divisor of the LCM. (iii) If , we say and are coprime (or relatively prime); in that case .
The same idea extends to several numbers. For , the HCF is the product of over all primes (min taken across all three exponents), and the LCM is the product of . 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 and seconds , when do they blink together again? The LCM of and . Three friends jog around a circular track with lap times , , and seconds , when do they next meet at the start? The LCM of . Cutting wires of length m and m into equal pieces of greatest length? The HCF.
Worked examples
Example 1. Find the HCF and LCM of and .
, and . Common primes: only , with . Check: . ✓
Example 2. Find the HCF and LCM of , , .
, , .
For each prime take min across all three rows for HCF and max for LCM.
Prime : min , max . Prime : min , max . Prime : min , max .
Example 3. Two numbers are in the ratio . If their HCF is , find the numbers and their LCM.
Two numbers in ratio can be written as and . Since , the HCF of and is . So , giving numbers and . Then
Example 4. Three bells ring at intervals of , , and minutes. They all rang together at a.m. When will they next ring together?
LCM. , , . LCM minutes hours.
They ring together again at a.m.
Example 5. Can the HCF of two numbers be and their LCM be ?
If yes, then HCF should divide LCM: ? , not an integer. Contradiction. So no, such numbers do not exist.
Try it yourself
- Find the HCF and LCM of and .
- Find the HCF and LCM of and .
- Find the HCF and LCM of and , and verify the product rule.
- Find the LCM of , , .
- Find the HCF of , , .
- The HCF of two numbers is and their LCM is . If one number is , find the other.
- Two tankers, of capacities and 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.
- Three runners complete a lap in , , and seconds. When do they next meet at the starting point?
- If and , list all possible pairs .
- Show that for any , is a multiple of .
Pitfalls / Insight
- Product rule for three or more numbers is wrong. Use prime factorisation directly.
- Don't forget to write 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.