Prove there exist $a$ such that $ab pmod p = 1$, where $p$ is a prime number and $bin {0,1,2,…p−1}$












1












$begingroup$


How do I prove there exist a modulo inverse of $b$, lets call it $a$, where $b in {0,1,2,....p−1} $ and $p$ is a prime number



$$ab pmod p = 1$$










share|cite|improve this question











$endgroup$












  • $begingroup$
    en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
    $endgroup$
    – Lord Shark the Unknown
    Oct 21 '18 at 2:08










  • $begingroup$
    @LordSharktheUnknown im sorry but I am really stupid. How does this identity help me solve this question?
    $endgroup$
    – Cup
    Oct 21 '18 at 2:17










  • $begingroup$
    There is no inverse if $b = 0$.
    $endgroup$
    – JavaMan
    Oct 21 '18 at 2:22
















1












$begingroup$


How do I prove there exist a modulo inverse of $b$, lets call it $a$, where $b in {0,1,2,....p−1} $ and $p$ is a prime number



$$ab pmod p = 1$$










share|cite|improve this question











$endgroup$












  • $begingroup$
    en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
    $endgroup$
    – Lord Shark the Unknown
    Oct 21 '18 at 2:08










  • $begingroup$
    @LordSharktheUnknown im sorry but I am really stupid. How does this identity help me solve this question?
    $endgroup$
    – Cup
    Oct 21 '18 at 2:17










  • $begingroup$
    There is no inverse if $b = 0$.
    $endgroup$
    – JavaMan
    Oct 21 '18 at 2:22














1












1








1





$begingroup$


How do I prove there exist a modulo inverse of $b$, lets call it $a$, where $b in {0,1,2,....p−1} $ and $p$ is a prime number



$$ab pmod p = 1$$










share|cite|improve this question











$endgroup$




How do I prove there exist a modulo inverse of $b$, lets call it $a$, where $b in {0,1,2,....p−1} $ and $p$ is a prime number



$$ab pmod p = 1$$







number-theory elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 19 '18 at 20:40









rtybase

11.5k31534




11.5k31534










asked Oct 21 '18 at 2:06









CupCup

326




326












  • $begingroup$
    en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
    $endgroup$
    – Lord Shark the Unknown
    Oct 21 '18 at 2:08










  • $begingroup$
    @LordSharktheUnknown im sorry but I am really stupid. How does this identity help me solve this question?
    $endgroup$
    – Cup
    Oct 21 '18 at 2:17










  • $begingroup$
    There is no inverse if $b = 0$.
    $endgroup$
    – JavaMan
    Oct 21 '18 at 2:22


















  • $begingroup$
    en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
    $endgroup$
    – Lord Shark the Unknown
    Oct 21 '18 at 2:08










  • $begingroup$
    @LordSharktheUnknown im sorry but I am really stupid. How does this identity help me solve this question?
    $endgroup$
    – Cup
    Oct 21 '18 at 2:17










  • $begingroup$
    There is no inverse if $b = 0$.
    $endgroup$
    – JavaMan
    Oct 21 '18 at 2:22
















$begingroup$
en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
$endgroup$
– Lord Shark the Unknown
Oct 21 '18 at 2:08




$begingroup$
en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
$endgroup$
– Lord Shark the Unknown
Oct 21 '18 at 2:08












$begingroup$
@LordSharktheUnknown im sorry but I am really stupid. How does this identity help me solve this question?
$endgroup$
– Cup
Oct 21 '18 at 2:17




$begingroup$
@LordSharktheUnknown im sorry but I am really stupid. How does this identity help me solve this question?
$endgroup$
– Cup
Oct 21 '18 at 2:17












$begingroup$
There is no inverse if $b = 0$.
$endgroup$
– JavaMan
Oct 21 '18 at 2:22




$begingroup$
There is no inverse if $b = 0$.
$endgroup$
– JavaMan
Oct 21 '18 at 2:22










3 Answers
3






