If gcd(a,b) = 1, can any integer be written as a linear combination of a,b?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am thinking about this in the context of the two water jugs problem. I know that a jug of capacity n can be filled if gcd(a,b) | n. Does this have the corollary that any integer can be written as a linear combination of a and b if gcd(a,b) = 1.










share|cite|improve this question







New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Yes, that is right
    – DonAntonio
    34 mins ago










  • If $gcd(a,b) = 1$ then there are $c,d $ such that $ac+bd = 1$ and hence if $p$ is an integer we can write $p = (cp)a + (dp)b$.
    – copper.hat
    32 mins ago














up vote
1
down vote

favorite












I am thinking about this in the context of the two water jugs problem. I know that a jug of capacity n can be filled if gcd(a,b) | n. Does this have the corollary that any integer can be written as a linear combination of a and b if gcd(a,b) = 1.










share|cite|improve this question







New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Yes, that is right
    – DonAntonio
    34 mins ago










  • If $gcd(a,b) = 1$ then there are $c,d $ such that $ac+bd = 1$ and hence if $p$ is an integer we can write $p = (cp)a + (dp)b$.
    – copper.hat
    32 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am thinking about this in the context of the two water jugs problem. I know that a jug of capacity n can be filled if gcd(a,b) | n. Does this have the corollary that any integer can be written as a linear combination of a and b if gcd(a,b) = 1.










share|cite|improve this question







New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am thinking about this in the context of the two water jugs problem. I know that a jug of capacity n can be filled if gcd(a,b) | n. Does this have the corollary that any integer can be written as a linear combination of a and b if gcd(a,b) = 1.







combinatorics number-theory elementary-number-theory puzzle






share|cite|improve this question







New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question







New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question






New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 35 mins ago









taurus

82




82




New contributor




taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






taurus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Yes, that is right
    – DonAntonio
    34 mins ago










  • If $gcd(a,b) = 1$ then there are $c,d $ such that $ac+bd = 1$ and hence if $p$ is an integer we can write $p = (cp)a + (dp)b$.
    – copper.hat
    32 mins ago
















  • Yes, that is right
    – DonAntonio
    34 mins ago










  • If $gcd(a,b) = 1$ then there are $c,d $ such that $ac+bd = 1$ and hence if $p$ is an integer we can write $p = (cp)a + (dp)b$.
    – copper.hat
    32 mins ago















Yes, that is right
– DonAntonio
34 mins ago




Yes, that is right
– DonAntonio
34 mins ago












If $gcd(a,b) = 1$ then there are $c,d $ such that $ac+bd = 1$ and hence if $p$ is an integer we can write $p = (cp)a + (dp)b$.
– copper.hat
32 mins ago




If $gcd(a,b) = 1$ then there are $c,d $ such that $ac+bd = 1$ and hence if $p$ is an integer we can write $p = (cp)a + (dp)b$.
– copper.hat
32 mins ago










2 Answers
2






active

oldest

votes

















up vote
4
down vote



accepted










Yes that's a consequence of Bézout's identity which can be proved by Euclidean algorithm and which states that



$$forall a,bin mathbbZquad gcd(a,b)=1 iff exists x,yin mathbbZquad ax+by=1$$



from which we obtain that



$$acdot nx+bcdot ny=n$$






share|cite|improve this answer






















  • @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
    – gimusi
    28 mins ago










  • Bézout's theorem is usually interpreted in the context of algebraic geometry,
    – copper.hat
    27 mins ago










  • @copper.hat Indeed I'm completely unaware about algebraic geometry :)
    – gimusi
    25 mins ago










  • Thank you very much!
    – taurus
    23 mins ago

















up vote
0
down vote













