| Schur-methods | R Documentation |
Computes the Schur factorization of an n \times n
real matrix A, which has the general form
A = Q T Q'
where
Q is an orthogonal matrix and
T is a block upper triangular matrix with
1 \times 1 and 2 \times 2 diagonal blocks
specifying the real and complex conjugate eigenvalues of A.
The column vectors of Q are the Schur vectors of A,
and T is the Schur form of A.
Methods are built on LAPACK routine dgees.
Schur(x, vectors = TRUE, ...)
x |
a finite square matrix or
|
vectors |
a logical. If |
... |
further arguments passed to or from methods. |
An object representing the factorization, inheriting
from virtual class SchurFactorization.
Currently, the specific class is always Schur.
The LAPACK source code, including documentation; see https://netlib.org/lapack/double/dgees.f.
Golub, G. H., & Van Loan, C. F. (2013). Matrix computations (4th ed.). Johns Hopkins University Press. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.56021/9781421407944")}
Class Schur and its methods.
Class dgeMatrix.
Generic functions expand1 and expand2,
for constructing matrix factors from the result.
Generic functions Cholesky, BunchKaufman,
lu, and qr,
for computing other factorizations.
showMethods("Schur", inherited = FALSE)
set.seed(0)
Schur(Hilbert(9L)) # real eigenvalues
n <- 5L
(A <- Matrix(round(rnorm(n * n, sd = 100)), n, n))
(sch.A <- Schur(A)) # complex eigenvalues
## A ~ Q T Q' in floating point
str(e.sch.A <- expand2(sch.A), max.level = 2L)
stopifnot(all.equal(A, Reduce(`%*%`, e.sch.A)))
(e1 <- eigen(matrix(sch.A@x, n, n), only.values = TRUE)$values)
(e2 <- eigen( A , only.values = TRUE)$values)
(e3 <- sch.A@values)
stopifnot(exprs = {
all.equal(e1, e2, tolerance = 1e-13)
all.equal(e1, e3[order(Mod(e3), decreasing = TRUE)], tolerance = 1e-13)
identical(Schur(A, vectors = FALSE),
`slot<-`(sch.A, "vectors", TRUE, double(0L)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.