eigen {Matrix} R Documentation

Spectral Decomposition of a Matrix

Description


Computes eigenvalues and eigenvectors of numeric
(double, integer, logical) or complex matrices.

Usage

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

Arguments

x

a numeric Or complex matrix whose spectral decomposition Is To be computed. Logical matrices are coerced To numeric.

symmetric

If True, the matrix Is assumed To be symmetric (Or Hermitian If complex) And only its lower triangle (diagonal included) Is used. If symmetric Is Not specified, isSymmetric(x) Is used. [as boolean]

only.values

If True, only the eigenvalues are computed And returned, otherwise both eigenvalues And eigenvectors are returned. [as boolean]

EISPACK

logical. Defunct And ignored. [as boolean]

Details

If symmetric is unspecified, isSymmetric(x) determines if the matrix is symmetric up to plausible numerical inaccuracies. It is surer and typically much faster to set the value yourself. Computing the eigenvectors Is the slow part For large matrices. Computing the eigendecomposition Of a matrix Is subject To errors On a real-world computer: the definitive analysis Is Wilkinson (1965). All you can hope For Is a solution To a problem suitably close To x. So even though a real asymmetric x may have an algebraic solution With repeated real eigenvalues, the computed solution may be Of a similar matrix With complex conjugate pairs Of eigenvalues. Unsuccessful results from the underlying LAPACK code will result In an Error giving a positive Error code (most often 1): these can only be interpreted by detailed study Of the FORTRAN code.

Authors

sciBASIC.NET

Value

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

1. values: a vector containing the p eigenvalues Of x, sorted In decreasing order, according To Mod(values) In the asymmetric Case When they might be complex (even For real matrices). For real asymmetric matrices the vector will be complex only If complex conjugate pairs Of eigenvalues are detected. 2. vectors: either a p * p matrix whose columns contain the eigenvectors Of x, Or NULL If only.values Is True. The vectors are normalized To unit length.

Recall that the eigenvectors are only defined up To a constant: even when the length Is specified they are still only defined up to a scalar of modulus one (the sign for real matrices).

When only.values Is Not true, as by default, the result Is of S3 class "eigen".

If r <- eigen(A), And V <- r$vectors; lam <- r$values, Then

 A = V Lmbd V^(-1)

(up to numerical fuzz), where Lmbd = diag(lam).

clr value class

Examples


[Package Matrix version 5.0.1.2389 Index]