Greatest common Divisor of negative numbers
$begingroup$
To find gcd of negative numbers we can convert it to positive number and then find out the gcd. Will it make any difference?
elementary-number-theory divisibility greatest-common-divisor
$endgroup$
add a comment |
$begingroup$
To find gcd of negative numbers we can convert it to positive number and then find out the gcd. Will it make any difference?
elementary-number-theory divisibility greatest-common-divisor
$endgroup$
$begingroup$
well, take for instance $15,21$, the greatest common divisor is $3$, now the greatest common divisor between $-15,-21$ is still $3$ which is also the greatest common divisor for $15,-21$ and $-15,21$ so no it will not make a difference
$endgroup$
– alkabary
Jun 4 '15 at 9:06
add a comment |
$begingroup$
To find gcd of negative numbers we can convert it to positive number and then find out the gcd. Will it make any difference?
elementary-number-theory divisibility greatest-common-divisor
$endgroup$
To find gcd of negative numbers we can convert it to positive number and then find out the gcd. Will it make any difference?
elementary-number-theory divisibility greatest-common-divisor
elementary-number-theory divisibility greatest-common-divisor
edited Jun 17 '15 at 5:19
Martin Sleziak
44.7k10119272
44.7k10119272
asked Jun 4 '15 at 9:02
Vasu Dev GargVasu Dev Garg
2016
2016
$begingroup$
well, take for instance $15,21$, the greatest common divisor is $3$, now the greatest common divisor between $-15,-21$ is still $3$ which is also the greatest common divisor for $15,-21$ and $-15,21$ so no it will not make a difference
$endgroup$
– alkabary
Jun 4 '15 at 9:06
add a comment |
$begingroup$
well, take for instance $15,21$, the greatest common divisor is $3$, now the greatest common divisor between $-15,-21$ is still $3$ which is also the greatest common divisor for $15,-21$ and $-15,21$ so no it will not make a difference
$endgroup$
– alkabary
Jun 4 '15 at 9:06
$begingroup$
well, take for instance $15,21$, the greatest common divisor is $3$, now the greatest common divisor between $-15,-21$ is still $3$ which is also the greatest common divisor for $15,-21$ and $-15,21$ so no it will not make a difference
$endgroup$
– alkabary
Jun 4 '15 at 9:06
$begingroup$
well, take for instance $15,21$, the greatest common divisor is $3$, now the greatest common divisor between $-15,-21$ is still $3$ which is also the greatest common divisor for $15,-21$ and $-15,21$ so no it will not make a difference
$endgroup$
– alkabary
Jun 4 '15 at 9:06
add a comment |
4 Answers
4
active
oldest
votes
$begingroup$
It will not make any difference if $gcd(a,b) = d$ then $d mid a$ and $d mid b$ and if there exists another integer $c mid a,b$ then $c mid d$. Now , $d mid -a,-b$ as well and if $c mid -a,-b$ then $ c mid d$ and so $$d = gcd(-a,-b) = gcd(-a,b) = gcd(a,-b) = gcd(a,b)$$
$endgroup$
add a comment |
$begingroup$
No.
If $langle a,brangleinmathbb Ztimesmathbb Z-{langle0,0rangle}$ then $gcdleft(a,bright)$
can be defined as the smallest positive element of set $left{ ra+sbmid r,sinmathbb{Z}right} $.
Note that this set remains the same if $a$ is replaced by $-a$ and/or
$b$ is replaced by $-b$.
$endgroup$
add a comment |
$begingroup$
In the general theory of greatest common divisor we can define an element $d$ to be a greatest common divisor of $a$ and $b$ if
- $d$ divides both $a$ and $b$
- for all $c$, if $c$ divides both $a$ and $b$, then $c$ divides $d$.
If we stick to the natural numbers, we see that a unique greatest common divisor exists for all pairs of numbers.
The situation is more complicated when we try to extend the theory to arbitrary integral domains.
If we go to the integers, there are generally two. For instance, if $a=4$ and $b=6$, both $2$ and $-2$ satisfy the conditions above.
It's even worse in the case of polynomials (say over the reals): if we consider $f(X)=X^2-3X+2$ and $g(X)=X^2-X$, then any polynomial of the form $a(X-1)$ (for a real $ane0$) satisfies the conditions for being a greatest common divisor.
What happens is that whenever $d$ is a greatest common divisor of $a$ and $b$ and $u$ is an invertible element, then also $ud$ is a greatest common divisor as well.
It's however easy to show that, in an integral domain, if a greatest common divisor $d$ of $a$ and $b$ exists, then any other is of the form $ud$ for $u$ an invertible element.
In some cases we are able to add a further condition to guarantee uniqueness. For instance, in the integers we can impose that a greatest common divisor should be nonnegative; in the ring of polynomials over the reals (or any field), uniqueness is usually guaranteed by choosing the monic greatest common divisor (with the exception of the greatest common divisor of $0$ and $0$, which is of course $0$).
In the ring of Gaussian integers $mathbb{Z}[i]$ the invertible elements are $1$, $-1$, $i$ and $-i$ and there's no sensible way to define a greatest common divisor so as to get some uniqueness.
As you see, it's a matter of conventions. It's better if we can add a condition that gives uniqueness, so we can define a bona fide operation, but actually it doesn't really matter from the theoretical point of view.
$endgroup$
add a comment |
$begingroup$
I'm perfectly content with the answer given by @drhab .
But I can't get that, for $ a,b $ any two positive integers given, if $ gcd(a,b) = d $ then $ gcd(a,b) = -d $ too. Appearently, I have a problem with the word "greatest", which here isn't assigned as a term to indicate any ordering; and this feels wrong with our elementary definitions.
Can you validate me please?
$endgroup$
1
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
1
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1311718%2fgreatest-common-divisor-of-negative-numbers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
It will not make any difference if $gcd(a,b) = d$ then $d mid a$ and $d mid b$ and if there exists another integer $c mid a,b$ then $c mid d$. Now , $d mid -a,-b$ as well and if $c mid -a,-b$ then $ c mid d$ and so $$d = gcd(-a,-b) = gcd(-a,b) = gcd(a,-b) = gcd(a,b)$$
$endgroup$
add a comment |
$begingroup$
It will not make any difference if $gcd(a,b) = d$ then $d mid a$ and $d mid b$ and if there exists another integer $c mid a,b$ then $c mid d$. Now , $d mid -a,-b$ as well and if $c mid -a,-b$ then $ c mid d$ and so $$d = gcd(-a,-b) = gcd(-a,b) = gcd(a,-b) = gcd(a,b)$$
$endgroup$
add a comment |
$begingroup$
It will not make any difference if $gcd(a,b) = d$ then $d mid a$ and $d mid b$ and if there exists another integer $c mid a,b$ then $c mid d$. Now , $d mid -a,-b$ as well and if $c mid -a,-b$ then $ c mid d$ and so $$d = gcd(-a,-b) = gcd(-a,b) = gcd(a,-b) = gcd(a,b)$$
$endgroup$
It will not make any difference if $gcd(a,b) = d$ then $d mid a$ and $d mid b$ and if there exists another integer $c mid a,b$ then $c mid d$. Now , $d mid -a,-b$ as well and if $c mid -a,-b$ then $ c mid d$ and so $$d = gcd(-a,-b) = gcd(-a,b) = gcd(a,-b) = gcd(a,b)$$
answered Jun 4 '15 at 9:10
alkabaryalkabary
4,1041541
4,1041541
add a comment |
add a comment |
$begingroup$
No.
If $langle a,brangleinmathbb Ztimesmathbb Z-{langle0,0rangle}$ then $gcdleft(a,bright)$
can be defined as the smallest positive element of set $left{ ra+sbmid r,sinmathbb{Z}right} $.
Note that this set remains the same if $a$ is replaced by $-a$ and/or
$b$ is replaced by $-b$.
$endgroup$
add a comment |
$begingroup$
No.
If $langle a,brangleinmathbb Ztimesmathbb Z-{langle0,0rangle}$ then $gcdleft(a,bright)$
can be defined as the smallest positive element of set $left{ ra+sbmid r,sinmathbb{Z}right} $.
Note that this set remains the same if $a$ is replaced by $-a$ and/or
$b$ is replaced by $-b$.
$endgroup$
add a comment |
$begingroup$
No.
If $langle a,brangleinmathbb Ztimesmathbb Z-{langle0,0rangle}$ then $gcdleft(a,bright)$
can be defined as the smallest positive element of set $left{ ra+sbmid r,sinmathbb{Z}right} $.
Note that this set remains the same if $a$ is replaced by $-a$ and/or
$b$ is replaced by $-b$.
$endgroup$
No.
If $langle a,brangleinmathbb Ztimesmathbb Z-{langle0,0rangle}$ then $gcdleft(a,bright)$
can be defined as the smallest positive element of set $left{ ra+sbmid r,sinmathbb{Z}right} $.
Note that this set remains the same if $a$ is replaced by $-a$ and/or
$b$ is replaced by $-b$.
answered Jun 4 '15 at 9:08
drhabdrhab
102k545136
102k545136
add a comment |
add a comment |
$begingroup$
In the general theory of greatest common divisor we can define an element $d$ to be a greatest common divisor of $a$ and $b$ if
- $d$ divides both $a$ and $b$
- for all $c$, if $c$ divides both $a$ and $b$, then $c$ divides $d$.
If we stick to the natural numbers, we see that a unique greatest common divisor exists for all pairs of numbers.
The situation is more complicated when we try to extend the theory to arbitrary integral domains.
If we go to the integers, there are generally two. For instance, if $a=4$ and $b=6$, both $2$ and $-2$ satisfy the conditions above.
It's even worse in the case of polynomials (say over the reals): if we consider $f(X)=X^2-3X+2$ and $g(X)=X^2-X$, then any polynomial of the form $a(X-1)$ (for a real $ane0$) satisfies the conditions for being a greatest common divisor.
What happens is that whenever $d$ is a greatest common divisor of $a$ and $b$ and $u$ is an invertible element, then also $ud$ is a greatest common divisor as well.
It's however easy to show that, in an integral domain, if a greatest common divisor $d$ of $a$ and $b$ exists, then any other is of the form $ud$ for $u$ an invertible element.
In some cases we are able to add a further condition to guarantee uniqueness. For instance, in the integers we can impose that a greatest common divisor should be nonnegative; in the ring of polynomials over the reals (or any field), uniqueness is usually guaranteed by choosing the monic greatest common divisor (with the exception of the greatest common divisor of $0$ and $0$, which is of course $0$).
In the ring of Gaussian integers $mathbb{Z}[i]$ the invertible elements are $1$, $-1$, $i$ and $-i$ and there's no sensible way to define a greatest common divisor so as to get some uniqueness.
As you see, it's a matter of conventions. It's better if we can add a condition that gives uniqueness, so we can define a bona fide operation, but actually it doesn't really matter from the theoretical point of view.
$endgroup$
add a comment |
$begingroup$
In the general theory of greatest common divisor we can define an element $d$ to be a greatest common divisor of $a$ and $b$ if
- $d$ divides both $a$ and $b$
- for all $c$, if $c$ divides both $a$ and $b$, then $c$ divides $d$.
If we stick to the natural numbers, we see that a unique greatest common divisor exists for all pairs of numbers.
The situation is more complicated when we try to extend the theory to arbitrary integral domains.
If we go to the integers, there are generally two. For instance, if $a=4$ and $b=6$, both $2$ and $-2$ satisfy the conditions above.
It's even worse in the case of polynomials (say over the reals): if we consider $f(X)=X^2-3X+2$ and $g(X)=X^2-X$, then any polynomial of the form $a(X-1)$ (for a real $ane0$) satisfies the conditions for being a greatest common divisor.
What happens is that whenever $d$ is a greatest common divisor of $a$ and $b$ and $u$ is an invertible element, then also $ud$ is a greatest common divisor as well.
It's however easy to show that, in an integral domain, if a greatest common divisor $d$ of $a$ and $b$ exists, then any other is of the form $ud$ for $u$ an invertible element.
In some cases we are able to add a further condition to guarantee uniqueness. For instance, in the integers we can impose that a greatest common divisor should be nonnegative; in the ring of polynomials over the reals (or any field), uniqueness is usually guaranteed by choosing the monic greatest common divisor (with the exception of the greatest common divisor of $0$ and $0$, which is of course $0$).
In the ring of Gaussian integers $mathbb{Z}[i]$ the invertible elements are $1$, $-1$, $i$ and $-i$ and there's no sensible way to define a greatest common divisor so as to get some uniqueness.
As you see, it's a matter of conventions. It's better if we can add a condition that gives uniqueness, so we can define a bona fide operation, but actually it doesn't really matter from the theoretical point of view.
$endgroup$
add a comment |
$begingroup$
In the general theory of greatest common divisor we can define an element $d$ to be a greatest common divisor of $a$ and $b$ if
- $d$ divides both $a$ and $b$
- for all $c$, if $c$ divides both $a$ and $b$, then $c$ divides $d$.
If we stick to the natural numbers, we see that a unique greatest common divisor exists for all pairs of numbers.
The situation is more complicated when we try to extend the theory to arbitrary integral domains.
If we go to the integers, there are generally two. For instance, if $a=4$ and $b=6$, both $2$ and $-2$ satisfy the conditions above.
It's even worse in the case of polynomials (say over the reals): if we consider $f(X)=X^2-3X+2$ and $g(X)=X^2-X$, then any polynomial of the form $a(X-1)$ (for a real $ane0$) satisfies the conditions for being a greatest common divisor.
What happens is that whenever $d$ is a greatest common divisor of $a$ and $b$ and $u$ is an invertible element, then also $ud$ is a greatest common divisor as well.
It's however easy to show that, in an integral domain, if a greatest common divisor $d$ of $a$ and $b$ exists, then any other is of the form $ud$ for $u$ an invertible element.
In some cases we are able to add a further condition to guarantee uniqueness. For instance, in the integers we can impose that a greatest common divisor should be nonnegative; in the ring of polynomials over the reals (or any field), uniqueness is usually guaranteed by choosing the monic greatest common divisor (with the exception of the greatest common divisor of $0$ and $0$, which is of course $0$).
In the ring of Gaussian integers $mathbb{Z}[i]$ the invertible elements are $1$, $-1$, $i$ and $-i$ and there's no sensible way to define a greatest common divisor so as to get some uniqueness.
As you see, it's a matter of conventions. It's better if we can add a condition that gives uniqueness, so we can define a bona fide operation, but actually it doesn't really matter from the theoretical point of view.
$endgroup$
In the general theory of greatest common divisor we can define an element $d$ to be a greatest common divisor of $a$ and $b$ if
- $d$ divides both $a$ and $b$
- for all $c$, if $c$ divides both $a$ and $b$, then $c$ divides $d$.
If we stick to the natural numbers, we see that a unique greatest common divisor exists for all pairs of numbers.
The situation is more complicated when we try to extend the theory to arbitrary integral domains.
If we go to the integers, there are generally two. For instance, if $a=4$ and $b=6$, both $2$ and $-2$ satisfy the conditions above.
It's even worse in the case of polynomials (say over the reals): if we consider $f(X)=X^2-3X+2$ and $g(X)=X^2-X$, then any polynomial of the form $a(X-1)$ (for a real $ane0$) satisfies the conditions for being a greatest common divisor.
What happens is that whenever $d$ is a greatest common divisor of $a$ and $b$ and $u$ is an invertible element, then also $ud$ is a greatest common divisor as well.
It's however easy to show that, in an integral domain, if a greatest common divisor $d$ of $a$ and $b$ exists, then any other is of the form $ud$ for $u$ an invertible element.
In some cases we are able to add a further condition to guarantee uniqueness. For instance, in the integers we can impose that a greatest common divisor should be nonnegative; in the ring of polynomials over the reals (or any field), uniqueness is usually guaranteed by choosing the monic greatest common divisor (with the exception of the greatest common divisor of $0$ and $0$, which is of course $0$).
In the ring of Gaussian integers $mathbb{Z}[i]$ the invertible elements are $1$, $-1$, $i$ and $-i$ and there's no sensible way to define a greatest common divisor so as to get some uniqueness.
As you see, it's a matter of conventions. It's better if we can add a condition that gives uniqueness, so we can define a bona fide operation, but actually it doesn't really matter from the theoretical point of view.
edited Jun 4 '15 at 9:51
answered Jun 4 '15 at 9:44
egregegreg
183k1486204
183k1486204
add a comment |
add a comment |
$begingroup$
I'm perfectly content with the answer given by @drhab .
But I can't get that, for $ a,b $ any two positive integers given, if $ gcd(a,b) = d $ then $ gcd(a,b) = -d $ too. Appearently, I have a problem with the word "greatest", which here isn't assigned as a term to indicate any ordering; and this feels wrong with our elementary definitions.
Can you validate me please?
$endgroup$
1
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
1
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
add a comment |
$begingroup$
I'm perfectly content with the answer given by @drhab .
But I can't get that, for $ a,b $ any two positive integers given, if $ gcd(a,b) = d $ then $ gcd(a,b) = -d $ too. Appearently, I have a problem with the word "greatest", which here isn't assigned as a term to indicate any ordering; and this feels wrong with our elementary definitions.
Can you validate me please?
$endgroup$
1
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
1
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
add a comment |
$begingroup$
I'm perfectly content with the answer given by @drhab .
But I can't get that, for $ a,b $ any two positive integers given, if $ gcd(a,b) = d $ then $ gcd(a,b) = -d $ too. Appearently, I have a problem with the word "greatest", which here isn't assigned as a term to indicate any ordering; and this feels wrong with our elementary definitions.
Can you validate me please?
$endgroup$
I'm perfectly content with the answer given by @drhab .
But I can't get that, for $ a,b $ any two positive integers given, if $ gcd(a,b) = d $ then $ gcd(a,b) = -d $ too. Appearently, I have a problem with the word "greatest", which here isn't assigned as a term to indicate any ordering; and this feels wrong with our elementary definitions.
Can you validate me please?
answered Dec 27 '18 at 5:11
freehumoristfreehumorist
351214
351214
1
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
1
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
add a comment |
1
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
1
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
1
1
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
Nowhere in drhabs answer does s/he say $gcd(a,b)=pm d$. Indeed what s/he said was, in essence $gcd(pm a, pm b) = |d|$. THe terms $a,$ and $b$ that you are finding the greatest common divisor OF make no difference whether they are positive or negatives. But $d$, the number that IS the greatest common divisor must be positive.
$endgroup$
– fleablood
Dec 27 '18 at 5:32
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
$begingroup$
@fleablood Actually, I was refering to my own book. Yes, I said that the answer drhab gave defines concisely every aspect of the situation, in the most general theoretical notation. Indeed, the other answer given by alkabary shows it all: $ d = gcd(a,b) $ if (1) $ d | a $ and $ d | b $ and (2) if any other $ d_2 = gcd(a,b) $ exists, then $ d_2 | d $.So suppose we really have a $ c = gcd(a,b) $ which is known to be also $ d $; then $ c | d $, and $ d | c $ too. so $ c = +/- d $. So theory says: The gcd is defined up to sign.
$endgroup$
– freehumorist
Dec 27 '18 at 5:50
1
1
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
$begingroup$
Then I don't understand what you are asking. If $c$ "is known to be $d$" then $c=d$. and we don't have check whether $c|d$ or $d|c$. If on the other hand we are told $c|d$ and $d|c$ then we can conclude $c = pm d$ and that has nothing to do with $a,b$. If we are told $c=gcd(a,b)$ then we know $c$ is positive but we don't know if $d$ is.
$endgroup$
– fleablood
Dec 27 '18 at 6:39
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1311718%2fgreatest-common-divisor-of-negative-numbers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
well, take for instance $15,21$, the greatest common divisor is $3$, now the greatest common divisor between $-15,-21$ is still $3$ which is also the greatest common divisor for $15,-21$ and $-15,21$ so no it will not make a difference
$endgroup$
– alkabary
Jun 4 '15 at 9:06