This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/eigen.html
eigen {base}R Documentation

Spectral Decomposition of a Matrix

Description

This function provides an interface to the EISPACK routines RS, RG, CH and CG.

Usage

eigen(x, symmetric, only.values=FALSE)

Arguments

x

a matrix whose spectral decomposition is to be computed.

symmetric

if TRUE, the matrix is assumed to be symmetric (or Hermitian if complex) and only its lower triangle is used. If symmetric is not specified, the matrix is inspected for symmetry.

only.values

if TRUE, only the eigenvalues are computed and returned, otherwise both eigenvalues and eigenvectors are returned.

Value

The spectral decomposition of x is returned as components of a list.

values

a vector containing the eigenvalues of x, sorted decreasingly, according to Mod(values) if they are complex.

vectors

a matrix whose columns contain the eigenvectors of x.

References

Smith, B. T, J. M. Boyle, J. J. Dongarra, B. S. Garbow, Y. Ikebe, V. Klema, C. B. Moler (1976). Matrix Eigensystems Routines - EISPACK Guide. Springer-Verlag Lecture Notes in Computer Science.

See Also

svd, a generalization of eigen; qr, and chol for related decompositions.

Examples

eigen(cbind(c(1,-1),c(-1,1)))
eigen(cbind(c(1,-1),c(-1,1)), symmetric = FALSE)# same (different algorithm).

eigen(cbind(1,c(1,-1)), only.values = TRUE)
eigen(cbind(-1,2:1)) # complex values
eigen(print(cbind(c(0,1i), c(-1i,0))))# Hermite ==> real Eigen values
## 3 x 3:
eigen(cbind( 1,3:1,1:3))
eigen(cbind(-1,c(1:2,0),0:2)) # complex values

[Package base version 0.60 ]