In general, if $d=gcd(a,b)$, then any integer of the form $nd$ for some integer $n$ can be expressed as a linear combination of $a$ and $b$. This is because we can write $a=da_1$ and $b=db_1$ for integers $a_1,b_1$ so that $gcd(a_1,b_1)=1$. By the euclidean algorithm this leads us to the fact that there exists $k_1,k_2$ such that
$$1=k_1a_1+k_2b_1$$
for all $a_1,b_1$. Multiplying both sides of the equation by $nd$, we get
$$nd=nk_1(da_1)+nk_2(db_1)=nk_1a+nk_2b$$
Which gives us a way to find anything of the form $nd$ as a linear combination of $a,b$.






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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    taurus is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2965188%2fif-gcda-b-1-can-any-integer-be-written-as-a-linear-combination-of-a-b%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote



    accepted










    Yes that's a consequence of Bézout's identity which can be proved by Euclidean algorithm and which states that



    $$forall a,bin mathbbZquad gcd(a,b)=1 iff exists x,yin mathbbZquad ax+by=1$$



    from which we obtain that



    $$acdot nx+bcdot ny=n$$






    share|cite|improve this answer






















    • @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
      – gimusi
      28 mins ago










    • Bézout's theorem is usually interpreted in the context of algebraic geometry,
      – copper.hat
      27 mins ago










    • @copper.hat Indeed I'm completely unaware about algebraic geometry :)
      – gimusi
      25 mins ago










    • Thank you very much!
      – taurus
      23 mins ago














    up vote
    4
    down vote



    accepted










    Yes that's a consequence of Bézout's identity which can be proved by Euclidean algorithm and which states that



    $$forall a,bin mathbbZquad gcd(a,b)=1 iff exists x,yin mathbbZquad ax+by=1$$



    from which we obtain that



    $$acdot nx+bcdot ny=n$$






    share|cite|improve this answer






















    • @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
      – gimusi
      28 mins ago










    • Bézout's theorem is usually interpreted in the context of algebraic geometry,
      – copper.hat
      27 mins ago










    • @copper.hat Indeed I'm completely unaware about algebraic geometry :)
      – gimusi
      25 mins ago










    • Thank you very much!
      – taurus
      23 mins ago












    up vote
    4
    down vote



    accepted







    up vote
    4
    down vote



    accepted






    Yes that's a consequence of Bézout's identity which can be proved by Euclidean algorithm and which states that



    $$forall a,bin mathbbZquad gcd(a,b)=1 iff exists x,yin mathbbZquad ax+by=1$$



    from which we obtain that



    $$acdot nx+bcdot ny=n$$






    share|cite|improve this answer














    Yes that's a consequence of Bézout's identity which can be proved by Euclidean algorithm and which states that



    $$forall a,bin mathbbZquad gcd(a,b)=1 iff exists x,yin mathbbZquad ax+by=1$$



    from which we obtain that



    $$acdot nx+bcdot ny=n$$







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited 30 mins ago

























    answered 32 mins ago









    gimusi

    78.1k73889




    78.1k73889











    • @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
      – gimusi
      28 mins ago










    • Bézout's theorem is usually interpreted in the context of algebraic geometry,
      – copper.hat
      27 mins ago










    • @copper.hat Indeed I'm completely unaware about algebraic geometry :)
      – gimusi
      25 mins ago










    • Thank you very much!
      – taurus
      23 mins ago
















    • @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
      – gimusi
      28 mins ago










    • Bézout's theorem is usually interpreted in the context of algebraic geometry,
      – copper.hat
      27 mins ago










    • @copper.hat Indeed I'm completely unaware about algebraic geometry :)
      – gimusi
      25 mins ago










    • Thank you very much!
      – taurus
      23 mins ago















    @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
    – gimusi
    28 mins ago




    @copper.hat Thanks for the editing, the fact is that I've also encountered that as "Bezout's theorem" but "Bezout's identity" seems to be the official name.
    – gimusi
    28 mins ago












    Bézout's theorem is usually interpreted in the context of algebraic geometry,
    – copper.hat
    27 mins ago




    Bézout's theorem is usually interpreted in the context of algebraic geometry,
    – copper.hat
    27 mins ago












    @copper.hat Indeed I'm completely unaware about algebraic geometry :)
    – gimusi
    25 mins ago




    @copper.hat Indeed I'm completely unaware about algebraic geometry :)
    – gimusi
    25 mins ago












    Thank you very much!
    – taurus
    23 mins ago




    Thank you very much!
    – taurus
    23 mins ago










    up vote
    0
    down vote













    In general, if $d=gcd(a,b)$, then any integer of the form $nd$ for some integer $n$ can be expressed as a linear combination of $a$ and $b$. This is because we can write $a=da_1$ and $b=db_1$ for integers $a_1,b_1$ so that $gcd(a_1,b_1)=1$. By the euclidean algorithm this leads us to the fact that there exists $k_1,k_2$ such that
    $$1=k_1a_1+k_2b_1$$
    for all $a_1,b_1$. Multiplying both sides of the equation by $nd$, we get
    $$nd=nk_1(da_1)+nk_2(db_1)=nk_1a+nk_2b$$
    Which gives us a way to find anything of the form $nd$ as a linear combination of $a,b$.






    share|cite|improve this answer
























      up vote
      0
      down vote













      In general, if $d=gcd(a,b)$, then any integer of the form $nd$ for some integer $n$ can be expressed as a linear combination of $a$ and $b$. This is because we can write $a=da_1$ and $b=db_1$ for integers $a_1,b_1$ so that $gcd(a_1,b_1)=1$. By the euclidean algorithm this leads us to the fact that there exists $k_1,k_2$ such that
      $$1=k_1a_1+k_2b_1$$
      for all $a_1,b_1$. Multiplying both sides of the equation by $nd$, we get
      $$nd=nk_1(da_1)+nk_2(db_1)=nk_1a+nk_2b$$
      Which gives us a way to find anything of the form $nd$ as a linear combination of $a,b$.






      share|cite|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        In general, if $d=gcd(a,b)$, then any integer of the form $nd$ for some integer $n$ can be expressed as a linear combination of $a$ and $b$. This is because we can write $a=da_1$ and $b=db_1$ for integers $a_1,b_1$ so that $gcd(a_1,b_1)=1$. By the euclidean algorithm this leads us to the fact that there exists $k_1,k_2$ such that
        $$1=k_1a_1+k_2b_1$$
        for all $a_1,b_1$. Multiplying both sides of the equation by $nd$, we get
        $$nd=nk_1(da_1)+nk_2(db_1)=nk_1a+nk_2b$$
        Which gives us a way to find anything of the form $nd$ as a linear combination of $a,b$.






        share|cite|improve this answer












        In general, if $d=gcd(a,b)$, then any integer of the form $nd$ for some integer $n$ can be expressed as a linear combination of $a$ and $b$. This is because we can write $a=da_1$ and $b=db_1$ for integers $a_1,b_1$ so that $gcd(a_1,b_1)=1$. By the euclidean algorithm this leads us to the fact that there exists $k_1,k_2$ such that
        $$1=k_1a_1+k_2b_1$$
        for all $a_1,b_1$. Multiplying both sides of the equation by $nd$, we get
        $$nd=nk_1(da_1)+nk_2(db_1)=nk_1a+nk_2b$$
        Which gives us a way to find anything of the form $nd$ as a linear combination of $a,b$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered 19 mins ago









        user496634

        8661110




        8661110




















            taurus is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            taurus is a new contributor. Be nice, and check out our Code of Conduct.












            taurus is a new contributor. Be nice, and check out our Code of Conduct.











            taurus is a new contributor. Be nice, and check out our Code of Conduct.













             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2965188%2fif-gcda-b-1-can-any-integer-be-written-as-a-linear-combination-of-a-b%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery