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 -by-
matrix and the matrix B is a
-by-
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 and
is given as
and
where
an
orthogonal matrix.
a
orthogonal matrix.
an
orthogonal matrix.
an
-by-
upper triangular non singular matrix and the matrix
is an
-by-
matrix. The quantity
is the rank of the matrix
with
.
,
are quasi diagonal matrices and nonnegative and satisfy
.
is an
-by-
matrix and
is a
-by-
matrix.
The Generalized Singular Value Decomposition of complex matrices and
is given as
and
where
an
unitary matrix.
a
unitary matrix.
an
unitary matrix.
an
-by-
upper triangular non singular matrix and the matrix
is an
-by-
matrix. The quantity
is the rank of the matrix
with
.
,
are quasi diagonal matrices and nonnegative and satisfy
.
is an
-by-
matrix and
is a
-by-
matrix.
For details on this decomposition and the structure of the matrices and
see http://www.netlib.org/lapack/lug/node36.html.
Value
The return value is a list containing the following components
A
the upper triangular matrix or a part of
.
B
lower part of the triangular matrix
if
(see below).
m
number of rows of
.
k
. The number of rows of the matrix
is
. The first
generalized singular values are infinite.
l
effective rank of the input matrix
. The number of finite generalized singular values after the first
infinite ones.
alpha
a numeric vector with length
containing the numerators of the generalized singular values in the first
entries.
beta
a numeric vector with length
containing the denominators of the generalized singular value in the first
entries.
U
the matrix
.
V
the matrix
.
Q
the matrix
.
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