schur: Schur Decomposition of a Matrix
Description
Computes the Schur decomposition and eigenvalues of a square matrix.Usage
schur.Matrix(x, vectors=TRUE, rcond=FALSE, threshold=0)
Arguments
x
numeric or complex square Matrix inheriting from class
"Matrix"
. Missing values (NAs) are not allowed.
vectors
logical. When TRUE
(the default), the Schur
vectors are computed.
rcond
logical vector of length 2. When rcond[1]
is
TRUE
, the reciprocal condition numbers for the
eigenvalues are computed. When rcond[2]
is
TRUE
, the reciprocal condition numbers for the
eigenvalues are
threshold
a numeric value. A diagonal block associated with a particular
eigenvalue will appear in the top left portion of the Schur
decomposition if it is greater than or equal to threshold
in
magnitude. By default, threshold
is zero,
Value
- An object of class
c("schur.Matrix", "decomp")
whose
attributes include the eigenvalues and condition numbers (if requested).
BACKGROUND
If A
is a square matrix, then A = Q T t(Q)
, where
Q
is orthogonal, and T
is upper quasi-triangular
(nearly triangular with either 1 by 1 or 2 by 2 blocks on the
diagonal).
The eigenvalues of A
are the same as those of T
,
which are easy to compute. The Schur form is used most often for
computing non-symmetric eigenvalue decompositions, and for computing
functions of matrices such as matrix exponentials.Details
Based on the Lapack functions dgeesx
and zgeesx
.References
Anderson, E., et al. (1994).
LAPACK User's Guide,
2nd edition, SIAM, Philadelphia.Examples
Run this codeA <- Matrix(rnorm( 9*9, sd = 100), nrow = 9)
schur.A <- schur(A) # schur factorization
mod.eig <- Mod(attr(schur.A, "eigenvalues")) # eigenvalue modulus
schur.A <- schurmod(schur.A) # reordered factorization
Run the code above in your browser using DataLab