# How did someone discover LCM?

How did someone came up with an idea that if we do prime factorization of two numbers and then multiply all the prime factors but including common ones only once, we will get a number that is the least common multiple of these two numbers?

And why do we take the repeating factors only once? I know this question might sound silly but I am a total beginner and math who don't know anything. Please help me understand this.

• What is the oldest use of the term that you know of? Commented Nov 21, 2023 at 14:30
• Such a statement occurs in Gauss's Disquisitiones Arithmeticae and is based on unique factorization. Euclid IX.14 gives the result for the LCM of (distinct) prime numbers. See Collison (1980) for further discussion. Euclid VII.34 gives different method for finding the LCM of any two numbers. Commented Nov 21, 2023 at 15:05
• Sorry I wasn't more help. As a history site, "how did someone" questions usually mean who did it and what did they actually do. The actual history may be simple or complicated. If you want a beginner-level explanation of how one might discover it, or to break down Gauss's or Euclid's approach, maybe ask on mathematics.stackexchange.com (Beware: Gauss says it's simple and doesn't need explanation.) Commented Nov 21, 2023 at 16:36
• Of course the GCD and LCM are in Euclid. (Computed by a nice algorithm of repeated subtraction. No primes used.) Presumably any more modern rule to compute it using prime factorizations is done in exactly that way so that it agrees with the old Euclid LCM. Commented Nov 22, 2023 at 2:55
• You stated the result incorrectly if the first number has a factor $p^n$ and the second $p^m$ for a prime $p$, then the least common multiple will contain $p^{max\{m,n\}}$. The first proof of prime factorization is due to Gauss. But there are simpler algorithms to find LCM and GCD which I due to Euclid. Evidence shows that the existence and uniqueness of prime factorization was not known to the Greeks. Commented Nov 22, 2023 at 9:14