Least Common Multiple (LCM)

Compute the least common multiple (LCM) of two natural numbers

LCM Calculator

Least common multiple

The LCM is the smallest positive number that is a multiple of both input numbers. Relation to GCD: lcm(a,b) × gcd(a,b) = a × b.

lcm(18, 30) = ?
Enter numbers
Natural number a ≥ 1
Natural number b ≥ 1
Calculation result
LCM =
Calculation: Least common multiple of a and b

LCM Info

Properties

LCM: Smallest number that both input values divide

lcm LCM multiples

Relation to GCD: lcm(a,b) × gcd(a,b) = a × b
Formula: lcm(a,b) = |a×b|/gcd(a,b)

Computation methods
1. Multiples sets: List and compare
2. GCD formula: lcm = (a×b)/gcd(a,b)
3. Prime factorization: Highest powers

Formulas and definitions

Definition
\[\text{lcm}(a,b) = \min\{n \in \mathbb{N} : a|n \text{ and } b|n\}\]

Smallest natural number divisible by both

Fundamental formula
\[\text{lcm}(a,b) = \frac{|a \times b|}{\gcd(a,b)}\]

Relation between LCM and GCD

Generalization
\[\text{lcm}(a_1, a_2, \ldots, a_n) = \frac{\prod_{i=1}^{n} a_i}{\gcd_{\text{all}}}\]

Extension to multiple numbers

Properties
\[\text{lcm}(a,b) \times \gcd(a,b) = a \times b\]

Fundamental relation between LCM and GCD

Prime factorization
\[a = \prod p_i^{\alpha_i}, \quad b = \prod p_i^{\beta_i}\] \[\text{lcm}(a,b) = \prod p_i^{\max(\alpha_i, \beta_i)}\]

LCM via prime factorization

Special cases
\[\text{lcm}(a,1) = a\] \[\text{lcm}(a,a) = a\] \[\text{lcm}(a,b) = a \times b \text{ if } \gcd(a,b) = 1\]

Important LCM special cases

Example: lcm(18, 30)

Method 1: Multiples sets
Step 1: Determine multiples sets
V₁₈ = {18, 36, 54, 72, 90, 108, 126, 144, 162, 180, ...}
V₃₀ = {30, 60, 90, 120, 150, 180, 210, 240, ...}

Common multiples: 90, 180, 270, ...

Step 2: Identify smallest
lcm(18, 30) = 90

The least common multiple is 90

lcm(18, 30) = 90
Method 2: GCD formula
Step 1: compute gcd(18, 30)
30 = 1 × 18 + 12
18 = 1 × 12 + 6
12 = 2 × 6 + 0 → gcd(18, 30) = 6
Step 2: apply LCM formula
lcm(18, 30) = (18 × 30) ÷ 6 = 540 ÷ 6 = 90
Verification
90 ÷ 18 = 5 ✓
90 ÷ 30 = 3 ✓
90 is divisible by both
No smaller number satisfies this
Prime factorization
18 = 2¹ × 3²
30 = 2¹ × 3¹ × 5¹
lcm = 2¹ × 3² × 5¹ = 2 × 9 × 5 = 90

Highest powers of all prime factors

Comparison of computation methods
Multiples sets
Illustrative, time-consuming
GCD formula
Efficient, elegant
Prime factors
Systematic, multiple numbers

Different ways lead to the same result

Applications of the LCM

The least common multiple has many practical applications:

Fractions
  • Common denominator for fraction addition
  • Create like-denominator fractions
  • Simplify fraction comparisons
  • Repeating decimals
Scheduling & cycles
  • Recurring events
  • Coordinate shift plans
  • Period calculations
  • Synchronize processes
Engineering & technology
  • Optimize gear ratios
  • Frequency synchronization
  • Clock cycles in computers
  • Coordinate machine fleets
Mathematics & computer science
  • Number theory and algebra
  • Modular arithmetic
  • Cryptographic algorithms
  • Discrete mathematics

The LCM: Duality with GCD and practical importance

The least common multiple together with the greatest common divisor forms a dual pair of fundamental number-theoretic concepts. While the GCD is the largest number dividing both, the LCM is the smallest number that both numbers divide. This duality is expressed in the elegant formula lcm(a,b) × gcd(a,b) = a × b and connects abstract number theory with practical applications in fractions, scheduling and engineering.

Properties
  • lcm(a,b) ≥ max(a,b)
  • lcm(a,b) × gcd(a,b) = a × b
  • Commutative: lcm(a,b) = lcm(b,a)
  • Associative for multiple numbers
Significance
  • Common denominator in fractions
  • Synchronization of periodic processes
  • Basis for modular arithmetic
  • Optimization in combinatorics
Computation methods
  • Multiples sets (small numbers)
  • GCD formula (efficient)
  • Prime factorization (systematic)
  • Euclidean algorithm (indirect)
Summary

The least common multiple links elementary number theory with practical applications in mathematics, engineering and everyday life. The elegant duality with the GCD shows the deep structure of natural numbers and enables efficient algorithms. From fraction arithmetic to synchronization of complex systems, the LCM remains an indispensable tool that unites mathematical beauty with practical utility.