# Home > Numbers and Pre-Algebra > Prime Factorisation using Factor Tree > Finding HCF and LCM by Prime Factorisation

# Finding HCF and LCM by Prime Factorisation

Earlier we saw how to express numbers as multiples and factors, and finding out their least common multiple (LCM) and highest common factor (HCF).

We now look at finding HCF and LCM by prime factorisation, by obtaining prime factors.

To find the HCF of two numbers, find the product of all the prime numbers that are common in both numbers.

To find the LCM of two numbers, find the product of all the prime numbers of the smaller numbers and those of the larger number that are not contained in the smaller one. In other words, write all the prime factors of the smaller number and multiply them with the prime factors of the larger number that are not included from the smaller number.

Let’s look at a few examples to understand this method of finding HCF and LCN by prime factorisation.

Example 1: Find the HCF and LCM of 24 and 40

24 = 2 x 3 x 2 x 2            and                  40 = 2 x 2 x 2 x 5  HCF: The common factors of 24 and 40 are 2 x 2 x 2 = 8. So the HCF and LCM of 24 and 40 = 8

LCM: We take the prime factors of the smaller number (24), and they are 2, 3, 2, and 2. The only prime factor from the larger number (40) not in this list is 5.

So the LCM of 24 and 40 is 2 x 3 x 2 x 2 x 5 = 120

Example 2: Find the HCF and LCM of 324 and 600

324 = 2 x 2 x 3 x 3 x 3 x 3

= 2² x 34 600 = 2 x 3 x 2 x 5 x 2 x 5

= 23 x 3 x 52 We now have

324 = 22 x 34

600 = 23 x 3 x 52

HCF: The common factors in both the numbers above are 22 and 3. So HCF of 324 and 600 = 22 x 3 = 12.

LCM: We take the prime factors of the smaller number (324) – 22 x 34. The prime factors from the larger number (600) not included in this list is 2 x 52.

So the LCM of 324 and 600 is (22 x 34) x (2 x 52)

= 324 x 2 x 25

= 16200