GELQ2 - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void gelq2(integer *m, integer *n, T *a, integer *lda, T *tau, T *work, integer *info)#

LQ factorization of a real m-by-n matrix a.

Purpose:

    LQ factorization of a real m-by-n matrix a
    The factorization has the form
    A = Q * R

Further Details

                  The matrix Q is represented as a product of elementary reflectors
                  Q = H(k) . . . H(2) H(1), where k = min(m,n).

                  Each H(i) has the form
                  H(i) = I - tau * V * V**T

                  where tau is a real scalar, and V is a real vector with V(1:i-1) = 0 and V(i) =
1; V(i+1:N) is stored on exit in A(i,i+1:N), and tau in tau(i).
Parameters:
  • m[in]

    m is integer*

    The number of rows of the matrix a. m >= 0.

  • n[in]

    n is integer*

    The number of columns of the matrix a. n >= 0.

  • a[inout]

    a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)

    On entry, the m-by-n matrix.

    On exit, the elements on and below the diagonal of the array contain the m by min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details).
  • lda[in]

    lda is integer*

    The leading dimension of the matrix a, lda >= fla_max(1,m)

  • tau[out]

    tau is float/double/COMPLEX/COMPLEX*16 array, dimension (min(m,n))

    The scalar factors of the elementary reflectors (see Further Details).

  • WORK[out] WORK is COMPLEX array, dimension (M)

  • INFO[out]

    INFO is INTEGER

    = 0: successful exit

    < 0: if INFO = -i, the i-th argument had an illegal value