Why does prime factorization for LCM work? A method to finding the LCM of two numbers is to use prime factoring. I know how to do this, but logically why does this work in finding the lcm
 A: By FTA (existence and uniqueness of prime factorizations), divisibility reduces to divisibility in each prime component, i.e. $\ p^{\large b} q^{\large b'}\!\cdots\mid p^{\large a} q^{\large a'}\!\cdots\!\iff p^{\large b}\mid p^{\large a}\ $ & $\,\ q^{\large b'}\!\mid q^{\large a'}\ \ldots\ $ 
So $\,\ B,C\mid A\iff  p^{\large b},p^{\large c}\mid p^{\large a}\ $ & $\,\ q^{\large b'},q^{\large c'}\mid q^{\large a'}\ \ldots\ $  But we have
$$\qquad\qquad\ \, p^{\large b},p^{\large c}\mid p^{\large a}\! \iff  b,c\le a \iff \max\{b,c\}\le a \iff  p^{\large \max\{b,c\}}\mid p^{\large a}$$
Reassembling the prime components yields the result for the lcm
$$\quad B,C\mid A \iff \color{#c00}{p^{\max\{b,c\}}  q^{\max\{b',c'\}}}\ldots\mid A$$
Remark $\ $ Above we employ the universal characterization of lcm, i.e.
$$\begin{align}  
\ \ \ \ \ B,C\mid A\iff \color{#c00}{{\rm lcm}(B,C)}\mid A\end{align}\qquad\qquad$$
A: The easiest way for the lcm is to find the gcd first by Euclid's algorithm (no prime factorisation needed) and then the lcm of $n$ and $m$ is just $\frac{nm}{\gcd(n,m)}$. Read the enlightening Wikipedia page.
A: This is the method of using prime factorization to find the LCM:
Instructions

*

*Break down the numbers into its prime factors.

*

*Example
Numbers: 9 & 12
9 → 3 x 3
12 → 3 x 2 x 2




*Common prime factors between sets should be reduced so that only one of the shared factors remains.

*

*Example
9 → 3 x 3
12 → ~~3~~ x 2 x 2




*Multiply all of the remaining prime factors together to find the LCM of the numbers.

*

*Example
3 x 3 x 2 x 2 = 36
LCM: 36

This is why this works:
NIQ = Numbers in Question
Naturally every single common multiple of the NIQ must be made up of the prime factors which are used to produce the NIQ.
If ‘9’ and ‘12’ are the NIQ, the prime factors found in this set are ‘2’ and ‘3’
A common multiple of the numbers can contain possess a prime factor which is not one of the prime factors of the NIQ, but the LOWEST common multiple (LCM) will always only possess the prime factors used to create the NIQ.
Now that we know what prime numbers we will be using to produce the LCM, we have to find how many times these prime numbers are present in the prime factors of the LCM.
Since the only prime factors used in this set are ‘2’ and ‘3’, the LCM of the NIQ must be made up by the multiplication of ‘2’ and ‘3’ with a certain quantity of each prime factor.
To find the quantity of prime factors, we must use the least amount of these prime factors which will satisfy all NIQ. For this, we can go through the prime factors we are using and use it the same amount of times that it is used in the number that it is most used in.
In ‘9’ and ‘12’, we see that ‘2’ is used twice in the prime factors of ‘12’ and no times in the prime factors of ‘9’. This means that we must use the prime factor ‘2’ twice so that we can satisfy the NIQ ‘12’.
We see that ‘3’ is used twice in the prime factors of ‘9’ and only once in the prime factors of ‘12’. This means that we must use the prime factor ‘3’ twice so that we can satisfy the NIQ ‘9’. At the same time we satisfy the NIQ ‘12’ because it only needs the prime factor ‘3’ to be used once so that it is satisfied in terms of ‘3’ as a prime factor.
We have determined:

*

*‘3’ is used twice

*‘2’ is used twice
Therefore:
3 x 3 x 2 x 2 = LCM(9,12) = 36
