1

The question is as is in the title:

Is $\gcd\bigg(\gcd(a,b),\gcd(c,d)\bigg) = \gcd\bigg(\gcd(a,c),\gcd(b,d)\bigg)$ another instance of GCD Associativity?

I know that $$\gcd\bigg(e,\gcd(f,g)\bigg)=\gcd\bigg(\gcd(e,f),g\bigg)=\gcd(e,f,g).$$

I was wondering whether this can be extended to $$\gcd\bigg(\gcd(a,b),\gcd(c,d)\bigg) = \gcd\bigg(\gcd(a,c),\gcd(b,d)\bigg) = \gcd\bigg(\gcd(a,d),\gcd(b,c)\bigg) = \gcd(a, b, c, d)?$$

I tried checking this closely related question, but it appears that my inquiry is not covered there.

2 Answers2

0

All those forms are equal, and equal to $\,\gcd(a,b,c,d)\,$. This follows from piecing together the results quoted below, whose full proofs can be found at the respective links.

This means the multi-variate $\,\gcd(a_1, a_2, \dots, a_n)\,$ is well-defined and invariant to permutations of variables, so $\gcd\bigg(\gcd(a,b),\gcd(c,d)\bigg)$ $=\gcd(a,b,c,d)$ $= \gcd\bigg(\gcd(a,c),\gcd(b,d)\bigg)=\dots$


[ EDIT ] $\;$ To emphasize the commutativity point in relation to this part of the question:

Is $\gcd\bigg(\gcd(a,b),\gcd(c,d)\bigg) = \gcd\bigg(\gcd(a,c),\gcd(b,d)\bigg)$ another instance of GCD Associativity?

The equality does hold true, indeed, but only because $\,\gcd\,$ is commutative in addition to being associative. If, for example, $\,a,b,c,d\,$ were square matrices of the same size, instead, and $\,\gcd\,$ were replaced with matrix multiplication, the equality $\,(a \cdot b) \cdot (c \cdot d) = (a \cdot c) \cdot (b \cdot d)\,$ would not hold true in general, because matrix multiplication is associative, but is not commutative.

dxiv
  • 76,497
0

One way to define the $\gcd$ is to consider subgroups of $\mathbb Z$. Indeed such a subgroup is of the form $a\mathbb Z$ for some $a\ge0$.

Then the $\gcd$ of $a$ and $b$ is defined to be the unique positive integer satisfying $$a\mathbb Z + b\mathbb Z = \gcd(a,b)\mathbb Z\,.$$

Since addition is associative and commutative, so is the $\gcd$. Specifically, your examples give

$$\begin{align}(a\mathbb Z + b\mathbb Z) + (c\mathbb Z + d\mathbb Z) &= (a\mathbb Z + c\mathbb Z)+(b\mathbb Z + d\mathbb Z) \\ &= (a\mathbb Z + d\mathbb Z)+(b\mathbb Z + c\mathbb Z) \\ &= a\mathbb Z + b\mathbb Z+c\mathbb Z + d\mathbb Z\,.\end{align}$$

Astyx
  • 3,883