Skip to contents

Get the orthogonal projector associated with an eigenspace based on the representation of a Hermitian Matrix given by class spectral.

Usage

# S3 method for spectral
get_eigproj(object, id, ...)

Arguments

object

an instance of class spectral.

id

index for the desired eigenspace according to the ordered (decreasing) spectra.

...

further arguments passed to or from other methods.

Value

The orthogonal projector of the desired eigenspace.

A Hermitian matrix S admits the spectral decomposition \(S = \sum_{r}\lambda_r E_r\)

such that \(E_r\) is the orthogonal projector onto the \(\lambda_r\)-eigenspace. If \(V_{id}\)

is the matrix associated to the eigenspace, then

$$E_{id} = V_{id}V_{id}^*$$

Examples

# Spectra is {2, -1} with multiplicities one and two respectively.
decomp <- spectral(matrix(c(0,1,1,1,0,1,1,1,0), nrow=3))

# Returns the projector associated to the eigenvalue -1.
get_eigproj(decomp, id=2)
#>            [,1]       [,2]       [,3]
#> [1,]  0.6666667 -0.3333333 -0.3333333
#> [2,] -0.3333333  0.6666667 -0.3333333
#> [3,] -0.3333333 -0.3333333  0.6666667

# Returns the projector associated to the eigenvalue 2.
get_eigproj(decomp, id=1)
#>           [,1]      [,2]      [,3]
#> [1,] 0.3333333 0.3333333 0.3333333
#> [2,] 0.3333333 0.3333333 0.3333333
#> [3,] 0.3333333 0.3333333 0.3333333