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.

Slots

Dim, Dimnames

inherited from virtual class MatrixFactorization.

Q

an orthogonal matrix, inheriting from virtual class Matrix.

T

a block upper triangular matrix, inheriting from virtual class Matrix. The diagonal blocks have dimensions 1-by-1 or 2-by-2.

EValues

a numeric or complex vector containing the eigenvalues of the diagonal blocks of T, which are the eigenvalues of T and consequently of the factorized matrix.

Extends

Class SchurFactorization, directly. Class MatrixFactorization, by class SchurFactorization, distance 2.

Instantiation

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).

Methods

determinant

signature(from = "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.

Details

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\).

See also

Class dgeMatrix.

Generic functions Schur, expand1 and expand2.

References

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. doi:10.56021/9781421407944

Examples

showClass("Schur")
#> Class "Schur" [package "Matrix"]
#> 
#> Slots:
#>                                                    
#> Name:         Q        T  EValues      Dim Dimnames
#> Class:   Matrix   Matrix   vector  integer     list
#> 
#> Extends: 
#> Class "SchurFactorization", directly
#> Class "MatrixFactorization", by class "SchurFactorization", distance 2
set.seed(0)

n <- 4L
(A <- Matrix(rnorm(n * n), n, n))
#> 4 x 4 Matrix of class "dgeMatrix"
#>            [,1]       [,2]         [,3]       [,4]
#> [1,]  1.2629543  0.4146414 -0.005767173 -1.1476570
#> [2,] -0.3262334 -1.5399500  2.404653389 -0.2894616
#> [3,]  1.3297993 -0.9285670  0.763593461 -0.2992151
#> [4,]  1.2724293 -0.2947204 -0.799009249 -0.4115108

## 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))
#> Schur factorization of Formal class 'Schur' [package "Matrix"] with 5 slots
#>   ..@ Q       :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
#>   .. .. ..@ Dim     : int [1:2] 4 4
#>   .. .. ..@ Dimnames:List of 2
#>   .. .. .. ..$ : NULL
#>   .. .. .. ..$ : NULL
#>   .. .. ..@ x       : num [1:16] -0.6269 -0.4428 -0.6348 -0.0889 -0.5919 ...
#>   .. .. ..@ factors : list()
#>   ..@ T       :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
#>   .. .. ..@ Dim     : int [1:2] 4 4
#>   .. .. ..@ Dimnames:List of 2
#>   .. .. .. ..$ : NULL
#>   .. .. .. ..$ : NULL
#>   .. .. ..@ x       : num [1:16] 1.387 0 0 0 0.996 ...
#>   .. .. ..@ factors : list()
#>   ..@ EValues : cplx [1:4] 1.387+0i -0.312+1.56i -0.312-1.56i ...
#>   ..@ Dim     : int [1:2] 4 4
#>   ..@ Dimnames:List of 2
#>   .. ..$ : chr [1:4] "r1" "r2" "r3" "r4"
#>   .. ..$ : chr [1:4] "c1" "c2" "c3" "c4"
str(e.sch.A <- expand2(sch.A), max.level = 2L)
#> List of 3
#>  $ Q :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
#>  $ T :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
#>  $ Q.:Formal class 'dgeMatrix' [package "Matrix"] with 4 slots

## 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)))

## One of the non-general cases:
Schur(Diagonal(6L))
#> Schur factorization of Formal class 'Schur' [package "Matrix"] with 5 slots
#>   ..@ Q       :Formal class 'ddiMatrix' [package "Matrix"] with 4 slots
#>   .. .. ..@ diag    : chr "U"
#>   .. .. ..@ Dim     : int [1:2] 6 6
#>   .. .. ..@ Dimnames:List of 2
#>   .. .. .. ..$ : NULL
#>   .. .. .. ..$ : NULL
#>   .. .. ..@ x       : num(0) 
#>   ..@ T       :Formal class 'ddiMatrix' [package "Matrix"] with 4 slots
#>   .. .. ..@ diag    : chr "U"
#>   .. .. ..@ Dim     : int [1:2] 6 6
#>   .. .. ..@ Dimnames:List of 2
#>   .. .. .. ..$ : NULL
#>   .. .. .. ..$ : NULL
#>   .. .. ..@ x       : num(0) 
#>   ..@ EValues : num [1:6] 1 1 1 1 1 1
#>   ..@ Dim     : int [1:2] 6 6
#>   ..@ Dimnames:List of 2
#>   .. ..$ : NULL
#>   .. ..$ : NULL