Related Articles
HCF and LCM – Real Numbers
• Last Updated : 03 Jan, 2021

Real numbers are simply the combination of rational and irrational numbers, in the number system. In general, all the arithmetic operations can be performed on these numbers and they can be represented in the number line, also.

### HCF (Highest Common Factor)

This concept is used for two or more numbers to get the greatest number which will divide all the given numbers without getting any remainder. That is why HCF is also known as the greatest common divisor.

Example: If we take 13 and 91 then HCF will be 7 as 7 is the highest common factor which will divide both 13 and 91 without leaving any remainder.

### LCM (Least Common Multiple)

This concept is used for two or more than two numbers to get the least positive number which gets divided by all the given numbers without leaving any remainder.

Example: If we take 3 and 7 then 21 will be the LCM as 21 is the least common multiple which will be divided by 3 and 7 without leaving any remainder.

## Methods to Calculate LCM and HCF

Following are the methods using which you can calculate LCM and HCF:

1. Division method
2. Factorization method
3. Prime factorization method

### 1. Division Method

Division method for LCM:

• Step 1: Check whether the given numbers are divisible by 2 or not.
• Step 2: If the number is divisible by 2 then divide and again check for the same. If the numbers are not divisible by 2 then check 3 and so on.
• Step 3: Perform step 2 until you get 1 in the end.

Example: Find out the LCM of 16 and 24?

Solution:

Using the division method for LCM

Hence, LCM = 2 × 2 × 2 × 2 × 3 = 48

Division method for HCF:

• Step 1: Take the smaller number as the divisor and the larger number as a dividend.
• Step 2: Perform division. If you get remainder as 0 then the divisor is the HCF of the given numbers.
• Step 3: If you get a remainder other than 0 then take the remainder as the new divisor and the previous divisor as the new dividend.
• Step 4: Perform step 2 and step 3 until you get the remainder as 0.

Example: Find out the HCF of 7 and 25?

Solution:

Using the division method for HCF

Hence, HCF = 1

### 2. Factorization method

Factorisation method for LCM:

• Step 1: Write the multiples of the given numbers until you reach the first common multiple.
• Step 2: First common multiple of the given numbers will be the LCM.

Example: Find out the LCM of 6 and 18?

Solution:

Multiple of 6 = 6, 12, 18, 24, 30, …….

Multiple of 18 = 18, 36, 54, ……

LCM = first common multiple(least common multiple)

LCM = 18

Factorization method for HCF:

• Step 1: Write all the divisors of the given number.
• Step 2: Check for common divisors among them and find the greatest common divisor. This greatest common divisor will be the HCF of the given numbers.

Example: Find out the HCF of 6 and 18?

Solution:

Divisors of 6 = 1, 2, 3, 6

Divisors of 18 = 1, 2, 3, 6, 9, 18

HCF = greatest common divisor

HCF = 6

### 3. Prime factorization method

Prime factorization method for finding LCM:

• Step 1: Find out the prime factors of the given number.
• Step 2: Check the occurrence of a particular factor. If a particular factor has occurred multiple times in the given number then choose the maximum occurrence of the factor in LCM.
• Step 3: Multiply all the maximum occurrences of a particular factor. And this will be the LCM Of given numbers.

Example: Find out the LCM of 18 and 90?

Solution:

Prime factors of 18 = 2 × 3 × 3

Prime factors of 90 = 2 × 3 × 3 × 5

Now LCM will be = 2 × 3 × 3 × 5

Prime factorization method for finding HCF:

• Step 1: Find out the prime factors of the given number.
• Step 2: Check the occurrence of a particular factor. Find out the common factors and choose them in HCF.
• Step 3: Multiply the occurrence of common factors. And this will be the HCF Of the given numbers.

Example: Find out the HCF of 18 and 90?

Prime factors of 18 = 2 × 3 × 3

Prime factors of 90 = 2 × 3 × 3 × 5

Now HCF will be = 2 × 3 × 3

Example: Find out the LCM and HCF of 16 and 30?

Solution:

Prime factors of 16 = 2 × 2 × 2 × 2

Prime factors of 30 = 2 × 3 × 5

LCM: 2 × 2 × 2 × 2 × 3 × 5

HCF: 2

### Relationship Between LCM and HCF of Two Numbers

(LCM of two numbers) × (HCF of two numbers) = Product of two numbers

Mathematically this can be written as:

LCM(a, b) × HCF(a, b) = a × b

Example: Find out the LCM and HCF of 15 and 70. Also verify the relationship between LCM, HCF, And given numbers?

Solution:

Prime factors of 15 = 3 × 5

Prime factors of 70 = 2 × 5 × 7

LCM: 2 × 3 × 5 × 7

HCF: 5

Verifying the relationship:

LCM × HCF = 2 × 3 × 5 × 5 × 7 = 1050

Product of two numbers = 15 × 70 = 1050

From above you can see that

LCM (15, 70) × HCF(15, 70) = Product of two numbers

Hence Verified.

### We can also find out LCM and HCF of more than two numbers using the Prime factorization method. This is the same as that of finding LCM and HCF of two numbers.

Example: Find out the LCM and HCF of 18, 30, 90?

Solution:

Prime factors of 18 = 2 × 3 × 3

Prime factors of 30 = 2 × 3 × 5

Prime factors of 90 = 2 × 3 × 3 × 5

LCM: 2 × 3 × 3 × 5 = 90

HCF: 2 × 3 = 6

You can use any of the above methods to find out the LCM and HCF of given numbers.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up