3

Does anyone have a intuition or argument or sketch proof of why $\gcd(a,b) = \gcd(b, a \pmod b)$?

I do have a proof and I understand it, so an intuition would be more helpful.


The proof that I already have:

I show $\gcd(a,b) \mid \gcd(b, a \pmod b)$ and $\gcd(b, a \pmod b) \mid \gcd(a, b)$ which implies $\gcd(a,b) = \gcd(b, a \pmod b)$ and stuff is non-negative.

WLOG $a \geq b$

$\gcd(a,b) \mid a$

$\gcd(a,b) \mid b$

so it divides any linear combination of a and b

Since $a \pmod b = a - qb$ then:

$\gcd(b, a - qb) = bx + (a-qb)y$

$\gcd(b, a - qb) = bx + ay - qby $

$\gcd(b, a \pmod b) = b(x-qy) + ay$

which is a LC of $a$ and $b$.

So $\gcd(a,b) \mid \gcd(b, a \pmod b)$.

Other direction is nearly identical.

5 Answers5

6

Hint: Show that more generally $\gcd(a,b)=\gcd(b,a-bk)$ for any integer $k$.

Then note that $a\pmod b = a-bk$ for some $k$.

Thomas Andrews
  • 177,126
  • Which proof already exists in my answer. – Bill Dubuque Jan 19 '14 at 22:06
  • True, I just felt this simplification made it clearer that it wasn't really about $a\pmod b$. – Thomas Andrews Jan 19 '14 at 22:07
  • So restating a prior answer but omitting its proof is a "simplification"? – Bill Dubuque Jan 19 '14 at 22:13
  • I think what he meant is that writing $gcd(a,b)=gcd(b,a−bk)$ explicitly was helpful (or at least seeing that was still helpful for me even though I already knew that fact). – Charlie Parker Jan 19 '14 at 22:18
  • 1
    @Pinocchio But that's precisely what I proved, since the proof is valid for all $k\in \Bbb N$. – Bill Dubuque Jan 19 '14 at 22:23
  • 4
    @BillDubuque There is no point in engaging in such discussion. – Pedro Jan 19 '14 at 22:24
  • Agreed. Your answer @BillDubuque was great anyway, so whatever. Thanks btw :) – Charlie Parker Jan 19 '14 at 22:24
  • 2
    @Pedro It is interesting pedagogically, since if some view things differently then it helps to understand why. Sometimes this is because an answer wasn't clear, and sometimes it's because a reader had some misunderstanding, or various other possibilities. One cannot know which without discussing it. – Bill Dubuque Jan 19 '14 at 22:25
  • @BillDubuque If you are interested in the pedagogical standpoint, let met tell you what I found helpful. Even though it was trivial and eventhough I already knew that $a(modb)=a−bk$, just actually seeing the explicit statement $gcd(a,b)=gcd(b,a−bk)$ focused my attention and goal on the proof (otherwise its just a list of true statements and at the end it it has the potential of feeling...so what?). While your answer said the same thing, lacked that statement and made it just a little harder for me to parse. Hope that helps. :) and thanks once again. – Charlie Parker Jan 19 '14 at 22:27
  • 1
    @Pinocchio That's why it is a "hint". I hoped that the reader might make that small leap, and thereby gain a better learning experience. My experience is that students remember proofs better the more they discover the key ideas on their own. – Bill Dubuque Jan 19 '14 at 22:31
  • There was nothing clear in your statement that it worked for any $k$. The fact that you use no properties of the $k$ from $a\pmod b = a-bk$ is only visible to the reader if he reads your proof carefully. My answer then stands as a clearer point of view to the question, and thus is separate. – Thomas Andrews Jan 19 '14 at 22:31
  • @Thomas Really? I cannot imagine any other proof that could be more clear that the proof does not depend upon the specific value of $k$. In any case, thanks everybody for the feedback. It goes to show how even simple proofs can be viewed differently by others. – Bill Dubuque Jan 19 '14 at 22:33
  • Regardless, you state for a specific $k$. – Thomas Andrews Jan 19 '14 at 22:34
  • @Thomas That's the way you have interpreted the hint. But, as I said, that's not how it was intended. – Bill Dubuque Jan 19 '14 at 22:35
  • 1
    @BillDubuque Well, I'm a pretty smart guy, and a couple people here are saying my answer made things clearer. I realize, it is at heart just a tiny tweak to your hint, but it is a tiny tweak that makes things much clearer. But keep litigating, it really makes you seem nice. – Thomas Andrews Jan 19 '14 at 22:37
  • 1
    @Thomas I strongly believe that getting to the heart of pedagogical misunderstandings is an essential part of teaching. My questions were posed in good faith in such attempts. I don't care about duplicate answers, rep, etc, but I do care much about subtleties that could better improve a student's learning experience. That's why I wanted to understand why you thought there was a difference. Apologies if that came across as not nice in some way. – Bill Dubuque Jan 19 '14 at 22:43
  • 1
    The key hint I took as I was considering the question was his use of the word "intuition." As such, I wanted to suggest a more general result. I almost instead suggest he prove $\gcd(a,b)=\gcd(a-b,b)$ and then prove the above by induction (rather than directly) since that seems even more intuitive, to me, but I went with the shorter answer since I didn't see the induction as that useful or necessary. @BillDubuque – Thomas Andrews Jan 19 '14 at 23:15
  • @Thomas Yeah, I was tempted to do similarly, and segue into sets of naturals closed under subtraction $(>0).$ One other point: $ $ I now recall that I was not sure if the OP's notation $\ a\pmod b\ $ meant the coset $,a + b,\Bbb Z,$ or, rather, the least nonnegative rep $\ a!!!\mod b.\ $ I almost wrote this instead: $ $ let $, a-bk, \in a + b,\Bbb Z\ $ (which makes it clearer that $,k,$ is not fixed), but I rejected this as possibly confusing if the OP was not familiar with such set-theoretic notation and/or cosets. – Bill Dubuque Jan 19 '14 at 23:49
  • Btw, did you take your research any further after reading Bhargava? If so I'd love to learn about it. – Bill Dubuque Jan 20 '14 at 00:00
  • @BillDubuque Not since reading that, no. – Thomas Andrews Jan 20 '14 at 00:17
  • Recently I was reminded of your question when perusing the 2010 survey of Chabert on integer-valued polynomials that I mentioned in this answer. I think you will enjoy reading that survey. You may find some of the linked literature helpful in your research. – Bill Dubuque Jan 20 '14 at 00:35
