[Numpy-discussion] how to get the corresponding eigenvector for a specific eigen value?
Hoyt Koepke
hoytak@cs.ubc...
Mon Feb 9 01:40:25 CST 2009
> I have tried with linalg.solve(a, b), where I put a as the
> Matrix A - eigen value* unit matrix, and b as the zero matrix. But the
> solution returned is a zero matrix, which I really find disappointing.
So if you're trying to solve (A - \lambda I) x = b, try appending an
extra row to your (A - \lambda I) matrix with all ones; the output of
this will be the some of the elements of your eigenvector. Append a 1
to the end of your b. This will exclude the case where x = 0 as valid
solution, as you'll then require that \sum_i x_i = 1. You'll probably
want to renormalize properly afterwards.
Quick and dirty, but should work.
--Hoyt
--
++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ hoytak@gmail.com
++++++++++++++++++++++++++++++++++++++++++
More information about the Numpy-discussion
mailing list