Computing eigenvectors from a transition matrix
up vote
0
down vote
favorite
I have a 21x21 transition matrix modeling the population of a species, and I'm trying to find the long term population proportions of the states. To do this, I'm using numpy.
I found the dominant eigenvalue to be 1.128+0i, however when I access that eigenvalue's associated right eigenvector (which should give long term population proportions), I'm getting an eigenvector with complex entries.
Can a real eigenvalue have a complex eigenvector? I'm beginning to think my numpy code for calculating these values may be incorrect.
This is the matrix. Blank entries have a value of zero.
eigenvalues-eigenvectors mathematical-modeling python transition-matrix
add a comment |
up vote
0
down vote
favorite
I have a 21x21 transition matrix modeling the population of a species, and I'm trying to find the long term population proportions of the states. To do this, I'm using numpy.
I found the dominant eigenvalue to be 1.128+0i, however when I access that eigenvalue's associated right eigenvector (which should give long term population proportions), I'm getting an eigenvector with complex entries.
Can a real eigenvalue have a complex eigenvector? I'm beginning to think my numpy code for calculating these values may be incorrect.
This is the matrix. Blank entries have a value of zero.
eigenvalues-eigenvectors mathematical-modeling python transition-matrix
Is it possible to post the matrix?
– Moo
Nov 14 at 17:11
I edited the post.
– FiFi
Nov 14 at 18:02
1
Are you getting something like: $lambda =1.127649281886682$ and $v_1 = {-0.593046+0. i,-0.315548+0. i,-0.223862+0. i,-0.188595+0. i,-0.167246+0. i,-0.148314+0. i,-0.131525+0. i,-0.116637+0. i,-0.077575+0. i,-0.0233898+0. i,-0.446881+0. i,-0.237777+0. i,-0.189774+0. i,-0.159877+0. i,-0.137526+0. i,-0.118299+0. i,-0.0996625+0. i,-0.0839618+0. i,-0.0707345+0. i,-0.0439092+0. i,-0.0311509+0. i}$
– Moo
Nov 14 at 19:37
I wonder if you have some machine precision, rounding or those types of issues. Are you using infinite precision? Can you increase that?
– Moo
Nov 14 at 19:59
Ah, I figured it out. The eig() function returns the eigenvectors as columns, when I was reading them as the rows. Thanks for the help.
– FiFi
Nov 14 at 20:55
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a 21x21 transition matrix modeling the population of a species, and I'm trying to find the long term population proportions of the states. To do this, I'm using numpy.
I found the dominant eigenvalue to be 1.128+0i, however when I access that eigenvalue's associated right eigenvector (which should give long term population proportions), I'm getting an eigenvector with complex entries.
Can a real eigenvalue have a complex eigenvector? I'm beginning to think my numpy code for calculating these values may be incorrect.
This is the matrix. Blank entries have a value of zero.
eigenvalues-eigenvectors mathematical-modeling python transition-matrix
I have a 21x21 transition matrix modeling the population of a species, and I'm trying to find the long term population proportions of the states. To do this, I'm using numpy.
I found the dominant eigenvalue to be 1.128+0i, however when I access that eigenvalue's associated right eigenvector (which should give long term population proportions), I'm getting an eigenvector with complex entries.
Can a real eigenvalue have a complex eigenvector? I'm beginning to think my numpy code for calculating these values may be incorrect.
This is the matrix. Blank entries have a value of zero.
eigenvalues-eigenvectors mathematical-modeling python transition-matrix
eigenvalues-eigenvectors mathematical-modeling python transition-matrix
edited Nov 14 at 18:02
asked Nov 14 at 16:04
FiFi
284
284
Is it possible to post the matrix?
– Moo
Nov 14 at 17:11
I edited the post.
– FiFi
Nov 14 at 18:02
1
Are you getting something like: $lambda =1.127649281886682$ and $v_1 = {-0.593046+0. i,-0.315548+0. i,-0.223862+0. i,-0.188595+0. i,-0.167246+0. i,-0.148314+0. i,-0.131525+0. i,-0.116637+0. i,-0.077575+0. i,-0.0233898+0. i,-0.446881+0. i,-0.237777+0. i,-0.189774+0. i,-0.159877+0. i,-0.137526+0. i,-0.118299+0. i,-0.0996625+0. i,-0.0839618+0. i,-0.0707345+0. i,-0.0439092+0. i,-0.0311509+0. i}$
– Moo
Nov 14 at 19:37
I wonder if you have some machine precision, rounding or those types of issues. Are you using infinite precision? Can you increase that?
– Moo
Nov 14 at 19:59
Ah, I figured it out. The eig() function returns the eigenvectors as columns, when I was reading them as the rows. Thanks for the help.
– FiFi
Nov 14 at 20:55
add a comment |
Is it possible to post the matrix?
– Moo
Nov 14 at 17:11
I edited the post.
– FiFi
Nov 14 at 18:02
1
Are you getting something like: $lambda =1.127649281886682$ and $v_1 = {-0.593046+0. i,-0.315548+0. i,-0.223862+0. i,-0.188595+0. i,-0.167246+0. i,-0.148314+0. i,-0.131525+0. i,-0.116637+0. i,-0.077575+0. i,-0.0233898+0. i,-0.446881+0. i,-0.237777+0. i,-0.189774+0. i,-0.159877+0. i,-0.137526+0. i,-0.118299+0. i,-0.0996625+0. i,-0.0839618+0. i,-0.0707345+0. i,-0.0439092+0. i,-0.0311509+0. i}$
– Moo
Nov 14 at 19:37
I wonder if you have some machine precision, rounding or those types of issues. Are you using infinite precision? Can you increase that?
– Moo
Nov 14 at 19:59
Ah, I figured it out. The eig() function returns the eigenvectors as columns, when I was reading them as the rows. Thanks for the help.
– FiFi
Nov 14 at 20:55
Is it possible to post the matrix?
– Moo
Nov 14 at 17:11
Is it possible to post the matrix?
– Moo
Nov 14 at 17:11
I edited the post.
– FiFi
Nov 14 at 18:02
I edited the post.
– FiFi
Nov 14 at 18:02
1
1
Are you getting something like: $lambda =1.127649281886682$ and $v_1 = {-0.593046+0. i,-0.315548+0. i,-0.223862+0. i,-0.188595+0. i,-0.167246+0. i,-0.148314+0. i,-0.131525+0. i,-0.116637+0. i,-0.077575+0. i,-0.0233898+0. i,-0.446881+0. i,-0.237777+0. i,-0.189774+0. i,-0.159877+0. i,-0.137526+0. i,-0.118299+0. i,-0.0996625+0. i,-0.0839618+0. i,-0.0707345+0. i,-0.0439092+0. i,-0.0311509+0. i}$
– Moo
Nov 14 at 19:37
Are you getting something like: $lambda =1.127649281886682$ and $v_1 = {-0.593046+0. i,-0.315548+0. i,-0.223862+0. i,-0.188595+0. i,-0.167246+0. i,-0.148314+0. i,-0.131525+0. i,-0.116637+0. i,-0.077575+0. i,-0.0233898+0. i,-0.446881+0. i,-0.237777+0. i,-0.189774+0. i,-0.159877+0. i,-0.137526+0. i,-0.118299+0. i,-0.0996625+0. i,-0.0839618+0. i,-0.0707345+0. i,-0.0439092+0. i,-0.0311509+0. i}$
– Moo
Nov 14 at 19:37
I wonder if you have some machine precision, rounding or those types of issues. Are you using infinite precision? Can you increase that?
– Moo
Nov 14 at 19:59
I wonder if you have some machine precision, rounding or those types of issues. Are you using infinite precision? Can you increase that?
– Moo
Nov 14 at 19:59
Ah, I figured it out. The eig() function returns the eigenvectors as columns, when I was reading them as the rows. Thanks for the help.
– FiFi
Nov 14 at 20:55
Ah, I figured it out. The eig() function returns the eigenvectors as columns, when I was reading them as the rows. Thanks for the help.
– FiFi
Nov 14 at 20:55
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
The eig() function returns the eigenvectors as columns. To access the one I needed, I took the transpose of the evecs array, and then called the desired eigenvector: evecsTrans[i]
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The eig() function returns the eigenvectors as columns. To access the one I needed, I took the transpose of the evecs array, and then called the desired eigenvector: evecsTrans[i]
add a comment |
up vote
0
down vote
The eig() function returns the eigenvectors as columns. To access the one I needed, I took the transpose of the evecs array, and then called the desired eigenvector: evecsTrans[i]
add a comment |
up vote
0
down vote
up vote
0
down vote
The eig() function returns the eigenvectors as columns. To access the one I needed, I took the transpose of the evecs array, and then called the desired eigenvector: evecsTrans[i]
The eig() function returns the eigenvectors as columns. To access the one I needed, I took the transpose of the evecs array, and then called the desired eigenvector: evecsTrans[i]
answered Nov 14 at 20:58
FiFi
284
284
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2998437%2fcomputing-eigenvectors-from-a-transition-matrix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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
Is it possible to post the matrix?
– Moo
Nov 14 at 17:11
I edited the post.
– FiFi
Nov 14 at 18:02
1
Are you getting something like: $lambda =1.127649281886682$ and $v_1 = {-0.593046+0. i,-0.315548+0. i,-0.223862+0. i,-0.188595+0. i,-0.167246+0. i,-0.148314+0. i,-0.131525+0. i,-0.116637+0. i,-0.077575+0. i,-0.0233898+0. i,-0.446881+0. i,-0.237777+0. i,-0.189774+0. i,-0.159877+0. i,-0.137526+0. i,-0.118299+0. i,-0.0996625+0. i,-0.0839618+0. i,-0.0707345+0. i,-0.0439092+0. i,-0.0311509+0. i}$
– Moo
Nov 14 at 19:37
I wonder if you have some machine precision, rounding or those types of issues. Are you using infinite precision? Can you increase that?
– Moo
Nov 14 at 19:59
Ah, I figured it out. The eig() function returns the eigenvectors as columns, when I was reading them as the rows. Thanks for the help.
– FiFi
Nov 14 at 20:55