active

oldest

votes


















0












$begingroup$

Hint: The statement you want to prove is equivalent to finding
$$
ab+kp=1,
$$

for some $k inmathbb Z$. This is called Bézout's identity, which can be stated more precisely as




Theorem (Bézout). For all positive integers $u,v$ with $gcd(u,v)=1$, there exists integers $m,n$ such that $$mu+nv=1.$$




E.g. $gcd(17,6)=1$ implies that there are some integers $m,n$ such that $17m+6n=1$. One of the solution is $m=1,n=-3$.



The proof of this theorem is left as an exercise.



Now as $gcd(a, p)=1$, there exists $b,k$ such that $ab+kp=1$ holds. However, you need to show that $b$ can always be found in the specified range, ${0,1,dots,p-1}$. This is also quite easy.






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    You need to exclude the case $b=0$.
    Use the Pigeonhole Principle together with the fact that multiplication by $b mod p$ is one-to-one.






    share|cite|improve this answer









    $endgroup$





















      0












      $begingroup$

      Alternatively, you can use FLT. Because $gcd(b,p)=1, forall bin {1,...,p-1}, p>2$, we have
      $$b^{p-1}equiv 1 pmod{p}$$
      or
      $$bcdot b^{p-2}equiv 1 pmod{p}$$
      and $a = b^{p-2} pmod{p}$.






      share|cite|improve this answer









      $endgroup$














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


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2963990%2fprove-there-exist-a-such-that-ab-pmod-p-1-where-p-is-a-prime-number-an%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0












        $begingroup$

        Hint: The statement you want to prove is equivalent to finding
        $$
        ab+kp=1,
        $$

        for some $k inmathbb Z$. This is called Bézout's identity, which can be stated more precisely as




        Theorem (Bézout). For all positive integers $u,v$ with $gcd(u,v)=1$, there exists integers $m,n$ such that $$mu+nv=1.$$




        E.g. $gcd(17,6)=1$ implies that there are some integers $m,n$ such that $17m+6n=1$. One of the solution is $m=1,n=-3$.



        The proof of this theorem is left as an exercise.



        Now as $gcd(a, p)=1$, there exists $b,k$ such that $ab+kp=1$ holds. However, you need to show that $b$ can always be found in the specified range, ${0,1,dots,p-1}$. This is also quite easy.






        share|cite|improve this answer









        $endgroup$


















          0












          $begingroup$

          Hint: The statement you want to prove is equivalent to finding
          $$
          ab+kp=1,
          $$

          for some $k inmathbb Z$. This is called Bézout's identity, which can be stated more precisely as




          Theorem (Bézout). For all positive integers $u,v$ with $gcd(u,v)=1$, there exists integers $m,n$ such that $$mu+nv=1.$$




          E.g. $gcd(17,6)=1$ implies that there are some integers $m,n$ such that $17m+6n=1$. One of the solution is $m=1,n=-3$.



          The proof of this theorem is left as an exercise.



          Now as $gcd(a, p)=1$, there exists $b,k$ such that $ab+kp=1$ holds. However, you need to show that $b$ can always be found in the specified range, ${0,1,dots,p-1}$. This is also quite easy.






          share|cite|improve this answer









          $endgroup$
















            0












            0








            0





            $begingroup$

            Hint: The statement you want to prove is equivalent to finding
            $$
            ab+kp=1,
            $$

            for some $k inmathbb Z$. This is called Bézout's identity, which can be stated more precisely as




            Theorem (Bézout). For all positive integers $u,v$ with $gcd(u,v)=1$, there exists integers $m,n$ such that $$mu+nv=1.$$




            E.g. $gcd(17,6)=1$ implies that there are some integers $m,n$ such that $17m+6n=1$. One of the solution is $m=1,n=-3$.



            The proof of this theorem is left as an exercise.



            Now as $gcd(a, p)=1$, there exists $b,k$ such that $ab+kp=1$ holds. However, you need to show that $b$ can always be found in the specified range, ${0,1,dots,p-1}$. This is also quite easy.






            share|cite|improve this answer









            $endgroup$



            Hint: The statement you want to prove is equivalent to finding
            $$
            ab+kp=1,
            $$

            for some $k inmathbb Z$. This is called Bézout's identity, which can be stated more precisely as




            Theorem (Bézout). For all positive integers $u,v$ with $gcd(u,v)=1$, there exists integers $m,n$ such that $$mu+nv=1.$$




            E.g. $gcd(17,6)=1$ implies that there are some integers $m,n$ such that $17m+6n=1$. One of the solution is $m=1,n=-3$.



            The proof of this theorem is left as an exercise.



            Now as $gcd(a, p)=1$, there exists $b,k$ such that $ab+kp=1$ holds. However, you need to show that $b$ can always be found in the specified range, ${0,1,dots,p-1}$. This is also quite easy.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Oct 21 '18 at 2:18









            TreborTrebor

            99815




            99815























                0












                $begingroup$

                You need to exclude the case $b=0$.
                Use the Pigeonhole Principle together with the fact that multiplication by $b mod p$ is one-to-one.






                share|cite|improve this answer









                $endgroup$


















                  0












                  $begingroup$

                  You need to exclude the case $b=0$.
                  Use the Pigeonhole Principle together with the fact that multiplication by $b mod p$ is one-to-one.






                  share|cite|improve this answer









                  $endgroup$
















                    0












                    0








                    0





                    $begingroup$

                    You need to exclude the case $b=0$.
                    Use the Pigeonhole Principle together with the fact that multiplication by $b mod p$ is one-to-one.






                    share|cite|improve this answer









                    $endgroup$



                    You need to exclude the case $b=0$.
                    Use the Pigeonhole Principle together with the fact that multiplication by $b mod p$ is one-to-one.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Oct 21 '18 at 3:53









                    Robert IsraelRobert Israel

                    330k23219473




                    330k23219473























                        0












                        $begingroup$

                        Alternatively, you can use FLT. Because $gcd(b,p)=1, forall bin {1,...,p-1}, p>2$, we have
                        $$b^{p-1}equiv 1 pmod{p}$$
                        or
                        $$bcdot b^{p-2}equiv 1 pmod{p}$$
                        and $a = b^{p-2} pmod{p}$.






                        share|cite|improve this answer









                        $endgroup$


















                          0












                          $begingroup$

                          Alternatively, you can use FLT. Because $gcd(b,p)=1, forall bin {1,...,p-1}, p>2$, we have
                          $$b^{p-1}equiv 1 pmod{p}$$
                          or
                          $$bcdot b^{p-2}equiv 1 pmod{p}$$
                          and $a = b^{p-2} pmod{p}$.






                          share|cite|improve this answer









                          $endgroup$
















                            0












                            0








                            0





                            $begingroup$

                            Alternatively, you can use FLT. Because $gcd(b,p)=1, forall bin {1,...,p-1}, p>2$, we have
                            $$b^{p-1}equiv 1 pmod{p}$$
                            or
                            $$bcdot b^{p-2}equiv 1 pmod{p}$$
                            and $a = b^{p-2} pmod{p}$.






                            share|cite|improve this answer









                            $endgroup$



                            Alternatively, you can use FLT. Because $gcd(b,p)=1, forall bin {1,...,p-1}, p>2$, we have
                            $$b^{p-1}equiv 1 pmod{p}$$
                            or
                            $$bcdot b^{p-2}equiv 1 pmod{p}$$
                            and $a = b^{p-2} pmod{p}$.







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Oct 21 '18 at 10:00









                            rtybasertybase

                            11.5k31534




                            11.5k31534






























                                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.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2963990%2fprove-there-exist-a-such-that-ab-pmod-p-1-where-p-is-a-prime-number-an%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

                                Plaza Victoria

                                Puebla de Zaragoza

                                Musa