Subjects number theory

Gcd Associativity

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Gcd Associativity


1. **State the problem:** We want to show that for integers $a, b, c$ (not all zero) and $d = \gcd(a, b, c)$, the following equalities hold: $$d = \gcd(\gcd(a, b), c) = \gcd(a, \gcd(b, c)) = \gcd(\gcd(a, c), b)$$ 2. **Recall the definition of gcd:** The greatest common divisor (gcd) of a set of integers is the largest positive integer that divides each of them without leaving a remainder. 3. **Express $d$ as gcd of three numbers:** By definition, $d = \gcd(a, b, c)$ means $d$ divides $a$, $b$, and $c$, and any other common divisor of $a, b, c$ divides $d$. 4. **Show $d = \gcd(\gcd(a, b), c)$:** - Let $g_1 = \gcd(a, b)$. Then $g_1$ divides both $a$ and $b$. - Since $d$ divides $a$ and $b$, $d$ divides $g_1$ (because $g_1$ is the greatest such divisor). - Now, $d$ also divides $c$ by definition. - Therefore, $d$ divides both $g_1$ and $c$, so $d$ divides $\gcd(g_1, c)$. - Conversely, $\gcd(g_1, c)$ divides $g_1$ and $c$, so it divides $a$, $b$, and $c$. - Hence, $\gcd(g_1, c)$ divides $d$. - Since both divide each other, they are equal: $$d = \gcd(\gcd(a, b), c)$$ 5. **Show $d = \gcd(a, \gcd(b, c))$:** - Let $g_2 = \gcd(b, c)$. - By similar reasoning, $d$ divides $a$ and $g_2$, so $d$ divides $\gcd(a, g_2)$. - Also, $\gcd(a, g_2)$ divides $a$, $b$, and $c$, so it divides $d$. - Therefore: $$d = \gcd(a, \gcd(b, c))$$ 6. **Show $d = \gcd(\gcd(a, c), b)$:** - Let $g_3 = \gcd(a, c)$. - By the same logic, $d$ divides $g_3$ and $b$, so $d$ divides $\gcd(g_3, b)$. - Also, $\gcd(g_3, b)$ divides $a$, $b$, and $c$, so it divides $d$. - Hence: $$d = \gcd(\gcd(a, c), b)$$ 7. **Conclusion:** We have shown all three equalities hold, so: $$\boxed{\gcd(a, b, c) = \gcd(\gcd(a, b), c) = \gcd(a, \gcd(b, c)) = \gcd(\gcd(a, c), b)}$$ This completes the proof.