SRC/zgeqrf.f(3)

πŸ’… NAME πŸ’…

SRC/zgeqrf.f β€” bestie, this is the LAPACK page for zgeqrf, the routine that does QR factorization on a complex matrix and hands you back the goods. It's giving linear algebra main character, fr fr. ✨

Quick vibe check before we dive in: this page lives in the Library Functions Manual, so you already know it's part of something big. 🫢


✨ SYNOPSIS ✨

πŸŽ€ Functions/Subroutines πŸŽ€

  • subroutine zgeqrf (m, n, a, lda, tau, work, lwork, info) β€” the one and only ZGEQRF πŸ”₯

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

⭐ the signature, no cap ⭐

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

ZGEQRF β€” literally the whole point of this page. πŸ’–

🌸 Purpose 🌸

Ok so here's the tea, bestie: ZGEQRF computes a QR factorization of a complex M-by-N matrix A:

A = Q * ( R ),
         ( 0 )

where:

  • Q is a M-by-M orthogonal matrix;
  • R is an upper-triangular N-by-N matrix;
  • 0 is a (M-N)-by-N zero matrix, if M > N.

That's it. That's the whole errand. Obsessed. πŸ’…


🌈 Parameters 🌈

Every single one, in order, because we do not skip. Periodt.

  • M β€” M is INTEGER. The number of rows of the matrix A. Must be M >= 0. πŸ‘‘
  • N β€” N is INTEGER. The number of columns of the matrix A. Must be N >= 0. ✨
  • A β€” A is COMPLEX*16 array, dimension (LDA,N).
    • On entry, the M-by-N matrix A.
    • On exit, the elements on and above the diagonal of the array contain the min(M,N)-by-N upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array TAU, represent the unitary matrix Q as a product of min(m,n) elementary reflectors (see Further Details).
    • Not me saying "on entry vs on exit" like it's a glow-up transformation 😭 β€” but genuinely, A comes in as your matrix and leaves as R + the reflector stash.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. Must be LDA >= max(1,M). πŸŽ€
  • TAU β€” TAU is COMPLEX*16 array, dimension (min(M,N)). The scalar factors of the elementary reflectors (see Further Details). πŸ“
  • WORK β€” WORK is COMPLEX*16 array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. 🌸
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK.
    • Must be LWORK >= 1 if MIN(M,N) = 0, and LWORK >= N otherwise.
    • For optimum performance LWORK >= N*NB, where NB is the optimal blocksize. (Yes bestie, we love a performance queen. πŸ’…)
    • If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. It's giving "just asking, not committing" energy. πŸ™ˆ
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value πŸ’€
Heads up: those INFO values are literally what the routine reports, so if you get a negative one, go look at that exact argument number. No coping your way out of it. 😭

πŸ‘‘ Author πŸ‘‘

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

Shoutout to the whole squad that wrote this. 🫢


🧚 Further Details 🧚

The matrix Q is represented as a product of elementary reflectors:

Q = H(1) H(2) . . . H(k), 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; v(i+1:m) is stored on exit in A(i+1:m,i), and tau in TAU(i).

That's the whole storage scheme β€” v below the diagonal in A, scalars in TAU. Iykyk. ✨


🌟 Definition 🌟

Definition at line 145 of file zgeqrf.f. πŸ“

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code.


Ok that's the whole page bestie, you ate that. Go factor some matrices. πŸ’…βœ¨

Big cute sign-off: this masterpiece came from LAPACK Version 3.12.0, and the file in question is SRC/zgeqrf.f(3). Screenshot it, cite it, frame it. πŸŽ€πŸ’–

πŸ“¦ where this page comes from