Is it true that gcd$(-n,0)=-n$ for all $n\in\mathbb{N}$?

254 Views Asked by At

We all know that gcd$(n,0)=n$ for all $n\in\mathbb{N}$. Then how about for negative numbers? Is it correct if I say gcd$(-n,0)=-n$ for all $n\in\mathbb{N}$ ?

If $n=0$, then gcd$(0,0)=0$ which is ok.

But that is still strange. Firstly, gcd is defined as a positive number, am I correct? Even though gcd could be defined as a negative number, but negative number is certainly not the greatest, and it will make more sense if we say gcd$(-n,0)=1$, since 1 divides any number and $1>-n$.

I know there are many questions related to this one, but I could not find this negative case, I apologise if I duplicated the question. Many thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

That depends on what do you mean by greatest. If you order numbers by divisibility, you can generalize the magnitude definition.

That is we say $c=\gcd(a,b)$ iff $c\mid a,b$ and $d\mid a,b\Longrightarrow d\mid c$. That means $c$ is greatest in the sense of divisibility among the divisors of $a$ and $b$.

The only difference in natural numbers (with $0$) is that also we have $0=\gcd(0,0)$, which is actually a good thing.

Now if you want to generalize it to integers (or commutative rings in general) you just need to take care of the case where there are multiple $\gcd$'s, this happens when $c\mid d$ and $d\mid c$ (usually wrtitten as $c\ ||\ d$). So you can just set $\gcd(a,b)$ to be set of all numbers which satisfy the condition in the beginning.

In the case of integers you get that both $n\in\gcd(0,-n)$ and $-n\in\gcd(0,-n)$. (sometimes people write $c=\gcd(a,b)$ or $[c]=\gcd(a,b)$ instead of $c\in\gcd(a,b)$, just bear in mind the equality is not literal in the first case).