Random non-diagonal diagonalizable matrix with negative eigenvals to only reals

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











up vote
0
down vote

favorite












I want to generate a random matrix $M$ that is non-diagonal, with negative eigenvalues, but diagonalizable into $V$, $D$, both with only real elements. I'm using SymPy for the diagonalization. (I'm trying also to have $V^T = V^-1$)



I'm generating $M$ as suggested here:



  • Random matrix $mathrm X in mathbb R^n times n$

  • $M = left( varepsilon mathrm I_n + mathrm X^top mathrm X right)$ where $varepsilon > 0$

Every time I diagonalize $M$ into $V$, $D$, either of them has complex values. Can I generate $M$ so that $V$, $D$ have only real numbers?







share|cite|improve this question























    up vote
    0
    down vote

    favorite












    I want to generate a random matrix $M$ that is non-diagonal, with negative eigenvalues, but diagonalizable into $V$, $D$, both with only real elements. I'm using SymPy for the diagonalization. (I'm trying also to have $V^T = V^-1$)



    I'm generating $M$ as suggested here:



    • Random matrix $mathrm X in mathbb R^n times n$

    • $M = left( varepsilon mathrm I_n + mathrm X^top mathrm X right)$ where $varepsilon > 0$

    Every time I diagonalize $M$ into $V$, $D$, either of them has complex values. Can I generate $M$ so that $V$, $D$ have only real numbers?







    share|cite|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want to generate a random matrix $M$ that is non-diagonal, with negative eigenvalues, but diagonalizable into $V$, $D$, both with only real elements. I'm using SymPy for the diagonalization. (I'm trying also to have $V^T = V^-1$)



      I'm generating $M$ as suggested here:



      • Random matrix $mathrm X in mathbb R^n times n$

      • $M = left( varepsilon mathrm I_n + mathrm X^top mathrm X right)$ where $varepsilon > 0$

      Every time I diagonalize $M$ into $V$, $D$, either of them has complex values. Can I generate $M$ so that $V$, $D$ have only real numbers?







      share|cite|improve this question











      I want to generate a random matrix $M$ that is non-diagonal, with negative eigenvalues, but diagonalizable into $V$, $D$, both with only real elements. I'm using SymPy for the diagonalization. (I'm trying also to have $V^T = V^-1$)



      I'm generating $M$ as suggested here:



      • Random matrix $mathrm X in mathbb R^n times n$

      • $M = left( varepsilon mathrm I_n + mathrm X^top mathrm X right)$ where $varepsilon > 0$

      Every time I diagonalize $M$ into $V$, $D$, either of them has complex values. Can I generate $M$ so that $V$, $D$ have only real numbers?









      share|cite|improve this question










      share|cite|improve this question




      share|cite|improve this question









      asked Jul 28 at 9:55









      yokke

      153




      153




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          You can first randomly generate $D$, which completely determines the characteristic polynomial (that is, you see to it that the roots of the polynomial, which are precisely the entries of $D$, are just real negative numbers), and then you generate $V$ at random and then set
          $$
          M = VDV^-1.
          $$
          The important thing to observe here is the invariance of the characteristic polynomial under conjugation:
          $$
          det(VDV^-1 - lambda I) = det(V(D - lambda I)V^-1) = det(D - lambda I)
          $$
          since the determinant is multiplicative.






          share|cite|improve this answer




























            up vote
            0
            down vote













            The reason you are getting complex numbers is that there is nothing in the construction of $M$ that guarantees the existence of a diagonalization over the reals.






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



              );








               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865139%2frandom-non-diagonal-diagonalizable-matrix-with-negative-eigenvals-to-only-reals%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
              1
              down vote



              accepted










              You can first randomly generate $D$, which completely determines the characteristic polynomial (that is, you see to it that the roots of the polynomial, which are precisely the entries of $D$, are just real negative numbers), and then you generate $V$ at random and then set
              $$
              M = VDV^-1.
              $$
              The important thing to observe here is the invariance of the characteristic polynomial under conjugation:
              $$
              det(VDV^-1 - lambda I) = det(V(D - lambda I)V^-1) = det(D - lambda I)
              $$
              since the determinant is multiplicative.






              share|cite|improve this answer

























                up vote
                1
                down vote



                accepted










                You can first randomly generate $D$, which completely determines the characteristic polynomial (that is, you see to it that the roots of the polynomial, which are precisely the entries of $D$, are just real negative numbers), and then you generate $V$ at random and then set
                $$
                M = VDV^-1.
                $$
                The important thing to observe here is the invariance of the characteristic polynomial under conjugation:
                $$
                det(VDV^-1 - lambda I) = det(V(D - lambda I)V^-1) = det(D - lambda I)
                $$
                since the determinant is multiplicative.






                share|cite|improve this answer























                  up vote
                  1
                  down vote



                  accepted







                  up vote
                  1
                  down vote



                  accepted






                  You can first randomly generate $D$, which completely determines the characteristic polynomial (that is, you see to it that the roots of the polynomial, which are precisely the entries of $D$, are just real negative numbers), and then you generate $V$ at random and then set
                  $$
                  M = VDV^-1.
                  $$
                  The important thing to observe here is the invariance of the characteristic polynomial under conjugation:
                  $$
                  det(VDV^-1 - lambda I) = det(V(D - lambda I)V^-1) = det(D - lambda I)
                  $$
                  since the determinant is multiplicative.






                  share|cite|improve this answer













                  You can first randomly generate $D$, which completely determines the characteristic polynomial (that is, you see to it that the roots of the polynomial, which are precisely the entries of $D$, are just real negative numbers), and then you generate $V$ at random and then set
                  $$
                  M = VDV^-1.
                  $$
                  The important thing to observe here is the invariance of the characteristic polynomial under conjugation:
                  $$
                  det(VDV^-1 - lambda I) = det(V(D - lambda I)V^-1) = det(D - lambda I)
                  $$
                  since the determinant is multiplicative.







                  share|cite|improve this answer













                  share|cite|improve this answer



                  share|cite|improve this answer











                  answered Jul 28 at 10:37









                  AlgebraicsAnonymous

                  66611




                  66611




















                      up vote
                      0
                      down vote













                      The reason you are getting complex numbers is that there is nothing in the construction of $M$ that guarantees the existence of a diagonalization over the reals.






                      share|cite|improve this answer

























                        up vote
                        0
                        down vote













                        The reason you are getting complex numbers is that there is nothing in the construction of $M$ that guarantees the existence of a diagonalization over the reals.






                        share|cite|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          The reason you are getting complex numbers is that there is nothing in the construction of $M$ that guarantees the existence of a diagonalization over the reals.






                          share|cite|improve this answer













                          The reason you are getting complex numbers is that there is nothing in the construction of $M$ that guarantees the existence of a diagonalization over the reals.







                          share|cite|improve this answer













                          share|cite|improve this answer



                          share|cite|improve this answer











                          answered Jul 28 at 10:37









                          uniquesolution

                          7,562721




                          7,562721






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865139%2frandom-non-diagonal-diagonalizable-matrix-with-negative-eigenvals-to-only-reals%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What is the equation of a 3D cone with generalised tilt?

                              Relationship between determinant of matrix and determinant of adjoint?

                              Color the edges and diagonals of a regular polygon