Eigenvalues and eigenvectors

The function eigen(Sm) calculates the eigenvalues and eigenvectors of a symmetric matrix Sm. The result of this function is a list of two components named values and vectors. The assignment

ev <- eigen(Sm)

will assign this list to ev. Then ev$val is the vector of eigenvalues of Sm and ev$vec is the matrix of corresponding eigenvectors. Had we only needed the eigenvalues we could have used the assignment:

evals <- eigen(Sm)$values

evals now holds the vector of eigenvalues and the second component is discarded. If the expression

eigen(Sm)

is used by itself as a command the two components are printed, with their names, at the terminal.



Jeff Banfield
2/13/1998