[R] Help with eigenvectors

Ben Bolker bolker at ufl.edu
Tue Jul 8 14:31:26 CEST 2008

Francisco Javier Santos Alamillos <fsantos <at> ujaen.es> writes:

> Hi everybody,
> I have some problems with the function eigen. I have a square matrix and I
> want to calculate the eigenvalues and eigenvectors. I apply the function
> eigen and I get it, however when I solve the same problem in Statistica
> software, I realise that some eigenvectors are the opposite. How can I get
> the same values?
> Thanks in advance

  Multiply by -1   :-)
  Seriously, though, the eigenvectors can be multiplied
by any constant  (if  L.M = aL, then (cL).M = a(cL)).
(They are usually scaled to have norm 1, i.e. L.L=1.)
If you are trying to match something from a previous problem,
you can check the sign of one particular variable and
adjust the eigenvector appropriately.

  Ben Bolker

More information about the R-help mailing list