SRC/zgelq2.f(3)

πŸ’… SRC/zgelq2.f β€” like, the LAPACK manual page bestie

okay so this is a Library Functions Manual page for SRC/zgelq2.f, and honestly? it's giving "small but mighty" πŸ¦‹ because this one little subroutine is out here doing full LQ factorizations with zero blocking, no cap.


✨ NAME ✨

SRC/zgelq2.f β€” that's literally it, that's the name, she's lowkey mysterious like that πŸ’œ


πŸŽ€ SYNOPSIS πŸŽ€

Functions/Subroutines

  • subroutine zgelq2 (m, n, a, lda, tau, work, info) β€” and per the docs, ZGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm. slay πŸ’…

πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine zgelq2 (integer m, integer n, complex*16, dimension( lda, * ) a,
    integer lda, complex*16, dimension( * ) tau, complex*16, dimension( * )
    work, integer info)

ZGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm. periodt, that's the whole vibe ✨

🌸 Purpose

fr fr, here's what she does:

!>
!> ZGELQ2 computes an LQ factorization of a complex m-by-n matrix A:
!>
!>    A = ( L 0 ) *  Q
!>
!> where:
!>
!>    Q is a n-by-n orthogonal matrix;
!>    L is a lower-triangular m-by-m matrix;
!>    0 is a m-by-(n-m) zero matrix, if m < n.
!>
!>

so you hand her a matrix, she hands you back an L and a Q, and the zero block only shows up when m < n. iykyk 🧚


πŸ¦‹ Parameters πŸ¦‹

  • M β€” M is INTEGER, and M is the number of rows of the matrix A. M >= 0. yes bestie, zero or more, no negatives allowed πŸ™ˆ
  • N β€” N is INTEGER, the number of columns of the matrix A. N >= 0. same rule, keep it non-negative πŸ’–
  • A β€” A is COMPLEX*16 array, dimension (LDA,N). On entry: the m by n matrix A. On exit: the elements on and below the diagonal of the array contain the m by min(m,n) lower trapezoidal matrix L (and L is lower triangular if m <= n); the elements above the diagonal, together with the array TAU, represent the unitary matrix Q as a product of elementary reflectors (see Further Details below, don't worry, we get there 🌈).
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,M). respect the leading dimension or she WILL be upset πŸ’€
  • TAU β€” TAU is COMPLEX*16 array, dimension (min(M,N)). the scalar factors of the elementary reflectors (again: see Further Details ✨).
  • WORK β€” WORK is COMPLEX*16 array, dimension (M). that's her little workspace, she needs room to think πŸŽ€
  • INFO β€” INFO is INTEGER, and here's the scoreboard:
    • = 0: successful exit, we love a happy ending πŸ₯³
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭

πŸ’œ Author πŸ’œ

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

academic royalty honestly πŸ‘‘


⭐ Further Details: ⭐

okay this is the part where she gets a lil technical, but stick with me bestie:

!>
!>  The matrix Q is represented as a product of elementary reflectors
!>
!>     Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
!>
!>  Each H(i) has the form
!>
!>     H(i) = I - tau * v * v**H
!>
!>  where tau is a complex scalar, and v is a complex vector with
!>  v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
!>  A(i,i+1:n), and tau in TAU(i).
!>

the way that Q is just a whole product of reflectors H(k)**H . . . H(2)**H H(1)**H with k = min(m,n)... she's built different πŸ”₯ and each H(i) is I - tau * v * v**H, where tau is a complex scalar and v is a complex vector with v(1:i-1) = 0 and v(i) = 1. then conjg(v(i+1:n)) gets stored on exit in A(i,i+1:n), and tau in TAU(i). that's the tea β˜•πŸŒΈ


🫢 Definition at line 128 of file zgelq2.f. 🫢

heads up bestie: this page was Generated automatically by Doxygen for LAPACK from the source code. so if anything looks weird, blame the robot, not me πŸ™ˆ

and that's the whole page! πŸ’– cute lil sign-off: this beaut is LAPACK, Version 3.12.0, from SRC/zgelq2.f(3) β€” go forth and factorize, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from