Registered Member
|
Hello everyone,
I am having some difficulties with the Eigen methods for Eigenvalues and Eigenvectors. In particular, I am trying to compute the E-Value and E-Vectors for this matrix: 0 0 1 1 0 0 0 1 0 This is what I get using the Eigen methods: The eigenvalues of the Adjacency Matrix are: (-0.5,0.866025) (-0.5,-0.866025) (1,0) The eigenvectors of the Adjacency Matrix are: (0.0474579,0.575396) (0.0474579,-0.575396) (-0.57735,0) (0.474579,-0.328798) (0.474579,0.328798) (-0.57735,0) (-0.522037,-0.246598) (-0.522037,0.246598) (-0.57735,0) But using Matlab and number of other alternatives, I get a different Eigenvector corresponding to the real eigenvalue, namely positive values in instead: [ 0,5773502691896258 ; 0,5773502691896258 ; 0,5773502691896258 ] I actually pulled the example matrix from Wikipedia, where it was used to demonstrate the Perron–Frobenius theorem, which asserts that a real square matrix with positive entries has a unique largest real eigenvalue and that the corresponding eigenvector has strictly positive components. Thus the vector should be positive for sure. Does someone have an idea why I am getting negative values? Thank you for your help. Niccola |
Registered Member
|
I have to admit, I ignored that fact that the negative version of an eigenvector, is still an eigenvector of the corresponding matrix. So I did notice, that Eigen appears to randomly return the negative or positive version of the Eigenvectors. I guess I can just always take the absolute values and work with those.
|
Moderator
|
Indeed, if v is an eigenvector, then -v is also an eigenvector, however, there is no such notion of the absolute value of a vector. For instance, if v=(-1,1), then -v=(1,-1), and there is no reason to prefer one or the other.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]