# Irreducibility of gcd/lcm or lcm/gcd

Consider two irreducible fractions:

$r_{1} = \frac{p_{1}}{q_{1}}$

$r_{2} = \frac{p_{2}}{q_{2}}$

Are these two fractions:

$r_{3} = \frac{\text{gcd}\left(p_{1}, p_{2}\right)}{\text{lcm}\left(q_{1}, q_{2}\right)}$

$r_{4} = \frac{\text{lcm}\left(p_{1}, p_{2}\right)}{\text{gcd}\left(q_{1}, q_{2}\right)}$

irreducible fractions?

(and if yes, how to demonstrate it?)

• They are absolutely symmetrical, so you need only one to prove. – Ian Mateus Dec 27 '13 at 20:53
• @IanMateus: are you sure that they are symmetrical since in the first case, we take lcm of the two denominators, and in the second case, we take lcm of the two numerators? – Vincent Dec 27 '13 at 20:54
• Yes, because if $a/b$ is in lowest terms, so is $b/a.$ – Igor Rivin Dec 27 '13 at 20:55
• @IgorRivin Yes, but I think that $r_3 \neq 1/r_4$ – Vincent Dec 27 '13 at 20:58
• @Vincent I don't mean symmetrical for $r_3 r_4=1$, instead I mean the argument is the same. – Ian Mateus Dec 27 '13 at 21:03

Let $p$ be a prime that divides $\gcd(p_1, p_2)$. Then $p|p_1$ and $p | p_2$. Hence $p$ does not divide either $q_1$ or $q_2$. Hence it does not divide the lcm of $g_1$ and $g_2$. Hence $\gcd(p_1, p_2)$ and $lcm(g_1, g_2)$ are co-prime

Same argument for the second ratio also. Just start with $\gcd$ and work towards $lcm$

Suppose that $\frac{\gcd(p_1,p_2)}{\text{lcm}(q_1,q_2)}$ is not irreducible.

Then there is a prime $p$ that divides both $\gcd(p_1,p_2)$ and $\text{lcm}(q_1,q_2)$.

So $p$ divides $p_1$ and $p_2$, and $p$ divides at least one of $q_1$ or $q_2$. This contradicts the fact that the fractions $\frac{p_1}{q_1}$ and $\frac{p_2}{q_2}$ are both irreducible.

Recall $\rm\ (p,lcm(q_1,q_2)) = lcm((p,q_1),(p,q_2)),\,$ i.e. gcd distributes over lcm. Hence

$\rm\ \ ((p_1,p_2),lcm(q_1,q_2)) = lcm((\color{#c00}{p_1},p_2,\color{#c00}{q_1}),(p_1,\color{#0a0}{p_2,q_2})) = lcm(\color{#C00}1,\color{#0a0}1) = 1\$

since we know, by hypothesis $\rm\ \color{#c00}{(p_1,q_1)=1},\ \color{#0a0}{(p_2,q_2)=1}.\ \$ QED

Remark $\$ Using only gcds and lcms (vs. full-blown prime factorizations), this method generalizes to any domain where gcds exist, i.e. any gcd domain (which need not have any primes, e.g. the ring of all algebraic integers). Moroever, if one desires to compute the value of an expression of this form, it is much more efficient to compute gcds (Euclidean algorithm) than prime factorizations. Generally, one can use gcds to compute factorizations into coprimes (vs. primes), which often suffices to solve many problems.