There exists a theorem stating that for any two positive integers a and b, the product of their greatest common factor (GCF) and their least common multiple (LCM) is equal to the product ab.
Proof of the theorem
We let a=(2a1)⋅(3a2)⋅(5a3)⋅(⋯)⋅(Pan) and b=(2b1)⋅(3b2)⋅(5b3)⋅(⋯)⋅(Pbn), where P is the greatest element of {prime numbers}∩({factors of a}∪{factors of b}), and n is the index of P in {primes}.
Lemma 1. The greatest common factor of a and b is G=(2min(a1,b1))⋅(3min(a2,b2))⋅(5min(a3,b3))⋅(⋯)∗(Pmin(an,bn)).
Proof of lemma 1. Obviously, by properties of exponents, G divides both a and b. Now, again by properties of exponents, G is the greatest number that divides both a and b (since if you increment one power of one prime number, it will not be a factor of at least one of a or b (for that prime, say p∗, let the two powers be r and s, where r≤s. Then we have that the power of p∗ in p∗G is r+1, and then p∗G does not divide the number where r is the exponent of p∗. Thus we have defined the GCF of two numbers in terms of the numbers' prime factors.
Lemma 2. The least common multiple of a and b is L=(2max(a1,b1))⋅(3max(a2,b2))⋅(5max(a3,b3))⋅(⋯)∗(Pmax(an,bn)).
Proof of lemma 2. Obviously, by properties of exponents, L is a multiple of both a and b. Now, again by properties of exponents, L is the least(since if you decrement one power of one prime number, it will not be a multiple of at least one of a or b (for that prime, say p∗, let the two powers be r and s, where r≥s. Then we have that the power of p∗ in G/p∗ is r−1, and then G/p∗ is not a multiple of the number where r is the exponent of p∗. Thus we have defined the LCM of two numbers in terms of the numbers' prime factors.
Lemma 3. We have max(x,y)+min(x,y)=x+y.
Proof of lemma 3. WLOG, assume x≤y. Then x=min(x,y) and y=max(x,y). The result follows by substitution.
The actual proof. We consider ab=(2a1+b1)⋅(3a2+b2)⋅(5a3+b3)⋅(⋯)⋅(Pan+bn) and GL=(2max(a1,b1)+min(a1,b1))⋅(3max(a2,b2)+min(a2,b2))⋅(5max(a3,b3)+min(a3,b3))⋅(⋯)∗(Pmax(an,bn)+max(an,bn)).
By lemma 3, these two are equal. Thus we have ab= GCF(a,b)LCM(a,b). ■