SRC/dgeqr2.f(3)

SRC/dgeqr2.f(3) πŸ’…

okay so bestie, welcome to the Library Functions Manual section for SRC/dgeqr2.f β€” yes that's the manual name, we're folding it in right here at the top, you're welcome 🫢. This is a LAPACK page and it's honestly kind of iconic, so let's get into it.


✨ SYNOPSIS ✨

Functions/Subroutines

  • subroutine dgeqr2 (m, n, a, lda, tau, work, info) β€” DGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm. that's the whole vibe, that's the whole function πŸ’–

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

subroutine dgeqr2 (integer m, integer n, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) tau, double precision, dimension( * ) work, integer info)

DGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm. no cap, that's literally what it does ⭐

🌸 Purpose

!>
!> DGEQR2 computes a QR factorization of a real 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.
!>
!>

like, it's giving decomposition. main character energy for real πŸ‘‘


πŸŽ€ Parameters πŸŽ€

  • M β€” M is INTEGER. the number of rows of the matrix A. and listen, M >= 0. always. πŸ™ˆ
!>          M is INTEGER
!>          The number of rows of the matrix A.  M >= 0.
!>
  • N β€” N is INTEGER. the number of columns of the matrix A. and N >= 0 too. same energy πŸ’œ
!>          N is INTEGER
!>          The number of columns of the matrix A.  N >= 0.
!>
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). on entry, it's the m by n matrix A. on exit, the elements on and above the diagonal contain the min(m,n) by n upper trapezoidal matrix R (which, and this is important bestie, is upper triangular if m >= n). the elements below the diagonal, together with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (go look at Further Details for that tea πŸ“).
!>          A is DOUBLE PRECISION 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 orthogonal matrix Q as a
!>          product of elementary reflectors (see Further Details).
!>
  • LDA β€” LDA is INTEGER. the leading dimension of the array A. and it has to be LDA >= max(1,M). not negotiable 😀
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (min(M,N)). the scalar factors of the elementary reflectors (again, Further Details has the lore ✨).
!>          TAU is DOUBLE PRECISION array, dimension (min(M,N))
!>          The scalar factors of the elementary reflectors (see Further
!>          Details).
!>
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (N). that's it, that's the whole description, it's a work array, she's just here to help πŸ’…
!>          WORK is DOUBLE PRECISION array, dimension (N)
!>
  • INFO β€” INFO is INTEGER. the vibe report:
    • = 0: successful exit πŸŽ‰ slay
    • < 0: if INFO = -i, the i-th argument had an illegal value πŸ’€ somebody messed up
!>          INFO is INTEGER
!>          = 0: successful exit
!>          < 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.

a whole squad fr fr 🫢


πŸ”₯ 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**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:m) is stored on exit in A(i+1:m,i),
!>  and tau in TAU(i).
!>

so Q is like a whole chain of elementary reflectors multiplied together, k = min(m,n) of them, and each H(i) is I - tau * v * v**T. tau is a real scalar, v is a real vector where v(1:i-1) = 0 and v(i) = 1, and β€” key detail β€” v(i+1:m) gets stored on exit in A(i+1:m,i), with tau chilling in TAU(i). iykyk 🧚


Definition at line 129 of file dgeqr2.f. πŸ“ that's where she lives.

⭐ Author ⭐

Generated automatically by Doxygen for LAPACK from the source code. not a human, a robot, and honestly it ate πŸ€–πŸ’–


and that's the page bestie!! written for LAPACK, Version 3.12.0, dated, and filed under SRC/dgeqr2.f(3) β€” go forth and factorize your QR, you've got this πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from