information:highlighting, information:classification, structural:reformatting, information:filtering, structural:expansion
Using prime factorization

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 prime numbers can be considered as the atomic elements which, when combined, make up a composite number.

For example:

Here, the composite number 90 is made up of one atom of the prime number 2, two atoms of the prime number 3, and one atom of the prime number 5.

This fact can be used to find the lcm of a set of numbers.

Example: lcm(8,9,21)

Factor each number and express it as a product of prime number powers.

The lcm will be the product of multiplying the highest power of each prime number together. The highest power of the three prime numbers 2, 3, and 7 is 2, 3, and 7, respectively. Thus,

This method is not as efficient as reducing to the greatest common divisor, since there is no known general efficient algorithm for integer factorization.

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. Thus the gcd of 48 and 180 is 2 × 2 × 3 = 12.