# LCM Calculator

## Calculating the Least Common Multiple (LCM)

The Least Common Multiple (LCM) of two or more integers is the smallest positive integer that is divisible by each of the given numbers without leaving a remainder. The LCM is useful when dealing with problems involving addition or subtraction of fractions, finding common denominators, or solving problems related to repeating events.

To find the LCM of a set of numbers, you can use the relationship between the Greatest Common Divisor (GCD) and the LCM:

\( \text{LCM}(a, b) = \dfrac{|a \times b|}{\text{GCD}(a, b)} \)

This formula can be extended to more than two numbers by iteratively calculating the LCM of the current result and the next number in the list.

## Examples

Let's go through some examples to understand how to calculate the LCM of different sets of numbers.

### 1. Calculate the LCM of 10, 40, and 15.

#### Answer

First, we identify the given numbers:

**Given:**

- Numbers: 10, 40, 15

We begin by calculating the LCM of the first two numbers:

**Steps:**

- LCM(10, 40) = \(\dfrac{|10 \times 40|}{\text{GCD}(10, 40)}\)
- GCD(10, 40) = 10
- LCM(10, 40) = \(\dfrac{400}{10} = 40\)

Next, we calculate the LCM of 40 and 15:

- LCM(40, 15) = \(\dfrac{|40 \times 15|}{\text{GCD}(40, 15)}\)
- GCD(40, 15) = 5
- LCM(40, 15) = \(\dfrac{600}{5} = 120\)

Thus, the LCM of 10, 40, and 15 is 120.

**Result:**

∴ The LCM of 10, 40, and 15 is 120.

### 2. Find the LCM of 12 and 18.

#### Answer

We start by identifying the numbers:

**Given:**

- Numbers: 12, 18

We calculate the LCM using the formula:

**Steps:**

- LCM(12, 18) = \(\dfrac{|12 \times 18|}{\text{GCD}(12, 18)}\)
- GCD(12, 18) = 6
- LCM(12, 18) = \(\dfrac{216}{6} = 36\)

The LCM of 12 and 18 is 36.

**Result:**

∴ The LCM of 12 and 18 is 36.

### 3. Determine the LCM of 7, 5, and 3.

#### Answer

First, we identify the given numbers:

**Given:**

- Numbers: 7, 5, 3

We begin by calculating the LCM of the first two numbers:

**Steps:**

- LCM(7, 5) = \(\dfrac{|7 \times 5|}{\text{GCD}(7, 5)}\)
- GCD(7, 5) = 1
- LCM(7, 5) = \(\dfrac{35}{1} = 35\)

Next, we calculate the LCM of 35 and 3:

- LCM(35, 3) = \(\dfrac{|35 \times 3|}{\text{GCD}(35, 3)}\)
- GCD(35, 3) = 1
- LCM(35, 3) = \(\dfrac{105}{1} = 105\)

Thus, the LCM of 7, 5, and 3 is 105.

**Result:**

∴ The LCM of 7, 5, and 3 is 105.

### 4. Find the LCM of 8, 9, and 12.

#### Answer

We start by identifying the numbers:

**Given:**

- Numbers: 8, 9, 12

We calculate the LCM of the first two numbers:

**Steps:**

- LCM(8, 9) = \(\dfrac{|8 \times 9|}{\text{GCD}(8, 9)}\)
- GCD(8, 9) = 1
- LCM(8, 9) = \(\dfrac{72}{1} = 72\)

Next, we calculate the LCM of 72 and 12:

- LCM(72, 12) = \(\dfrac{|72 \times 12|}{\text{GCD}(72, 12)}\)
- GCD(72, 12) = 12
- LCM(72, 12) = \(\dfrac{864}{12} = 72\)

Thus, the LCM of 8, 9, and 12 is 72.

**Result:**

∴ The LCM of 8, 9, and 12 is 72.