2

I wish to prove a property of the $\gcd$, namely: $\gcd(a,0)=|a|$.

Notice that for some $x,y$ we know that $\gcd(a,0)= ax+ 0 \cdot y$ such that $\gcd(a,0)$ is a multiple of $a$. How do we make the step to |a|?

Bernard
  • 175,478
  • 4
    Because part of the definition of gcd is that it is a positive integer ? – gandalf61 Sep 28 '18 at 14:58
  • okay so then we have that $\gcd(a,0)=ka$ for $a \geq 0, k>0$ –  Sep 28 '18 at 14:59
  • 1
    But $k$ cannot be greater than 1, as this would mean that the number that divides $a$ is greater than $a$ itself. –  Sep 28 '18 at 15:01
  • 1
    Therefore $\gcd(a,0)=|a|$. –  Sep 28 '18 at 15:06
  • 2
    Since $0$ is a multiple of every integer, you just need to look at the divisors of $a$. – egreg Sep 28 '18 at 15:14
  • You should specify that $a \ne 0$. $\gcd(0,0)$ is not defined. – fleablood Sep 28 '18 at 16:49
  • @gandalf61$\gcd$ does not have to be an integer. The $\gcd(\frac 12, 2\frac 14) = \frac 14$. And it isn't the definition that $\gcd$ need be positive but a trivial consequence. If $a|b$ then $-a|b$ and one of $\pm a$ is positive and a positive value is larger than a negative. – fleablood Sep 28 '18 at 16:54
  • 2
    The thing is if $a > 0$ I don't think stating "the largest divisor of $a$ is $a$ itself" should be difficult for anyone. (right?) It's just tossing in negatives make for tedious lawyering boilerplate. But it is trivial. If $b|a$ then $-b|a$ so $b$ is divisor iff $|b|$ is a divisor and $b \le |b|$. Tedious to say that every time but... it's obviously true. – fleablood Sep 28 '18 at 16:58

3 Answers3

3

Basic fact. If $a \ne 0$. The largest value that divides $a$ is $|a|$.

This shouldn't surprise anyone. $|a| = \pm 1*a$ so $|a|$ divides $a$ and for any $x > |a|$ then if $x*r = a$ then $\pm x*r =|a|$ and $\pm r = \frac {|a|}x < \frac {|a|}{|a|} = 1$. So $1 < r < -1$. The only way $r$ can be an integer is if $r = 0$ and $x*0 = 0 = a$. But we stated that $a \ne 0$.

Allowing for negative factors is a bit of a pain but... for positive values this is obvious and negatives is jsut "special cases".

(The definition of $x$ divides $a$ is that there exists an integer $m$ so that $x*m = a$.)

Basic fact. All numbers divide $0$.

This should surprise everyone the first time the see it but it makes perfect sense if you think about it. $0 = x*0$ and $0$ is an integer so every number divides $0$.

So in plain english:

If $a\ne 0$ then $\gcd(a,0) = |a|$.

If $a \ne 0$ then $\gcd(a,0)$ is the largest value that divides both $a$ and $0$. As all values divide $0$ this is just the largest value that divides $a$. And that is $|a|$.

This only seems weird for the same reason "all values divide $0$" seems weird. Once you see what this literally means it should be obvious.

Note, if you do not stipulate $a \ne 0$ the statement is not true. $\gcd(0,0)$ must be undefined. As all values divide $0$ there can't be any largest.

fleablood
  • 124,253
1

Here are also two more results that can be used to prove such claim:

$gcd(a,b) = gcd(a,b+ka), k \in \mathbb{Z}.$

$gcd(a,a) = a$

Maged Saeed
  • 1,140
  • 2
    Isn't $\gcd(a,a) = |a|$? After all. $\gcd(-3,-3) = 3$. Of course one can say wolog assume all values are positive...... I think 90% of the OP's issue is the negatives are tripping them up. – fleablood Sep 28 '18 at 17:03
  • @fleablood Is the gcd a positive integer by definition? – Maged Saeed Sep 28 '18 at 17:06
  • 1
    As positives are larger than negatives and you can't have a negative divisor without having a coresponding positive divisor, it is a trivial consequence but not a definition. Likewise it's trivial that $\gcd(a,b) = \gcd(|a|,|b|) = \gcd (\pm a, \pm b)$. But if $a$ is not positive then $\gcd(a,a)$ will be positive. So $\gcd(a,a)=\gcd(|a|,|a|) = |a| = -a$. ... If $a$ is negative. – fleablood Sep 28 '18 at 17:10
0

Since the gcd has to be positive and cannot be greater than $a$, Notice $0<\gcd(a,0)\leq |a|$, however, $gcd(a,0) =|k a|$ so $0< |ka| \leq |a|$, which must mean that $k=1$, such that $\gcd(a,0)=|a|$.