The identity `a × b = hcf(a, b) × lcm(a, b)` shows the relationship between the **highest common factor** and **least common multiple** of any two natural numbers. It allows you to compute one if you already know the other.
## Why it works
Every number is made from [[prime factors]]. The `hcf` uses the **lowest powers** of common primes, while the `lcm` uses the **highest powers**. When you multiply them, you end up including **all prime factors of both numbers exactly once**, which is the same as multiplying `a × b` directly.
Example:
> [!TIP]
> $a = 12 = 2^2 \cdot 3$
> $b = 18 = 2 \cdot 3^2$
> $\text{hcf}(12, 18) = 2^1 \cdot 3^1 = 6$
> $\text{lcm}(12, 18) = 2^2 \cdot 3^2 = 36$
> $6 \cdot 36 = 216 = 12 \cdot 18$
> [!NOTE]
> Rearranged formulas:
> $\text{lcm}(a, b) = \frac{a \cdot b}{\text{hcf}(a, b)}$
> $\text{hcf}(a, b) = \frac{a \cdot b}{\text{lcm}(a, b)}$