#eigen values and vectors
a <- matrix(c(2, -1, -1, 2), 2)
eigen(a)
I am trying to find eigenvalues and eigenvectors in R. Function eigen
works for eigenvalues but there are errors in eigenvectors values. Is there any way to fix that?
#eigen values and vectors
a <- matrix(c(2, -1, -1, 2), 2)
eigen(a)
I am trying to find eigenvalues and eigenvectors in R. Function eigen
works for eigenvalues but there are errors in eigenvectors values. Is there any way to fix that?
Copyright © 2021 Jogjafile Inc.
Some paper work tells you
(-s, s)
for any non-zero real values
;(t, t)
for any non-zero real valuet
.Scaling eigenvectors to unit-length gives
Scaling is good because if the matrix is real symmetric, the matrix of eigenvectors is orthonormal, so that its inverse is its transpose. Taking your real symmetric matrix
a
for example:How to find eigenvectors using textbook method
The textbook method is to solve the homogenous system:
(A - λI)x = 0
for the Null Space basis. TheNullSpace
function in my this answer would be helpful.As you can see, they are not "normalized". By contrasts,
pracma::nullspace
gives "normalized" eigenvectors, so you get something consistent with the output ofeigen
(up to possible sign flipping):