What is the proof of finding the LCM of numbers by prime factorization method? Fir example on the internet I found this method to find the LCM :
Let's find the LCM of 30 and 45. One way to find the least common multiple of two numbers is to first list the prime factors of each number.
30 = 2 × 3 × 5
45 = 3 × 3 × 5
Then multiply each factor the greatest number of times it occurs in either number. If the same factor occurs more than once in both numbers, you multiply the factor the greatest number of times it occurs.
2: one occurrence 
3: two occurrences 
5: one occurrence 
2 × 3 × 3 × 5 = 90 <— LCM
How would I go about proving that this method works for all numbers ?  Is there a way ?

Here is an alternate method. Since we know that $ab=$lcm$(a,b)\cdot $gcd$(a,b)$, one can find gcd$(a,b)$ using standard method or Euclid's algorithm. Then divide $ab$ by gcd$(a,b)$ yields the desired result.
