Prove that $a$ and $b$ are relatively prime if and only if $a^2$ and $b^2$ are relatively prime.

1.7k Views Asked by At

I am stuck on this problem. I am thinking about prove it by contradiction or contrapositive. However, I could not find a way to work this out. Could someone please help me?

2

There are 2 best solutions below

5
On

$a, b$ coprime $\implies$ $a^2, b^2$ coprime:

Let $m, n$ be such that $ma + nb = 1$. Now raise this to the third power and we get $$ m^3a^3 + 3m^2na^2b + 3mn^2ab^2 + n^3b^3 = 1\\ (m^3a + 3m^2nb)a^2 + (3mn^2a + n^3b)b^2 = 1 $$ so we have $a^2, b^2$ coprime. (I chose to raise to the third power because that forces each term to contain either $a^2$ or $b^2$ as a factor. Raising to the second power would give the awkward $2mnab$ term that I wouldn't know what to do with.)


$a, b$ not coprime $\implies$ $a^2, b^2$ not coprime:

Set $k = \gcd(a, b)>1$, and define $a' = \frac ak, b' = \frac bk$. Then $a', b'$ are integers, and we have $$ a^2 = (ka')^2 = k^2a'^2\\ b^2 = (kb')^2 = k^2b'^2 $$ so $a^2$ and $b^2$ have at the very least a factor of $k^2$ in common (it turns out to be exactly $k^2$, but that's irrelevant) and are therefore not coprime.

0
On

This lemma is actually true in arbitrary GCD domains—integral domains where any two elements have a greatest common divisor. (In particular, it is true even if $\gcd(a,b)$ is not a linear combination of $a$ and $b$.)

Let's write $a\equiv b$ whenever $a$ and $b$ are associate and $a\mid b$ whenever $a$ divides $b$.

  • First we show $c\gcd(a,b)\equiv \gcd(ac,bc)$ for any $c$. If $c$ is zero, then we are done, so suppose $c$ is nonzero. Then $d$ divides $\gcd(a,b)$ iff it divides both $a$ and $b$, iff $cd$ divides both $ac$ and $bc$, iff $cd\mid\gcd(ac,bc)$, iff $d\mid\gcd(ac,bc)/c$.
  • Next we show $\gcd(a,b)\equiv 1\Rightarrow \gcd(a^2,b)\equiv 1$. Suppose $\gcd(a,b)\equiv 1$. Note that $\gcd(a^2,b)$ divides both $a^2$ and $ab$, so it divides $\gcd(a^2,ab)\equiv a\gcd(a,b)\equiv a$. Since $\gcd(a^2,b)$ divides both $a$ and $b$ , it divides $\gcd(a,b)\equiv 1$, so $\gcd(a^2,b)\equiv 1$.
  • Then we show $\gcd(a,b)\equiv 1\Rightarrow \gcd(a^2,b^2)\equiv 1$. Suppose $\gcd(a,b)\equiv 1$. Then $\gcd(a^2,b)\equiv 1$ from the previous point. Let $a'=b$, $b'=(a')^2$. Then we know that $\gcd(a',b')\equiv 1$; using the previous point again gives $\gcd(a'^2,b')\equiv 1$, i.e., $\gcd(a^2,b^2)\equiv 1$.
  • Finally, we show $\gcd(a^2,b^2)\equiv 1\Rightarrow \gcd(a,b)\equiv 1$. Suppose $d\mid \gcd(a,b)$. Then $d\mid a$ and $d\mid b$, so $d^2\mid a^2$ and $d^2\mid b^2$, viz., $d^2\mid\gcd(a^2,b^2)$. But $\gcd(a^2,b^2)\equiv 1$, so $d^2\mid 1$, i.e., $d\equiv 1$. In particular, $\gcd(a,b)\equiv 1$.