Matrix Q Generation from LQ Factorization#

UNGLQ (UNitary matrix Generation after LQ factorization) explicitly generates the unitary matrix Q from the LQ factorization GELQF. Recall that the LQ factorization of a M x N matrix A is given by:

\[A = L * Q\]

where L is an (M x M) lower triangular matrix, and Q is an (M x N) unitary matrix with orthonormal rows, defined as the first M rows of a produce of K Householder reflectors H of order N:

\[ \begin{align}\begin{aligned}Q &= H(K - 1) * . . . * H(1) * H(0)\\H(i) &= I - tau[i] * v * v^H\end{aligned}\end{align} \]

Function LQ Factorization does not explicitly form Q. The elements below the diagonal of A, i.e., the vectors v, with the array tau, represent the matrix Q as a product of a sequence of K Householder reflectors.

Function unglq explicitly forms Q as a (M x N) unitary matrix, where N >= M >= K is required.

cuSolverDx unglq device functions are (see Execution Methods):

__device__ void execute(data_type* A, const data_type* tau);
// with runtime leading dimensions
__device__ void execute(data_type* A, const unsigned int lda, const data_type* tau);

A is a batched M x N matrix coming from the output of GELQF, with leading dimension lda >= M if A is in column-major layout, or lda >= N if A is row-major. The lower triangular part of A contains the vectors v that define the elementary Householder reflectors.

Array tau is an input array of size K for each batch, coming from the output of GELQF.

After the function returns, A is overwritten with the matrix Q (M x N).

The functions support:

  1. A being either column- or row-major memory layout, see Arrangement Operator,

  2. Matrix A dimension N >= M >= K is required.