Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

EIGEN Call

computes eigenvalues and eigenvectors

CALL EIGEN( eigenvalues, eigenvectors, A) <VECL="vl">;

where A is an arbitrary square numeric matrix for which eigenvalues and eigenvectors are to be calculated.

The EIGEN call returns the following values:
eigenvalues
a matrix to contain the eigenvalues of the input matrix.
eigenvectors
names a matrix to contain the right eigenvectors of the input matrix.
vl
is an optional n ×n matrix containing the left eigenvectors of A in the same manner that eigenvectors contains the right eigenvectors.

The EIGEN subroutine computes eigenvalues, a matrix containing the eigenvalues of A arranged in descending order. If A is symmetric, eigenvalues in the n ×1 vector containing the n real eigenvalues of A. If A is not symmetric (as determined by the criterion described below) eigenvalues is an n ×2 matrix containing the eigenvalues of the n ×n matrix A. The first column of A contains the real parts, Re(\lambda), and the second column contains the imaginary parts Im(\lambda).Each row represents one eigenvalue, {Re}(\lambda) + i{Im}(\lambda).Complex conjugate eigenvalues, Re(\lambda)+- i{Im}(\lambda),are stored in standard order; that is, the eigenvalue of the pair with a positive imaginary part is followed by the eigenvalue of the pair with the negative imaginary part.

The EIGEN subroutine also computes eigenvectors, a matrix. If A is symmetric, then eigenvectors has orthonormal column eigenvectors of A arranged so that the matrices correspond; that is, the first column of eigenvectors is the eigenvector corresponding to the largest eigenvalue, and so forth. If A is not symmetric, then eigenvectors is an n ×n matrix containing the right eigenvectors of A. If the eigenvalue in row i of eigenvalues is real, then column i of eigenvectors contains the corresponding real eigenvector. If rows i and i+1 of eigenvalues contain complex conjugate eigenvalues Re(\lambda)+- i{Im}(\lambda),then columns i and i+1 of eigenvectors contain the real, v, and imaginary, {\mu}, parts, respectively, of the two corresponding eigenvectors v+- i{\mu}.

The eigenvalues of a matrix A are the roots of the characteristic polynomial, which is defined as p(z) = det(zI- A). The spectrum, denoted by \lambda(A), is the set of eigenvalues of the matrix A. If \lambda(A)=\{\lambda_1, ... ,\lambda_n\}, then \det(A) = \lambda_1 \lambda_2  ...  \lambda_n.

The trace of A is defined by
{\rm tr}(A) = \sum_{i=1}^n a_{ii}
and tr(A)= \lambda_1 +  ...  + \lambda_n.

An eigenvector is a nonzero vector, x, that satisfies A{x}= \lambda{x} for \lambda \in \lambda(A). Right eigenvectors satisfy A{x}= \lambda{x}, and left eigenvectors satisfy x^'A= \lambda{x}^'.

The following are properties of the unsymmetric real eigenvalue problem, in which the real matrix A is square but not necessarily symmetric:

The three routines, EIGEN, EIGVAL, and EIGVEC, use the following test of symmetry for a square argument matrix A:
  1. Select the entry of A with the largest magnitude:
    a_{max} = \max_{i,j=1, ... ,n} | a_{i,j}|
  2. Multiply the value of amax with the square root of the machine precision \epsilon. (The value of \epsilon is the largest value stored in double precision that, when added to 1 in double precision, still results in 1.)
  3. The matrix A is considered unsymmetric if there exists at least one pair of symmetric entries that differs in more than a_{max}\sqrt{\epsilon},
    | a_{i,j}-a_{j,i}| \gt a_{max} \sqrt{\epsilon}


If A is symmetric, the result of the statement
   call eigen(m,e,a);
has the properties
A*E & = & E*{diag}(M) \E^'*E & = & I(N)
that is,
E' = inv(E)
so that
A = E* diag(M)*E'   .
The QL method is used to compute the eigenvalues (Wilkinson and Reinsch 1971).

In statistical applications, nonsymmetric matrices for which eigenvalues are desired are usually of the form E-1 H, where E and H are symmetric. The eigenvalues L and eigenvectors V of E-1H can be obtained by using the GENEIG subroutine or as follows:

   f=root(einv);
   a=f*h*f';
   call eigen(l,w,a);
   v=f'*w;
The computation can be checked by forming the residuals:
   r=einv*h*v-v*diag(l);
The values in R should be of the order of round-off error.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.