[R] svd and eigen

Simon Wood snw at mcs.st-and.ac.uk
Thu Sep 6 16:29:23 CEST 2001

```The singular values of a matrix A are the +ve square roots of
the eigenvalues of A'A, or AA' (depending on the shape of A), where A' is
transpose of A. e.g....

> A<-matrix(rnorm(10),2,5)
> svd(A)\$d
[1] 1.6157235 0.9652578
> eigen(A%*%t(A))\$values^0.5
[1] 1.6157235 0.9652578

Simon

> Hello List,
> i need help for eigen and svd functions. I have a non-symmetric
> square matrix. These matrix is not positive (some eigenvalues are
> negative). I want to diagonalise these matrix. So, I use svd and
> eigen and i compare the results. eigen give me the "good" eigenvalues
> (positive and negative). I compare with another software and the
> results are the same. BUT, when i use svd, the results are completely
> different (no sign and not the same value). I thought that svd is a
> generalisation of eigen for non-square matrices but apparently, there
> are more differences ?
> I 've R1.2.3 on W2000.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```