In arithmetic and number theory, the least common multiple, lowest common multiple, or smallest common multiple of two integers a and b, usually denoted by lcm(a, b), is the smallest positive integer that is divisible by both a and b.
[1][2] Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero.
The least common multiple of the denominators of two fractions is the "lowest common denominator" (lcd), and can be used for adding, subtracting or comparing the fractions.
), is defined as the smallest positive integer that is divisible by each of a, b, c, .
Because 10 is the smallest positive integer that is divisible by both 5 and 2, it is the least common multiple of 5 and 2.
Suppose there are three planets revolving around a star which take l, m and n units of time, respectively, to complete their orbits.
Assuming the planets started moving around the star after an initial linear alignment, all the planets attain a linear alignment again after
The least common multiple can be computed from the greatest common divisor (gcd) with the formula To avoid introducing integers that are larger than the result, it is convenient to use the equivalent formulas where the result of the division is always an integer.
However, if both a and b are 0, these formulas would cause division by zero; so, lcm(0, 0) = 0 must be considered as a special case.
As these algorithms are more efficient with factors of similar size, it is more efficient to divide the largest argument of the lcm by the gcd of the arguments, as in the example above.
The unique factorization theorem indicates that every positive integer greater than 1 can be written in only one way as a product of prime numbers.
The lcm will be the product of multiplying the highest power of each prime number together.
The same method can also be illustrated with a Venn diagram as follows, with the prime factorization of each of the two numbers demonstrated in each circle and all factors they share in common in the intersection.
The lcm then can be found by multiplying all of the prime numbers in the diagram.
Here is an example: sharing two "2"s and a "3" in common: This also works for the greatest common divisor (gcd), except that instead of multiplying all of the numbers in the Venn diagram, one multiplies only the prime factors that are in the intersection.
According to the fundamental theorem of arithmetic, every integer greater than 1 can be represented uniquely as a product of prime numbers, up to the order of the factors: where the exponents n2, n3, ... are non-negative integers; for example, 84 = 22 31 50 71 110 130 ...
, their least common multiple and greatest common divisor are given by the formulas and Since this gives In fact, every rational number can be written uniquely as the product of primes, if negative exponents are allowed.
Under this ordering, the positive integers become a lattice, with meet given by the gcd and join given by the lcm.
The proof is straightforward, if a bit tedious; it amounts to checking that lcm and gcd satisfy the axioms for meet and join.
Putting the lcm and gcd into this more general context establishes a duality between them: The following pairs of dual formulas are special cases of general lattice-theoretic identities.
[10] In a unique factorization domain, any two elements have a least common multiple.