In $mathbb{Z}/7mathbb{Z}$ which gcd of the following two polynomials is “correct”?











up vote
2
down vote

favorite












Find the gcd of $x^4-2x^3-x+3$ and $x^2-1.$



Note: I am using $a=bq+r$



First approach:



$$
begin{align*}
x^4-2x^3-x+3&=(x^2-1)(x^2-2x+1)+(4x+4)\
x^2-1&=(4x+4)(2x-2)+0
end{align*}
$$

Therefore, $text{gcd}(x^4-2x^3-x+3,:x^2-1)=x+1.$



Second approach:



$$
begin{align*}
x^4+5x^3+6x+3&=(x^2+6)(x^2-5x-6)+(4x+4)\
x^2+6&=(4x+4)(2x+5)+0
end{align*}
$$

Therefore, $text{gcd}(x^4+5x^3+6x+3,:x^2+6)=x+1.$



In the first approach I used the given polynomials while in the second approach I first used $text{mod}:7$ to change the negatives to positives and then proceeded with the calculation.



For both approaches, the remainders shown are in $text{mod}:7$ i.e.
in the first approach the remainder is actually $-3x+4$ and in the second its $-24x+39.$



Which approach is the correct way of solving such problems? If it matters, why? Also, suppose I used the first approach, would the final answer be $-3x+4$, $4x+4$, or $x+1$?










share|cite|improve this question
























  • The second one is more apt since $mathbb{Z}/7mathbb{Z}={0,1,2,3,4,5,6}$. It actually doesn't matter as long as you take the $text{mod} $ in the end.
    – Yadati Kiran
    Nov 22 at 7:34












  • In both approaches, you've written a line equating a quadratic to a linear polynomial.
    – Lord Shark the Unknown
    Nov 22 at 7:36










  • In each of these lines it should be a product not a sum.
    – ancientmathematician
    Nov 22 at 7:39










  • What is your definition of gcd? If you insist, as some people do, on it being monic then you must choose the monic answer. But they are all non-zero multiples of each other so it doesn't matter which you choose.
    – ancientmathematician
    Nov 22 at 7:40










  • @LordSharktheUnknown Just saw that, thanks.
    – Tomás Palamás
    Nov 22 at 7:41















up vote
2
down vote

favorite












Find the gcd of $x^4-2x^3-x+3$ and $x^2-1.$



Note: I am using $a=bq+r$



First approach:



$$
begin{align*}
x^4-2x^3-x+3&=(x^2-1)(x^2-2x+1)+(4x+4)\
x^2-1&=(4x+4)(2x-2)+0
end{align*}
$$

Therefore, $text{gcd}(x^4-2x^3-x+3,:x^2-1)=x+1.$



Second approach:



$$
begin{align*}
x^4+5x^3+6x+3&=(x^2+6)(x^2-5x-6)+(4x+4)\
x^2+6&=(4x+4)(2x+5)+0
end{align*}
$$

Therefore, $text{gcd}(x^4+5x^3+6x+3,:x^2+6)=x+1.$



In the first approach I used the given polynomials while in the second approach I first used $text{mod}:7$ to change the negatives to positives and then proceeded with the calculation.



For both approaches, the remainders shown are in $text{mod}:7$ i.e.
in the first approach the remainder is actually $-3x+4$ and in the second its $-24x+39.$



Which approach is the correct way of solving such problems? If it matters, why? Also, suppose I used the first approach, would the final answer be $-3x+4$, $4x+4$, or $x+1$?










share|cite|improve this question
























  • The second one is more apt since $mathbb{Z}/7mathbb{Z}={0,1,2,3,4,5,6}$. It actually doesn't matter as long as you take the $text{mod} $ in the end.
    – Yadati Kiran
    Nov 22 at 7:34












  • In both approaches, you've written a line equating a quadratic to a linear polynomial.
    – Lord Shark the Unknown
    Nov 22 at 7:36










  • In each of these lines it should be a product not a sum.
    – ancientmathematician
    Nov 22 at 7:39










  • What is your definition of gcd? If you insist, as some people do, on it being monic then you must choose the monic answer. But they are all non-zero multiples of each other so it doesn't matter which you choose.
    – ancientmathematician
    Nov 22 at 7:40










  • @LordSharktheUnknown Just saw that, thanks.
    – Tomás Palamás
    Nov 22 at 7:41













