MathorynMathematical Formula Database

Number Theory

GCD–LCM Relation

For positive integers, the product of the greatest common divisor and the least common multiple equals the product of the numbers. It lets you compute the LCM from the GCD.

gcd⁡(a,b)⋅lcm⁡(a,b)=a b\gcd(a,b)\cdot\operatorname{lcm}(a,b)=a\,b
LaTeX\gcd(a,b)\cdot\operatorname{lcm}(a,b)=a\,b

Variables

gcd⁡(a,b)\gcd(a,b)
greatest common divisor
lcm⁡(a,b)\operatorname{lcm}(a,b)
least common multiple
a, ba,\ b
positive integers

Example

Find lcm⁡(12,18)\operatorname{lcm}(12,18).

  1. gcd⁡(12,18)=6\gcd(12,18)=6.
  2. lcm⁡=12⋅186=2166\operatorname{lcm}=\frac{12\cdot18}{6}=\frac{216}{6}.

Answer: 3636.

Related formulas