denseSchur-class | R Documentation |
Schur
is the class of Schur factorizations of
n \times n
real matrices A
,
having 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
or 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
.
The Schur factorization generalizes the spectral decomposition
of normal matrices A
, whose Schur form is block diagonal,
to arbitrary square matrices.
The matrix A
and its Schur form T
are similar
and thus have the same spectrum. The eigenvalues are computed
trivially as the eigenvalues of the diagonal blocks of T
.
Dim
, Dimnames
inherited from virtual class
MatrixFactorization
.
x
a numeric vector of length prod(Dim)
storing the entries of T
in column-major order.
x
of length 0 is value and indicates that
T
is diagonal with diagonal entries given by values
.
vectors
a numeric vector of length prod(Dim)
storing the entries of Q
in column-major order.
vectors
of length 0 is valid and indicates that
the factorization was computed without the Schur vectors.
values
a numeric or complex vector of length Dim[1]
storing the eigenvalues of the diagonal blocks of T
,
which are the eigenvalues of T
and consequently of the
factorized matrix A
.
Class SchurFactorization
, directly.
Class MatrixFactorization
, by class
SchurFactorization
, distance 2.
Objects can be generated directly by calls of the form
new("Schur", ...)
, but they are more typically obtained
as the value of Schur(x)
for x
inheriting from
Matrix
(often dgeMatrix
).
determinant
signature(x = "Schur", logarithm = "logical")
:
computes the determinant of the factorized matrix A
or its logarithm.
expand1
signature(x = "Schur")
:
see expand1-methods
.
expand2
signature(x = "Schur")
:
see expand2-methods
.
solve
signature(a = "Schur", b = .)
:
see solve-methods
.
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 dgeMatrix
.
Generic functions Schur
,
expand1
and expand2
.
showClass("denseSchur")
set.seed(0)
n <- 4L
(A <- Matrix(rnorm(n * n), n, n))
## With dimnames, to see that they are propagated :
dimnames(A) <- list(paste0("r", seq_len(n)),
paste0("c", seq_len(n)))
(sch.A <- Schur(A))
str(e.sch.A <- expand2(sch.A), max.level = 2L)
## A ~ Q T Q' in floating point
stopifnot(exprs = {
identical(names(e.sch.A), c("Q", "T", "Q."))
all.equal(A, with(e.sch.A, Q %*% T %*% Q.))
})
## Factorization handled as factorized matrix
b <- rnorm(n)
stopifnot(all.equal(det(A), det(sch.A)),
all.equal(solve(A, b), solve(sch.A, b)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.