Contents

# ?ggsvd

Computes the generalized singular value decomposition of a pair of general rectangular matrices (deprecated).

## Syntax

Include Files
• mkl.h
Description
This routine is deprecated; use
ggsvd3
.
The routine computes the generalized singular value decomposition (GSVD) of an
m
-by-
n
real/complex matrix
A
and
p
-by-
n
real/complex matrix
B
:
U'
*
A
*
Q
=
D
1
*(0
R
)
,
V'
*
B
*
Q
=
D
2
*(0
R
)
,
where
U
,
V
and
Q
are orthogonal/unitary matrices and
U'
,
V'
mean transpose/conjugate transpose of
U
and
V
respectively.
Let
k
+
l
= the effective numerical rank of the matrix (
A'
,
B'
)', then
R
is a (
k
+
l
)-by-(
k
+
l
) nonsingular upper triangular matrix,
D
1
and
D
2
are
m
-by-(
k
+
l
) and
p
-by-(
k
+
l
) "diagonal" matrices and of the following structures, respectively:
If
m
-
k
-l
0,   where
C
= diag(
alpha
[
k
],...,
alpha
[
k
+
l
- 1]
)
S
= diag(
beta
[
k
],...,
beta
[
k
+
l
- 1]
)
C
2
+
S
2
= I
Nonzero element
r
i j
(1
i
j
k
+
l
) of
R
is stored in
a
[(
i
- 1) + (
n
-
k
-
l
+
j
- 1)*
lda
]
for column major layout and in
a
[(
i
- 1)*
lda
+ (
n
-
k
-
l
+
j
- 1)]
for row major layout.
If
m
-
k
-l
< 0
,   where
C
= diag(
alpha
[
k
],...,
alpha
(
m
)
)
,
S
= diag(
beta
[
k
],...,
beta
[
m
- 1]
)
,
C
2
+
S
2
= I
On exit, the location of nonzero element
r
i j
(1
i
j
k
+
l
) of
R
depends on the value of
i
. For
i
m
this element is stored in
a
[(
i
- 1) + (
n
-
k
-
l
+
j
- 1)*
lda
]
for column major layout and in
a
[(
i
- 1)*
lda
+ (
n
-
k
-
l
+
j
- 1)]
for row major layout. For
m
<
i
k
+
l
it is stored in
b
[(
i
-
k
- 1) + (
n
-
k
-
l
+
j
- 1)*
ldb
]
for column major layout and in
b
[(
i
-
k
- 1)*
ldb
+ (
n
-
k
-
l
+
j
- 1)]
for row major layout.
The routine computes
C
,
S
,
R
, and optionally the orthogonal/unitary transformation matrices
U
,
V
and
Q
.
In particular, if
B
is an
n
-by-
n
nonsingular matrix, then the GSVD of
A
and
B
implicitly gives the SVD of
A
*
B
-1
:
A
*
B
-1
=
U
*(
D
1
*
D
2
-1
)*
V'
.
If (
A
',
B
')' has orthonormal columns, then the GSVD of
A
and
B
is also equal to the CS decomposition of
A
and
B
. Furthermore, the GSVD can be used to derive the solution of the eigenvalue problem:
A'
*
*A
*
x
=
λ
*
B'
*
B
*
x
.
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
jobu
Must be
'U'
or
'N'
.
If
jobu
=
'U'
, orthogonal/unitary matrix
U
is computed.
If
jobu
=
'N'
,
U
is not computed.
jobv
Must be
'V'
or
'N'
.
If
jobv
=
'V'
, orthogonal/unitary matrix
V
is computed.
If
jobv
=
'N'
,
V
is not computed.
jobq
Must be
'Q'
or
'N'
.
If
jobq
=
'Q'
, orthogonal/unitary matrix
Q
is computed.
If
jobq
=
'N'
,
Q
is not computed.
m
The number of rows of the matrix
A
(
m
0
).
n
The number of columns of the matrices
A
and
B
(
n
0
).
p
The number of rows of the matrix
B
(
p
0
).
a
,
b
Arrays:
a
(size at least max(1,
lda
*
n
) for column major layout and max(1,
lda
*
m
) for row major layout)
contains the
m
-by-
n
matrix
A
.
b
(size at least max(1,
ldb
*
n
) for column major layout and max(1,
ldb
*
p
) for row major layout)
contains the
p
-by-
n
matrix
B
.
lda
a
; at least max(1,
m
)
for column major layout and max(1,
n
) for row major layout
.
ldb
b
; at least max(1,
p
)
for column major layout and max(1,
n
) for row major layout
.
ldu
The leading dimension of the array
u
.
ldu
max
(1,
m
) if
jobu
=
'U'
;
ldu
1
otherwise.
ldv
The leading dimension of the array
v
.
ldv
max
(1,
p
) if
jobv
=
'V'
;
ldv
1
otherwise.
ldq
The leading dimension of the array
q
.
ldq
max
(1,
n
) if
jobq
=
'Q'
;
ldq
1
otherwise.
Output Parameters
k
,
l
On exit,
k
and
l
specify the dimension of the subblocks. The sum
k
+l
is equal to the effective numerical rank of (
A'
,
B'
)'.
a
On exit,
a
contains the triangular matrix
R
or part of
R
.
b
On exit,
b
contains part of the triangular matrix R if
m
-
k
-
l
< 0
.
alpha
,
beta
Arrays, size at least max(1,
n
) each.
Contain the generalized singular value pairs of
A
and
B
:
alpha
(1:
k
) = 1
,
beta
(1:
k
) = 0
,
and if
m
-
k
-
l
0
,
alpha