Section 8.6 LCM and GCD via prime factorizations
Definition 8.6.1.
The least common multiple \(\lcm(a,b)\) of positive integers \(a\) and \(b\) is the smallest positive integer divisible by both \(a\) and \(b\text{.}\)
For example, \(\lcm(15,12)=60\text{.}\)
Theorem 8.6.2.
Let \(a\) and \(b\) have prime factorizations,
Here \(p_i\)'s are distinct, but \(r_i\) and \(s_i\) are allowed to be zero. Then:
\(\gcd(a,b) = p_1^{min(r_1,s_1)}\cdots p_m^{min(r_m,s_m)}\text{.}\)
\(\lcm(a,b) = p_1^{max(r_1,s_1)}\cdots p_m^{max(r_m,s_m)}\text{.}\)
\(\lcm(a,b) = ab/\gcd(a,b)\text{.}\)
We leave the proof of this as an exercise.
Example 8.6.3.
If \(a=120=2^3\cdot 3\cdot 5\) and \(b=36=2^2\cdot 3^2\text{,}\) then \(\gcd=2^2\cdot 3=12\) and \(\lcm=2^3\cdot 3^2 \cdot 5=360=\frac{120\cdot 36}{12}\text{,}\)
Lemma 8.6.4.
Let \(r \in \QQ\text{.}\) Then there exist unique coprime integers \(a\) and \(b\) such that \(r = \frac{a}{b}\) and \(b \geq 1\text{.}\)
Proof.
Since \(r\) is rational, there are integers \(a'\) and \(b'\) such that \(r = \frac{a'}{b'}\text{,}\) with \(b' \neq 0\text{.}\) Without loss of generality, we may assume that \(b'>0\text{.}\) If we find \(-r = \frac{a}{b}\) with \(a\) and \(b\) coprime, then \(r = \frac{-a}{b}\) with \(-a\) and \(b\) coprime, so we may assume that \(r\geq 0\text{.}\)
Now let \(p_1, \cdots, p_k\) be the prime numbers that divide either \(a'\) or \(b'\text{.}\) We may therefore write
where each exponent \(m_i\) and \(n_i\) is nonnegative. Now for each \(i\text{,}\) let
Thus for each \(i\text{,}\) at most one of \(s_i\) and \(t_i\) is nonzero, and
Thus we set
and we find that
Now
Now let us prove that \(a\) and \(b\) are unique with this property. If \(c\) and \(d\) are coprime integers with \(d \geq 1\text{,}\) and if \(r = \frac{c}{d}\text{,}\) then \(ad = bc\text{.}\) Since \(a\) and \(b\) are coprime, it follows that \(b\) divides \(d\text{,}\) and since \(c\) and \(d\) are coprime, it follows that \(d\) divides \(b\text{.}\) Thus \(d=b\text{,}\) and so \(a=c\) as well.