Solve linear system of equations by RREF.












0












$begingroup$



Consider a Markov chain with transition matrix



$$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$



where $0<a,b,c<1.$ Find the stationary distribution.




This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$



I get the equations



$$begin{align}(1-a)pi_1+cpi_3&=pi_1\
api_1+(1-b)pi_2 &= pi_2\
bpi_2+(1-c)pi_3&=pi_3\
pi_1+pi_2+pi_3&=1end{align}$$



ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get



begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}



adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.










share|cite|improve this question









$endgroup$

















    0












    $begingroup$



    Consider a Markov chain with transition matrix



    $$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$



    where $0<a,b,c<1.$ Find the stationary distribution.




    This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$



    I get the equations



    $$begin{align}(1-a)pi_1+cpi_3&=pi_1\
    api_1+(1-b)pi_2 &= pi_2\
    bpi_2+(1-c)pi_3&=pi_3\
    pi_1+pi_2+pi_3&=1end{align}$$



    ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get



    begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}



    adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.










    share|cite|improve this question









    $endgroup$















      0












      0








      0


      1



      $begingroup$



      Consider a Markov chain with transition matrix



      $$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$



      where $0<a,b,c<1.$ Find the stationary distribution.




      This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$



      I get the equations



      $$begin{align}(1-a)pi_1+cpi_3&=pi_1\
      api_1+(1-b)pi_2 &= pi_2\
      bpi_2+(1-c)pi_3&=pi_3\
      pi_1+pi_2+pi_3&=1end{align}$$



      ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get



      begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}



      adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.










      share|cite|improve this question









      $endgroup$





      Consider a Markov chain with transition matrix



      $$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$



      where $0<a,b,c<1.$ Find the stationary distribution.




      This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$



      I get the equations



      $$begin{align}(1-a)pi_1+cpi_3&=pi_1\
      api_1+(1-b)pi_2 &= pi_2\
      bpi_2+(1-c)pi_3&=pi_3\
      pi_1+pi_2+pi_3&=1end{align}$$



      ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get



      begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}



      adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.







      linear-algebra






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 13 at 22:05









      ParsevalParseval

      2,9171719




      2,9171719






















          2 Answers
          2






          active

          oldest

          votes


















          0












          $begingroup$

          Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:



          $
          begin{bmatrix}
          pi_1 & pi_2 & pi_3
          end{bmatrix}
          begin{bmatrix}
          -a & a & 0\
          0 & -b & b\
          c & 0 & -c
          end{bmatrix}
          =
          begin{bmatrix}
          -api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
          end{bmatrix}
          $
          .



          Now use that $$vec{pi}left(P - Iright)= vec{0} iff
          begin{bmatrix}
          -api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
          end{bmatrix} =
          begin{bmatrix}
          0\ 0\ 0
          end{bmatrix}.$$



          Adding the first equation to the second we get the third and we can thus eliminate it:



          $$vec{pi}left(P - Iright)= vec{0} iff
          begin{bmatrix}
          -api_1 + cpi_3\ api_1 - bpi_2
          end{bmatrix} =
          begin{bmatrix}
          0\ 0
          end{bmatrix}.$$



          Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:



          $$begin{bmatrix}
          -api_1 + cx\ api_1 - bpi_2
          end{bmatrix} =
          begin{bmatrix}
          0\ 0
          end{bmatrix}.$$



          Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
          $$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$






          share|cite|improve this answer









          $endgroup$





















            0












            $begingroup$

            Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.






            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%2f3072579%2fsolve-linear-system-of-equations-by-rref%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0












              $begingroup$

              Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:



              $
              begin{bmatrix}
              pi_1 & pi_2 & pi_3
              end{bmatrix}
              begin{bmatrix}
              -a & a & 0\
              0 & -b & b\
              c & 0 & -c
              end{bmatrix}
              =
              begin{bmatrix}
              -api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
              end{bmatrix}
              $
              .



              Now use that $$vec{pi}left(P - Iright)= vec{0} iff
              begin{bmatrix}
              -api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
              end{bmatrix} =
              begin{bmatrix}
              0\ 0\ 0
              end{bmatrix}.$$



              Adding the first equation to the second we get the third and we can thus eliminate it:



              $$vec{pi}left(P - Iright)= vec{0} iff
              begin{bmatrix}
              -api_1 + cpi_3\ api_1 - bpi_2
              end{bmatrix} =
              begin{bmatrix}
              0\ 0
              end{bmatrix}.$$



              Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:



              $$begin{bmatrix}
              -api_1 + cx\ api_1 - bpi_2
              end{bmatrix} =
              begin{bmatrix}
              0\ 0
              end{bmatrix}.$$



              Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
              $$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:



                $
                begin{bmatrix}
                pi_1 & pi_2 & pi_3
                end{bmatrix}
                begin{bmatrix}
                -a & a & 0\
                0 & -b & b\
                c & 0 & -c
                end{bmatrix}
                =
                begin{bmatrix}
                -api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
                end{bmatrix}
                $
                .



                Now use that $$vec{pi}left(P - Iright)= vec{0} iff
                begin{bmatrix}
                -api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
                end{bmatrix} =
                begin{bmatrix}
                0\ 0\ 0
                end{bmatrix}.$$



                Adding the first equation to the second we get the third and we can thus eliminate it:



                $$vec{pi}left(P - Iright)= vec{0} iff
                begin{bmatrix}
                -api_1 + cpi_3\ api_1 - bpi_2
                end{bmatrix} =
                begin{bmatrix}
                0\ 0
                end{bmatrix}.$$



                Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:



                $$begin{bmatrix}
                -api_1 + cx\ api_1 - bpi_2
                end{bmatrix} =
                begin{bmatrix}
                0\ 0
                end{bmatrix}.$$



                Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
                $$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:



                  $
                  begin{bmatrix}
                  pi_1 & pi_2 & pi_3
                  end{bmatrix}
                  begin{bmatrix}
                  -a & a & 0\
                  0 & -b & b\
                  c & 0 & -c
                  end{bmatrix}
                  =
                  begin{bmatrix}
                  -api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
                  end{bmatrix}
                  $
                  .



                  Now use that $$vec{pi}left(P - Iright)= vec{0} iff
                  begin{bmatrix}
                  -api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
                  end{bmatrix} =
                  begin{bmatrix}
                  0\ 0\ 0
                  end{bmatrix}.$$



                  Adding the first equation to the second we get the third and we can thus eliminate it:



                  $$vec{pi}left(P - Iright)= vec{0} iff
                  begin{bmatrix}
                  -api_1 + cpi_3\ api_1 - bpi_2
                  end{bmatrix} =
                  begin{bmatrix}
                  0\ 0
                  end{bmatrix}.$$



                  Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:



                  $$begin{bmatrix}
                  -api_1 + cx\ api_1 - bpi_2
                  end{bmatrix} =
                  begin{bmatrix}
                  0\ 0
                  end{bmatrix}.$$



                  Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
                  $$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$






                  share|cite|improve this answer









                  $endgroup$



                  Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:



                  $
                  begin{bmatrix}
                  pi_1 & pi_2 & pi_3
                  end{bmatrix}
                  begin{bmatrix}
                  -a & a & 0\
                  0 & -b & b\
                  c & 0 & -c
                  end{bmatrix}
                  =
                  begin{bmatrix}
                  -api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
                  end{bmatrix}
                  $
                  .



                  Now use that $$vec{pi}left(P - Iright)= vec{0} iff
                  begin{bmatrix}
                  -api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
                  end{bmatrix} =
                  begin{bmatrix}
                  0\ 0\ 0
                  end{bmatrix}.$$



                  Adding the first equation to the second we get the third and we can thus eliminate it:



                  $$vec{pi}left(P - Iright)= vec{0} iff
                  begin{bmatrix}
                  -api_1 + cpi_3\ api_1 - bpi_2
                  end{bmatrix} =
                  begin{bmatrix}
                  0\ 0
                  end{bmatrix}.$$



                  Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:



                  $$begin{bmatrix}
                  -api_1 + cx\ api_1 - bpi_2
                  end{bmatrix} =
                  begin{bmatrix}
                  0\ 0
                  end{bmatrix}.$$



                  Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
                  $$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Jan 13 at 23:49









                  PiKindOfGuyPiKindOfGuy

                  18611




                  18611























                      0












                      $begingroup$

                      Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.






                      share|cite|improve this answer









                      $endgroup$


















                        0












                        $begingroup$

                        Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.






                        share|cite|improve this answer









                        $endgroup$
















                          0












                          0








                          0





                          $begingroup$

                          Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.






                          share|cite|improve this answer









                          $endgroup$



                          Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Jan 14 at 1:03









                          amdamd

                          30.2k21050




                          30.2k21050






























                              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%2f3072579%2fsolve-linear-system-of-equations-by-rref%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

                              MongoDB - Not Authorized To Execute Command

                              in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

                              How to fix TextFormField cause rebuild widget in Flutter