# Is it correct to say gcd$(r, 0)$? The definition says greatest common divisor of nonzero integers.  Source: Discrete Mathematics with Applications, Susanna. S. Epp
In the definition of greatest common divisor of $a$ and $b$: $a$ and $b$ in gcd$(a, b)$ are nonzero integers, so why it follows in Lemma 4.8.1 that gcd$(r, 0) =r$?

There can't be a greatest common divisor of a positive integer $r$ and $0$ since the definition defines $a$ and $b$ be nonzero integers.

• Read a little more carefully. The definition says "not both zero". Feb 11, 2016 at 19:01

To answer your question: one of them can be $0$, they can not be both $0$, so $\gcd(r,0)$ is defined for $r\neq 0$. Only $\gcd(0,0)$ is not defined (which makes sense, since all numbers divide $0$, there is no greatest divisor of $0$)
• Did you notice the hypothesis that $r$ is a positive integer? Feb 11, 2016 at 19:08
• Also, the "greatest" in "greatest common divisor" refers to the preorder given by divisibility (this is made evident by the fact that the notion is still defined in rings that aren't necessarily ordered). And in this sense, $0$ is the greatest integer, precisely because all the other integers divide it. Feb 11, 2016 at 19:11
Well, if $a$ and $b$ are nonzero integers, $\gcd(a,b)$ is the nonnegative generator of $a\Bbb Z+b\Bbb Z$. I see no reason not to turn the microscope about and define $\gcd(a,b)$ to be just that generator instead. Then $\gcd(a,0)=a$, even when $a$ is zero. In that special case, the $\gcd$ is no longer the greatest common divisor, but for my money, that’s all right.
• It is, of course, but with respect to a different order relation. I don't understand why people insist in using $\le$ for defining the greatest common divisor, instead of the more natural divisibility relation. Feb 11, 2016 at 21:17