5

Let $\, a\ {\rm mod}\ b = a-kb.\, $ If $\, d\mid b\ $ then $\ d\mid \color{#0a0}{a-kb}\iff d\mid \color{#c00}a.\ $ Thus $\ \color{#0a0}{a-kb},b\ $ and $\ \color{#c00}a,b\ $ have same set $S$ of common divisors $\,d,\,$ so they have the same greatest common divisor $\,(= \max S).$

Bill Dubuque
  • 272,048
  • Hi Bill. Came back after a year to this post I think I don't remember how I filled in the gaps from your hint. How did you conclude that $a-kb, b$ and $a,b$ have the same set of common divisors? Once thats clear it should be super obvious. – Charlie Parker Oct 07 '15 at 17:14
  • @Pin It follows from my 2nd sentence: if $,d\mid b,$ then ... Do you see how to prove that $\iff$? $\quad$ – Bill Dubuque Oct 07 '15 at 23:54
  • @Pin It's even clearer mod $,d,,$ viz. $,a,b\equiv 0\iff a-kb,b\equiv 0,,$ or, equivalently, if $,b\equiv 0,$ then $,a\equiv 0\iff a-kb\equiv 0.$ $\quad$ – Bill Dubuque Oct 08 '15 at 01:06
4

The crux of all proofs is that $gcd(b,a) = gcd(b,a-b)$.

This should be easy to see intuitively; if you add or subtract two multiples of $g$ you get a multiple of $g$, so all factors are retained both ways.

Once you have that, you know that you can subtract one number from the other as many times as you like, without changing the gcd.

If you continue subtracting $b$ from the second number, you will eventually arrive at a number between 0 and $b-1$; specifically $a\bmod b$.

user11977
  • 1,416
  • I am not sure if I understood your most important sentence (second one). Do you mind rephrasing it? When you say you add two multiples of g, you add them to what or subtract them from what? It wasn't entirely clear what it mean. (Thanks though, I think this has the potential to be the best answer!) – Charlie Parker Jan 19 '14 at 22:22
  • 2
    If $g | gcd(b,a)$, then $g | a$ and $g | b$, so $g | a - b$, so $g | gcd(b,a-b)$. The same is true in reverse, so any factor of the LHS is a factor of the RHS, and vice versa; so they are equal. – user11977 Jan 19 '14 at 22:24
2

For me it all really comes down to this equation $$ a=qb+r $$ For if $d$ divides $b$ and any of the two $a$ or $r$ it has to divide the last of $a$ and $r$ too in order for this equation to hold.

String
  • 18,395
  • 1
    It's important to stress that one needs the reverse implication too, i.e. not only $,d\mid a,b \color{#0a0}\Rightarrow d\mid r,$ but also $,d\mid a\color{#c00}\Leftarrow d\mid r,b,,$ hence $,d\mid a,b\color{#c00}\Leftarrow!!\color{#0a0}\Rightarrow d\mid r,b;, $ e.g. $\ r = ja+kb\ $ sastifies $(\color{#0a0}\Rightarrow)$ but need not satisfy $(\color{#c00}\Leftarrow)$. Indeed generally $,\gcd(a,b)\ne \gcd(ja+kb,b) = \gcd(ja,b),,$ e.g. let $,b = ja,$ for $,j>1.\ $ – Bill Dubuque Jan 20 '14 at 00:23
  • @BillDubuque: It has been fixed. Thanks again! – String Jan 20 '14 at 14:38
1

Suppose each of $a$ and $b$ is an integer number of miles. Then so is $a\bmod b$.

If a mile is a "common measure" (as Euclid's translators say) of both distances, then a mile is a common measure of what's left when $b$ has been taken from $a$ as many times as possible.