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:
Qis a M-by-M orthogonal matrix;Ris an upper-triangular N-by-N matrix;0is 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βMisINTEGER. The number of rows of the matrixA. Must beM >= 0. πNβNisINTEGER. The number of columns of the matrixA. Must beN >= 0. β¨AβAisCOMPLEX*16array, 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 matrixR(Ris upper triangular ifm >= n); the elements below the diagonal, with the arrayTAU, represent the unitary matrixQas a product ofmin(m,n)elementary reflectors (see Further Details). - Not me saying "on entry vs on exit" like it's a glow-up transformation π β but genuinely,
Acomes in as your matrix and leaves asR+ the reflector stash.
- On entry, the M-by-N matrix
LDAβLDAisINTEGER. The leading dimension of the arrayA. Must beLDA >= max(1,M). πTAUβTAUisCOMPLEX*16array, dimension(min(M,N)). The scalar factors of the elementary reflectors (see Further Details). πWORKβWORKisCOMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πΈLWORKβLWORKisINTEGER. The dimension of the arrayWORK.- Must be
LWORK >= 1ifMIN(M,N) = 0, andLWORK >= Notherwise. - For optimum performance
LWORK >= N*NB, whereNBis 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 theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. It's giving "just asking, not committing" energy. π
- Must be
INFOβINFOisINTEGER.= 0: successful exit π< 0: ifINFO = -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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms