Random non-diagonal diagonalizable matrix with negative eigenvals to only reals
Clash 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?
eigenvalues-eigenvectors diagonalization
add a comment |Â
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?
eigenvalues-eigenvectors diagonalization
add a comment |Â
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?
eigenvalues-eigenvectors diagonalization
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?
eigenvalues-eigenvectors diagonalization
asked Jul 28 at 9:55
yokke
153
153
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Jul 28 at 10:37
AlgebraicsAnonymous
66611
66611
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Jul 28 at 10:37
uniquesolution
7,562721
7,562721
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password