| gsvd {geigen} | R Documentation |
Generalized Singular Value Decomposition
Description
Computes the generalized singular value decomposition of a pair of matrices.
Usage
gsvd(A,B)
Arguments
A |
a matrix with |
B |
a matrix with |
Details
The matrix A is a m-by-n matrix and the matrix B is a p-by-n matrix.
This function decomposes both matrices; if either one is complex than the other matrix
is coerced to be complex.
The Generalized Singular Value Decomposition of numeric matrices A and B
is given as
A = U D_1 [0\, R] Q^T
and
B = V D_2 [0\, R] Q^T
where
Uan
m\times morthogonal matrix.Va
p\times porthogonal matrix.Qan
n\times northogonal matrix.Ran
r-by-rupper triangular non singular matrix and the matrix[0\, R]is anr-by-nmatrix. The quantityris the rank of the matrix\left( \begin{array}{c} A \\B \end{array} \right)withr \le n.D_1,D_2are quasi diagonal matrices and nonnegative and satisfy
D_1^T D_1 + D_2^T D_2 = I.D_1is anm-by-rmatrix andD_2is ap-by-rmatrix.
The Generalized Singular Value Decomposition of complex matrices A and B
is given as
A = U D_1 [0\, R] Q^H
and
B = V D_2 [0\, R] Q^H
where
Uan
m\times munitary matrix.Va
p\times punitary matrix.Qan
n\times nunitary matrix.Ran
r-by-rupper triangular non singular matrix and the matrix[0\, R]is anr-by-nmatrix. The quantityris the rank of the matrix\left( \begin{array}{c} A \\B \end{array} \right)withr \le n.D_1,D_2are quasi diagonal matrices and nonnegative and satisfy
D_1^T D_1 + D_2^T D_2 = I.D_1is anm-by-rmatrix andD_2is ap-by-rmatrix.
For details on this decomposition and the structure of the matrices D_1 and D_2
see http://www.netlib.org/lapack/lug/node36.html.
Value
The return value is a list containing the following components
Athe upper triangular matrix or a part of
R.Blower part of the triangular matrix
Rifk+l>m(see below).mnumber of rows of
A.kr{-}l. The number of rows of the matrixRisk{+}l. The firstkgeneralized singular values are infinite.leffective rank of the input matrix
B. The number of finite generalized singular values after the firstkinfinite ones.alphaa numeric vector with length
ncontaining the numerators of the generalized singular values in the first(k{+}l)entries.betaa numeric vector with length
ncontaining the denominators of the generalized singular value in the first(k{+}l)entries.Uthe matrix
U.Vthe matrix
V.Qthe matrix
Q.
For a detailed description of these items see http://www.netlib.org/lapack/lug/node36.html. Auxiliary functions are provided for extraction and manipulation of the various items.
Source
gsvd uses the LAPACK routines DGGSVD3 and ZGGSVD3 from Lapack 3.8.0.
LAPACK is from http://www.netlib.org/lapack.
The decomposition is fully explained in http://www.netlib.org/lapack/lug/node36.html.
References
Anderson. E. and ten others (1999)
LAPACK Users' Guide. Third Edition. SIAM.
Available on-line at
http://www.netlib.org/lapack/lug/lapack_lug.html.
See the section Generalized Eigenvalue and Singular Value Problems
(http://www.netlib.org/lapack/lug/node33.html) and
the section Generalized Singular Value Decomposition (GSVD)
(http://www.netlib.org/lapack/lug/node36.html).
See Also
Examples
A <- matrix(c(1,2,3,3,2,1,4,5,6,7,8,8), nrow=2, byrow=TRUE)
B <- matrix(1:18,byrow=TRUE, ncol=6)
A
B
z <- gsvd(A,B)
z