Eigenvalues and Eigenvectors of a Matrix

DESCRIPTION:
Returns the eigenvalues and eigenvectors of a square matrix. The function eigen has been made generic. In particular, there are eigen methods in the Matrix library that differ (both in argument list, as well as in returned value) from the S-PLUS default.

USAGE:
eigen(x, ...)
eigen.default(x, symmetric = all(x==t(x)), only.values = F)

REQUIRED ARGUMENTS:
x:
matrix to be decomposed. This must be square with no missing values or ieee special values.

OPTIONAL ARGUMENTS:
symmetric:
logical flag: should the matrix be considered symmetric? Supply this argument if you know the symmetry of x; the default test is prone to problems due to the finite precision of numeric computations. (If x is complex, symmetric is taken to mean hermitian symmetric and the default test is replaced by all(x==t(Conj(x))).)
only.values:
logical flag: only compute eigenvalues if TRUE; the default is to compute eigenvectors also.

VALUE:
a list containing the eigenvalues and eigenvectors of x:
values:
vector of nrow(x) eigenvalues in descending order of modulus.
vectors:
matrix like x giving the eigenvectors corresponding to the eigenvalues in values The jth column is the eigenvector for the jth element of values. Each vector has norm 1 if symmetric=TRUE. Or NULL if only.values is TRUE

If y <- eigen(x) and x is symmetric, then up to numerical error x == y$vectors %*% diag(y$values) %*% t(y$vectors) in case x is real and . x == y$vectors %*% diag(y$values) %*% t(Conj(y$vectors)) in case x is complex.


WARNING:
When symmetric is TRUE, this algorithm only looks at the lower triangle of x.

DETAILS:
Note that different algorithms are used in the symmetric and non-symmetric cases, so the eigenvectors may not change smoothly from a symmetric matrix to a near-by, nearly symmetric one.

In the case of a non-symmetric real matrix, the eigenvalues and eigenvectors may be complex.

The EXAMPLES section shows a function that uses eigen to compute determinants.


BACKGROUND:
If A is a square matrix and Ax == gx where g is a scalar and x is a vector, then g is an eigenvalue of A and x is an eigenvector of A. Eigenvalues occur frequently in statistics (especially in multivariate analysis) as well as in other fields.

REFERENCES:
Maindonald, J. H. (1984). Statistical Computation. Wiley, New York.

Mardia, K. V., Kent, J. T. and Bibby, J. M. (1979). Multivariate Analysis. Academic Press, London.

Smith, B. T., Boyle, J. M., Dongarra, J. J., et al. (1976). Lecture Notes in Computer Science, Vol. 6, 2nd Edition. Eigensystem Routines - EISPACK Guide. Springer-Verlag, New York.

Thisted, R. A. (1988). Elements of Statistical Computing. Chapman and Hall, New York.


SEE ALSO:
chol , cov.mve , eigen.Matrix , function , matrix , prod , qr , svd .

EXAMPLES:
amat <- matrix(c(19,8,11,2,18,17,15,19,10), nrow = 3)
eigen(amat)

pprcom <- eigen(cov.mve(x)) # robust principal components

amp;# compute determinant using eigenvalues:

det <- function(x) prod(eigen(x)$values)