How to prove $\gcd(a^2,b^2) = (\gcd(a,b))^2$?
How to prove $\gcd(a^2, b^2) = (\gcd(a, b))^2$?
My attempt:
Let $\gcd(a, b) = d$.
Then $d|a$ and $d|b$ then $d^2|a^2$ and $d^2|b^2$. i.e $d^2$ divides $a^2 ~~\&~~ b^2$.
Solution 1:
Hint: Factor $a$ and $b$ into primes. If $a=p_1^{n_1}\\cdot\ldots\cdot p_k^{n_k}$ and $b=p_1^{m_1}\cdot\ldots\cdot p_k^{m_k}$ with each $n_i,m_i\ge 0$. Then
$$(a,b)=p_1^{\min\{n_1,m_1\}}\cdot\ldots\cdot p_k^{\min\{n_k,m_k\}}.$$
Solution 2:
I'll use the notation of Michael's answer.
Since $g_2\mid a^2$, $g_2\mid b^2$, $g_1\mid a$ and $g_1\mid b$, there are integers $p,q,r,s$ such that:
$$a^2 = g_2p, \ b^2=g_2q, \ a=g_1r, \ b=g_1s \ ,$$
with $gcd(p,q)=1$ and $gcd(r,s)=1$. Manipulating those expressions, is easy to get that $r^2q=s^2p$ and, by Euclid's lemma, $r^2\mid p$ and $p\mid r^2$ thus $p=r^2$ (assuming positive integers), similarly, $q=s^2$ so finally
$$g_1^2 = \frac{a^2}{r^2}=\frac{g_2p}{r^2} = g_2$$
Here I use that if $gcd(r,s)=1$, then $gcd(r^2,s^2)=1$. This is much easier to prove than the general case so my reasoning is not circular.
Solution 3:
If $\gcd(a,b)=d$, then
$a = a'd$
$b = b'd$
and $\gcd(a',b') = 1$
That means
$a^2 = {a'}^2d^2$
$b^2 = {b'}^2d^2$
and $\gcd({a'}^2,{b'}^2) = 1$ $ ~~\color{red}{ \star }$
Hence $\gcd(a^2,b^2)=d^2$.
$ ~~\color{red}{ \star }$ pelase see this.
Solution 4:
$\begin{align}(a,b)(a^2,b^2) =&\ (a^3,a^2b,ab^2,b^3)\quad [\text{by basic gcd laws - see Remark below}]\\ =&\ (a,b)^3\end{align}$
Thus $\ (a^2,b^2) = (a,b)^2\ $ by cancelling $\,(a,b) \neq 0.\ \ $ [See here for the cubic analog]
Or: Gauss's Lemma (GL) yields a slick proof. Let $\rm\:{\cal C}(f)\:$ denote the content of a polynomial, i.e. the gcd of its coefficients. Then GL $\rm\: \Rightarrow\ {\cal C}(f\:g) \color{#c00}{\overset{\rm GL_{\phantom |}\!}=}\ {\cal C}(f)\ {\cal C}(g)\ $ so
$$ (a,b)^2\! =\ {\cal C}\:(ax\! +\! b)\ {\cal C}\:(a x\! -\! b)\, \color{#c00}{\overset{\rm GL_{\phantom |}\!}=}\, {\cal C}\:((a x\! +\! b)(ax\! -\! b))\, =\, {\cal C}\:(a^2 x^2\! -\! b^2)\, =\, (a^2,b^2)\qquad$$
Replying to comments, we used only basic gcd laws (associative & commutative & distributive), e.g. let's do the gcd analog of the binomial theorem (in detail)
$\ (a,b)^2\! = (a,b)(a,b) = ((a,b)a,(a,b)b) = ((a^2,ba),(ab,b^2)) = (a^2,ba,ab,b^2) = (a^2,ab,b^2)$
Similarly $\,(a,b)^3 = (a,b)(a,b)^2 = (a,b)(a^2,ab,b^2) =\,\cdots\, = (a^3,a^2b,ab^2,b^3)$
By induction $\ (a,b)^n = (a^n, a^{n-1}b,\cdots\,ab^{n-1},b^n)\ $ is straightforwardly proved.
Such gcd arithmetic requires no ingenuity, it is analogous to multiplying polynomials.
The proof generalizes to the Freshman' Dream $\,(a,b)^n = (a^n,b^n)\,$ for gcds and invertible ideals.