up vote
2
down vote

favorite









up vote
2
down vote

favorite











Find the gcd of $x^4-2x^3-x+3$ and $x^2-1.$



Note: I am using $a=bq+r$



First approach:



$$
begin{align*}
x^4-2x^3-x+3&=(x^2-1)(x^2-2x+1)+(4x+4)\
x^2-1&=(4x+4)(2x-2)+0
end{align*}
$$

Therefore, $text{gcd}(x^4-2x^3-x+3,:x^2-1)=x+1.$



Second approach:



$$
begin{align*}
x^4+5x^3+6x+3&=(x^2+6)(x^2-5x-6)+(4x+4)\
x^2+6&=(4x+4)(2x+5)+0
end{align*}
$$

Therefore, $text{gcd}(x^4+5x^3+6x+3,:x^2+6)=x+1.$



In the first approach I used the given polynomials while in the second approach I first used $text{mod}:7$ to change the negatives to positives and then proceeded with the calculation.



For both approaches, the remainders shown are in $text{mod}:7$ i.e.
in the first approach the remainder is actually $-3x+4$ and in the second its $-24x+39.$



Which approach is the correct way of solving such problems? If it matters, why? Also, suppose I used the first approach, would the final answer be $-3x+4$, $4x+4$, or $x+1$?










share|cite|improve this question















Find the gcd of $x^4-2x^3-x+3$ and $x^2-1.$



Note: I am using $a=bq+r$



First approach:



$$
begin{align*}
x^4-2x^3-x+3&=(x^2-1)(x^2-2x+1)+(4x+4)\
x^2-1&=(4x+4)(2x-2)+0
end{align*}
$$

Therefore, $text{gcd}(x^4-2x^3-x+3,:x^2-1)=x+1.$



Second approach:



$$
begin{align*}
x^4+5x^3+6x+3&=(x^2+6)(x^2-5x-6)+(4x+4)\
x^2+6&=(4x+4)(2x+5)+0
end{align*}
$$

Therefore, $text{gcd}(x^4+5x^3+6x+3,:x^2+6)=x+1.$



In the first approach I used the given polynomials while in the second approach I first used $text{mod}:7$ to change the negatives to positives and then proceeded with the calculation.



For both approaches, the remainders shown are in $text{mod}:7$ i.e.
in the first approach the remainder is actually $-3x+4$ and in the second its $-24x+39.$



Which approach is the correct way of solving such problems? If it matters, why? Also, suppose I used the first approach, would the final answer be $-3x+4$, $4x+4$, or $x+1$?







abstract-algebra polynomials ring-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 22 at 7:40

























asked Nov 22 at 7:28









Tomás Palamás

356211




356211












  • The second one is more apt since $mathbb{Z}/7mathbb{Z}={0,1,2,3,4,5,6}$. It actually doesn't matter as long as you take the $text{mod} $ in the end.
    – Yadati Kiran
    Nov 22 at 7:34












  • In both approaches, you've written a line equating a quadratic to a linear polynomial.
    – Lord Shark the Unknown
    Nov 22 at 7:36










  • In each of these lines it should be a product not a sum.
    – ancientmathematician
    Nov 22 at 7:39










  • What is your definition of gcd? If you insist, as some people do, on it being monic then you must choose the monic answer. But they are all non-zero multiples of each other so it doesn't matter which you choose.
    – ancientmathematician
    Nov 22 at 7:40










  • @LordSharktheUnknown Just saw that, thanks.
    – Tomás Palamás
    Nov 22 at 7:41


















  • The second one is more apt since $mathbb{Z}/7mathbb{Z}={0,1,2,3,4,5,6}$. It actually doesn't matter as long as you take the $text{mod} $ in the end.
    – Yadati Kiran
    Nov 22 at 7:34












  • In both approaches, you've written a line equating a quadratic to a linear polynomial.
    – Lord Shark the Unknown
    Nov 22 at 7:36










  • In each of these lines it should be a product not a sum.
    – ancientmathematician
    Nov 22 at 7:39










  • What is your definition of gcd? If you insist, as some people do, on it being monic then you must choose the monic answer. But they are all non-zero multiples of each other so it doesn't matter which you choose.
    – ancientmathematician
    Nov 22 at 7:40










  • @LordSharktheUnknown Just saw that, thanks.
    – Tomás Palamás
    Nov 22 at 7:41
















