14

Prove $\gcd(a,b,c)=\gcd(\gcd(a,b),c)$ for $0\ne a,b,c\in \Bbb{Z}$. I tried solving it with sets but I sense there are some details I am missing. I would truly appreciate your reference.

Bill Dubuque
  • 272,048

6 Answers6

18

Hint $ $ By $\,\color{#c00}{\rm U}= $ gcd Universal Property (see below) we have

$$d\mid(a,b,c)\!\!\color{#c00}{\overset{\rm\ U}\iff} d\mid a,b,c\!\!\color{#c00}{\overset{\rm\ U}\iff} d\,\mid (a,b),c\!\!\color{#c00}{\overset{\rm\ U}\iff} d\mid ((a,b),c)\qquad$$

So $\,(a,b,c)\,$ & $\,((a,b),c)\,$ divide each other (let $\,d\,$ equal each above) so they're equal, being $> 0$.

This is the associative property of the GCD. In the same way, by induction, we can erase (or normalize) brackets in $n$-argument gcds, showing general associativity of the gcd, e.g. see here.

Remark $\ $ For completeness, below is a proof of $\,\color{#c00}{\rm U}= $ gcd Universal Property.

Lemma $\ \ d\mid a_1,\ldots,a_n\!\overset{\rm\color{#c00}U\!\!}\iff d\mid (a_1,\ldots,a_n)\ \ \ $ [GCD Universal Property]

${\bf Proof}\quad\ d\mid a_1,\ldots,a_n\Rightarrow\, d\mid (a_1,\ldots,a_n) = j_1 a_1\!+\ldots+j_n a_n\,$ for some $\, j_i\in\Bbb Z,\,$ by Bezout.

$\qquad\qquad\, d\mid (a_1,\ldots,a_n)\mid a_1,\ldots,a_n\,\Rightarrow\, d\mid a_1,\ldots,a_n\,$ by transitivity of $ $ "divides",

The second divisibility in the prior line is due to the gcd being a common divisor of its arguments.

Remark $ $ Dually, as above, associativity of LCM is immediate from the universal property of LCM

Lemma $\ \ a_1,\ldots,a_n\mid m\iff {\rm lcm}(a_1,\ldots,a_n)\mid m\ \ \ $ [LCM Universal Property]

These universal properties are the definitions of GCD & LCM in more general rings - where the Bezout identity need not hold true, e.g. in $\,\Bbb Z[x]\,$ and $\,\Bbb Q[x,y]\,$ where the gcds $\,(x,2) = 1 = (x,y)\,$ cannot be written as linear combinations. Follow the links for further details.

Application to computation (Bezout) $ $ We can exploit gcd associativity to reduce many-argument (extended) gcd computations to compositions of two-argument (extended) gcds, e.g.

$$(a,b,c) = ((a,b),c) = i(a,b)+jc = i(ka\!+\!\ell b)+jc = ik\:\!a + i\ell\:\!b + j\:\!c\qquad$$

where $\,k,\ell\,$ are Bezout coefs for $\,e:=(a,b) = ka+\ell b,\,$ and $\,i,j\,$ for $(e,c) = ie+jc$

Algebraically the key idea is that integer linear combinations of $\,a,b,c\,$ are closed under integer linear combinations - which combined with gcd associativity allows us to decompose many-argument gcds in any way we please (as long as all arguments are included). This innate linearity is clarified when one studies ideals and modules.

Alternatively, we can directly apply the forward (extended) Euclidean algorithm, e.g, as here, which generally will be more efficient for many-argument gcds.

Bill Dubuque
  • 272,048
16

The def of $d=\gcd(a,b)$ is $d|a$ and $d|b$ and if $f|a$ and $f|b$ then $f|d$.

Suppose $x=\gcd(a,b,c)$. Then $x|a$ and $x|b$ and $x|c$ so $x|\gcd(a,b)$ and $x|c$, so $x|\gcd(\gcd(a,b),c)$. Conversely if $x=\gcd(\gcd(a,b),c)$ then $x|\gcd(a,b)$ and $x|c$. So $x|a$ and $x|b$ and $x|c$, so $x|\gcd(a,b,c)$. Thus $\gcd(a,b,c) | \gcd(\gcd(a,b),c)$ and $\gcd(\gcd(a,b),c)| \gcd(a,b,c)$. Therefore $\gcd(\gcd(a,b),c) = \gcd(a,b,c)$

Gregory Grant
  • 14,874
  • In the definition I was given, nothing is said about every divisor dividing the gcd. How is it shown? – Meitar Abarbanel Mar 14 '15 at 13:55
  • It doesn't need to be shown, it's part of the definition, so you can assume it once you know $d=\gcd(a,b)$ then automatically any other divisor of $a$ and $b$ must divide $d$. – Gregory Grant Mar 14 '15 at 15:30
  • Please post the definition you were given, so we can see how it differs from this one I gave. – Gregory Grant Mar 14 '15 at 15:30
  • "The greatest common divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder." – Meitar Abarbanel Mar 14 '15 at 16:04
0

A different definition of gcd affords another proof.

For $p_i\in \mathbb P \land p_i\mid abc$, then $a=\prod p_i^{\alpha_i},\ b=\prod p_i^{\beta_i},\ c=\prod p_i^{\gamma_i} \Rightarrow \gcd(a,b,c)=\prod p_i^{\min(\alpha_i,\beta_i,\gamma_i)}$

Note that in some cases, an exponent $\alpha_i,\beta_i,\gamma_i$ will be $0$ when a particular $p_i$ is not a factor of one or another of $a,b,c$, but since $p_i\mid abc$, at least one of $\alpha_i,\beta_i,\gamma_i$ will be greater than $0$

Similarly, $\gcd(a,b)=\prod p_i^{\min(\alpha_i,\beta_i)}$

Hence, $\gcd(\gcd(a,b),c)=\prod p_i^{\min({\min(\alpha_i,\beta_i)},\gamma_i)}=\prod p_i^{\min(\alpha_i,\beta_i,\gamma_i)}=\gcd(a,b,c)$ QED

0

Since the minimum over a set is no greater than the minimum over a subset, $$ \begin{align} \gcd(\gcd(a,b),c) &={\min_{u,v}}^+\!\left({\min_{x,y}}^+(ax+by)u+cv\right)\\ &\ge{\min_{x,y,z}}^+(ax+by+cz)\\ &=\gcd(a,b,c)\tag1 \end{align} $$ $\gcd(a,b)\mid a,b$ and so $\gcd(\gcd(a,b),c)\mid a,b,c$. Thus, by the maximality of the gcd, $$ \gcd(\gcd(a,b),c)\le\gcd(a,b,c)\tag2 $$ $(1)$ and $(2)$ imply that $$ \gcd(\gcd(a,b),c)=\gcd(a,b,c)\tag3 $$

robjohn
  • 345,667
0

An easy way to see this is to realize that $\mbox{min}(x,y,z)=\mbox{min}(\mbox{min}(x,y),z)$. for integers $x,y,z$.

How do we use this? Fix a $p$ and determine its exponent on each side. For this, it suffices to imagine that $a,b,c$ are powers of a fixed prime $p$. Then if $a=p^x,b=p^y,c=p^z$, we have $$\mbox{gcd}(a,b,c)=p^{\mbox{min}(x,y,z)}=p^{\mbox{min}(\mbox{min}(x,y),z)}=\mbox{gcd}(p^{\mbox{min}(x,y)},p^z)=\mbox{gcd}(\mbox{gcd}(a,b),c).$$

This is true for each $p$, so the two sides must be equal.

Pjong
  • 1
-1

Proof: Let $d=gcd(a,b,c)$ for positive integers $a$,$b$, and $c$. Then $d\mid a$, $d\mid b$, and $d\mid c$. Hence, $d\mid gcd(a,b)$ and $d\mid c$ and so $d\mid gcd(gcd(a,b),c)$. Thus, $d\mid f$ where $f=gcd(e,c)$ and $e=gcd(a,b)$. Since $f=gcd(e,c)$, then $f\mid e$ and $f\mid c$. Hence, $f\mid a$, $f\mid b$, and $f\mid c$, so $f\mid gcd(a,b,c)$ which means $f\mid d$. Since $d\mid f$ and $f\mid d$, $d=f$.