# Generalized Singular Value Decomposition

This topic describes LAPACK computational routines used for finding the generalized singular value decomposition (GSVD) of two matrices A and B as

`UHAQ = D1*(0 R)`,

`VHBQ = D2*(0 R)`,

where U, V, and Q are orthogonal/unitary matrices, R is a nonsingular upper triangular matrix, and D1, D2 are “diagonal” matrices of the structure detailed in the routines description section.

Table “Computational Routines for Generalized Singular Value Decomposition” lists LAPACK routines (Fortran 77 interface) that perform generalized singular value decomposition of matrices. Respective routine names in Fortran 95 interface are without the first symbol (see Routine Naming Conventions).

Computational Routines for Generalized Singular Value Decomposition
Routine name | Operation performed
--- | ---
?ggsvp | Computes the preprocessing decomposition for the generalized SVD
?tgsja | Computes the generalized SVD of two upper triangular or trapezoidal matrices

You can use routines listed in the above table as well as the driver routine ?ggsvd to find the GSVD of a pair of general rectangular matrices.