The second one is more apt since $mathbb{Z}/7mathbb{Z}={0,1,2,3,4,5,6}$. It actually doesn't matter as long as you take the $text{mod} $ in the end.
– Yadati Kiran
Nov 22 at 7:34






The second one is more apt since $mathbb{Z}/7mathbb{Z}={0,1,2,3,4,5,6}$. It actually doesn't matter as long as you take the $text{mod} $ in the end.
– Yadati Kiran
Nov 22 at 7:34














In both approaches, you've written a line equating a quadratic to a linear polynomial.
– Lord Shark the Unknown
Nov 22 at 7:36




In both approaches, you've written a line equating a quadratic to a linear polynomial.
– Lord Shark the Unknown
Nov 22 at 7:36












In each of these lines it should be a product not a sum.
– ancientmathematician
Nov 22 at 7:39




In each of these lines it should be a product not a sum.
– ancientmathematician
Nov 22 at 7:39












What is your definition of gcd? If you insist, as some people do, on it being monic then you must choose the monic answer. But they are all non-zero multiples of each other so it doesn't matter which you choose.
– ancientmathematician
Nov 22 at 7:40




What is your definition of gcd? If you insist, as some people do, on it being monic then you must choose the monic answer. But they are all non-zero multiples of each other so it doesn't matter which you choose.
– ancientmathematician
Nov 22 at 7:40












@LordSharktheUnknown Just saw that, thanks.
– Tomás Palamás
Nov 22 at 7:41




@LordSharktheUnknown Just saw that, thanks.
– Tomás Palamás
Nov 22 at 7:41










1 Answer
1






active

oldest

votes

















up vote
0
down vote













When calculating in quotient rings (or, equivalently, with ring congruences), we enjoy the freedom to choose any representative of an equivalence class, e.g. $bmod 7!: 8^nequiv 1^nequiv 1$ is simpler by choosing the rep $1$ vs. $8$ of $,8+7Bbb Z.,$ So in your gcd calculation we can choose the coefficient reps as we please. Usually smallest magnitude reps yield simpler arithmetic, here $,0,pm1,pm2,pm3,$ for $,Bbb Z/7.$



In general domains, gcds and lcms are defined only up to associates, i.e. up to unit (invertible) factors. For integers the units are $pm1,$ and we normalize a gcd $,gneq 0$ by choosing the positive choice from $pm g.,$ For polynomials over a field the units are all coef's $,cneq 0.,$ Hence the associates of $,gneq 0,$ are its constant multiples $,cgneq 0.,$ The standard normalization convention here is to choose the rep that is monic (lead coef $= 1),,$ i.e. if $,0 neq g,$ has lead coef $,a,$ then we unit normalize it to the monic $,a^{-1} g,,$ e.g. your gcd $,g = -3x!-!3,$ times $,(-3)^{-1}$ yields $,x+1,$ as its unit normalized standard rep.



Worth remark is that we can compute your gcd more simply. Notice $,x^2-1 = (x!-!1)(x!+!1),$ is a product of nonassociate primes therefore $,gcd(f,(x!-!1)(x!+!1)) = gcd(f,x!-!1)gcd(f,x!+!1).,$ Furthermore $, g := gcd(f,x!-!a) = x!-!a,$ if $,f(a)=0,$ else $,g = 1,,$ by the Factor Theorem. Hence the gcd in your example is $,x!+!1,$ because $,f(-1)equiv 0,$ but $f(1)notequiv 0pmod{!7}$.






