Geigen {lazy.mat}R Documentation

Generalized Eigen Problem of the Form
A P = B P Lambda
where t(P) B P = I.

Description

Generalized Eigen Problem of the Form
A P = B P Lambda
where t(P) B P = I.

Usage

Geigen(A, B = diag(nrow(A)), ndim = nrow(A), check = 0)

Arguments

A

the input symmetric matrix of size n

B

the input symmetric matrix of size n

ndim

# of eigen values/vectors to return.

check

= 1 to check if A P - B P Lambda = 0.

Details

The eigen decomposition of B^{-1/2} A B^{-1/2} is used.

Value

A list of
values The ndim largest eigen values.
vectors The n x ndim matrix of the eigen vectors.
tPBP The value of t(P) B P
tPAP The value of t(P) A P
maxad max(abs(A P - B P Lambda))

Examples

n=5
set.seed(1701)
A <- matrix(rnorm(n^2), n,n)
A <- t(A)%*%A
B <-  matrix(rnorm(n^2), n,n)
B <- t(B)%*%B
Geigen(A,B, check=1)


[Package lazy.mat version 0.1.4 Index]