share|cite|improve this answer























    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',
    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3008842%2fin-mathbbz-7-mathbbz-which-gcd-of-the-following-two-polynomials-is-corre%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    When calculating in quotient rings (or, equivalently, with ring congruences), we enjoy the freedom to choose any representative of an equivalence class, e.g. $bmod 7!: 8^nequiv 1^nequiv 1$ is simpler by choosing the rep $1$ vs. $8$ of $,8+7Bbb Z.,$ So in your gcd calculation we can choose the coefficient reps as we please. Usually smallest magnitude reps yield simpler arithmetic, here $,0,pm1,pm2,pm3,$ for $,Bbb Z/7.$



    In general domains, gcds and lcms are defined only up to associates, i.e. up to unit (invertible) factors. For integers the units are $pm1,$ and we normalize a gcd $,gneq 0$ by choosing the positive choice from $pm g.,$ For polynomials over a field the units are all coef's $,cneq 0.,$ Hence the associates of $,gneq 0,$ are its constant multiples $,cgneq 0.,$ The standard normalization convention here is to choose the rep that is monic (lead coef $= 1),,$ i.e. if $,0 neq g,$ has lead coef $,a,$ then we unit normalize it to the monic $,a^{-1} g,,$ e.g. your gcd $,g = -3x!-!3,$ times $,(-3)^{-1}$ yields $,x+1,$ as its unit normalized standard rep.



    Worth remark is that we can compute your gcd more simply. Notice $,x^2-1 = (x!-!1)(x!+!1),$ is a product of nonassociate primes therefore $,gcd(f,(x!-!1)(x!+!1)) = gcd(f,x!-!1)gcd(f,x!+!1).,$ Furthermore $, g := gcd(f,x!-!a) = x!-!a,$ if $,f(a)=0,$ else $,g = 1,,$ by the Factor Theorem. Hence the gcd in your example is $,x!+!1,$ because $,f(-1)equiv 0,$ but $f(1)notequiv 0pmod{!7}$.






    share|cite|improve this answer



























      up vote
      0
      down vote













      When calculating in quotient rings (or, equivalently, with ring congruences), we enjoy the freedom to choose any representative of an equivalence class, e.g. $bmod 7!: 8^nequiv 1^nequiv 1$ is simpler by choosing the rep $1$ vs. $8$ of $,8+7Bbb Z.,$ So in your gcd calculation we can choose the coefficient reps as we please. Usually smallest magnitude reps yield simpler arithmetic, here $,0,pm1,pm2,pm3,$ for $,Bbb Z/7.$



      In general domains, gcds and lcms are defined only up to associates, i.e. up to unit (invertible) factors. For integers the units are $pm1,$ and we normalize a gcd $,gneq 0$ by choosing the positive choice from $pm g.,$ For polynomials over a field the units are all coef's $,cneq 0.,$ Hence the associates of $,gneq 0,$ are its constant multiples $,cgneq 0.,$ The standard normalization convention here is to choose the rep that is monic (lead coef $= 1),,$ i.e. if $,0 neq g,$ has lead coef $,a,$ then we unit normalize it to the monic $,a^{-1} g,,$ e.g. your gcd $,g = -3x!-!3,$ times $,(-3)^{-1}$ yields $,x+1,$ as its unit normalized standard rep.



      Worth remark is that we can compute your gcd more simply. Notice $,x^2-1 = (x!-!1)(x!+!1),$ is a product of nonassociate primes therefore $,gcd(f,(x!-!1)(x!+!1)) = gcd(f,x!-!1)gcd(f,x!+!1).,$ Furthermore $, g := gcd(f,x!-!a) = x!-!a,$ if $,f(a)=0,$ else $,g = 1,,$ by the Factor Theorem. Hence the gcd in your example is $,x!+!1,$ because $,f(-1)equiv 0,$ but $f(1)notequiv 0pmod{!7}$.






      share|cite|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        When calculating in quotient rings (or, equivalently, with ring congruences), we enjoy the freedom to choose any representative of an equivalence class, e.g. $bmod 7!: 8^nequiv 1^nequiv 1$ is simpler by choosing the rep $1$ vs. $8$ of $,8+7Bbb Z.,$ So in your gcd calculation we can choose the coefficient reps as we please. Usually smallest magnitude reps yield simpler arithmetic, here $,0,pm1,pm2,pm3,$ for $,Bbb Z/7.$



        In general domains, gcds and lcms are defined only up to associates, i.e. up to unit (invertible) factors. For integers the units are $pm1,$ and we normalize a gcd $,gneq 0$ by choosing the positive choice from $pm g.,$ For polynomials over a field the units are all coef's $,cneq 0.,$ Hence the associates of $,gneq 0,$ are its constant multiples $,cgneq 0.,$ The standard normalization convention here is to choose the rep that is monic (lead coef $= 1),,$ i.e. if $,0 neq g,$ has lead coef $,a,$ then we unit normalize it to the monic $,a^{-1} g,,$ e.g. your gcd $,g = -3x!-!3,$ times $,(-3)^{-1}$ yields $,x+1,$ as its unit normalized standard rep.



        Worth remark is that we can compute your gcd more simply. Notice $,x^2-1 = (x!-!1)(x!+!1),$ is a product of nonassociate primes therefore $,gcd(f,(x!-!1)(x!+!1)) = gcd(f,x!-!1)gcd(f,x!+!1).,$ Furthermore $, g := gcd(f,x!-!a) = x!-!a,$ if $,f(a)=0,$ else $,g = 1,,$ by the Factor Theorem. Hence the gcd in your example is $,x!+!1,$ because $,f(-1)equiv 0,$ but $f(1)notequiv 0pmod{!7}$.






        share|cite|improve this answer














        When calculating in quotient rings (or, equivalently, with ring congruences), we enjoy the freedom to choose any representative of an equivalence class, e.g. $bmod 7!: 8^nequiv 1^nequiv 1$ is simpler by choosing the rep $1$ vs. $8$ of $,8+7Bbb Z.,$ So in your gcd calculation we can choose the coefficient reps as we please. Usually smallest magnitude reps yield simpler arithmetic, here $,0,pm1,pm2,pm3,$ for $,Bbb Z/7.$



        In general domains, gcds and lcms are defined only up to associates, i.e. up to unit (invertible) factors. For integers the units are $pm1,$ and we normalize a gcd $,gneq 0$ by choosing the positive choice from $pm g.,$ For polynomials over a field the units are all coef's $,cneq 0.,$ Hence the associates of $,gneq 0,$ are its constant multiples $,cgneq 0.,$ The standard normalization convention here is to choose the rep that is monic (lead coef $= 1),,$ i.e. if $,0 neq g,$ has lead coef $,a,$ then we unit normalize it to the monic $,a^{-1} g,,$ e.g. your gcd $,g = -3x!-!3,$ times $,(-3)^{-1}$ yields $,x+1,$ as its unit normalized standard rep.



        Worth remark is that we can compute your gcd more simply. Notice $,x^2-1 = (x!-!1)(x!+!1),$ is a product of nonassociate primes therefore $,gcd(f,(x!-!1)(x!+!1)) = gcd(f,x!-!1)gcd(f,x!+!1).,$ Furthermore $, g := gcd(f,x!-!a) = x!-!a,$ if $,f(a)=0,$ else $,g = 1,,$ by the Factor Theorem. Hence the gcd in your example is $,x!+!1,$ because $,f(-1)equiv 0,$ but $f(1)notequiv 0pmod{!7}$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 23 at 2:28

























        answered Nov 23 at 1:58









        Bill Dubuque

        207k29189624




        207k29189624






























            draft saved

            draft discarded




















































            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3008842%2fin-mathbbz-7-mathbbz-which-gcd-of-the-following-two-polynomials-is-corre%23new-answer', 'question_page');
            }
            );

            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







            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen