SRC/sgeqrt2.f(3)

🌸 SRC/sgeqrt2.f β€” bestie, let me introduce you to the QR glow-up function 🌸

Okay so like, this is the manual page for SRC/sgeqrt2.f, part of the LAPACK Library Functions Manual, and it's literally the blueprint for sgeqrt2 β€” a subroutine that does QR factorization using the compact WY representation of Q. It's giving linear algebra main character energy and I'm obsessed. Let me walk you through it, no cap. πŸ’…


✨ SYNOPSIS ✨

Functions/Subroutines

subroutine sgeqrt2 (m, n, a, lda, t, ldt, info)

SGEQRT2 computes a QR factorization of a general real or complex matrix using the compact WY representation of Q. Periodt. πŸ”₯


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

subroutine sgeqrt2 (integer m, integer n, real, dimension( lda, * ) a,
    integer lda, real, dimension( ldt, * ) t, integer ldt, integer info)

SGEQRT2 computes a QR factorization of a general real or complex matrix using the compact WY representation of Q. Yes bestie, that's the whole vibe.

πŸŽ€ Purpose πŸŽ€

!> !> SGEQRT2 computes a QR factorization of a real M-by-N matrix A, !> using the compact WY representation of Q. !>

Like, it takes a real M-by-N matrix A and factorizes it into Q and R, but it stores Q in that iconic compact WY form instead of building the whole thing. Efficiency slay. πŸ’–


πŸ’œ Parameters πŸ’œ

  • M β€” M is INTEGER. The number of rows of the matrix A. Constraint: M >= N. Gotta have at least as many rows as columns, bestie, that's the rule. ✨
  • N β€” N is INTEGER. The number of columns of the matrix A. Constraint: N >= 0. Zero columns is valid, but like, why would you? πŸ™ˆ
  • A β€” A is REAL array, dimension (LDA,N). On entry, this is the real M-by-N matrix A. On exit, the elements on and above the diagonal contain the N-by-N upper triangular matrix R; the elements below the diagonal are the columns of V. See below for further details β€” and bestie, the details are juicy. πŸ“
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. Constraint: LDA >= max(1,M). Don't skimp on this or the compiler will literally come for you. πŸ’€
  • T β€” T is REAL array, dimension (LDT,N). The N-by-N upper triangular factor of the block reflector. The elements on and above the diagonal contain the block reflector T; the elements below the diagonal are not used. Like, they're just vibing there, ignored. πŸ’…
  • LDT β€” LDT is INTEGER. The leading dimension of the array T. Constraint: LDT >= max(1,N). Same energy as LDA β€” respect the leading dimension. πŸ‘‘
  • INFO β€” INFO is INTEGER. Exit status, and it's giving binary icon:
    • = 0: successful exit, slay! βœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value. Not me crying over a negative info code. 😭

🌈 Author 🌈

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

The whole academic dream team wrote this. Icons only. 🫢


⭐ Further Details ⭐

!> !> The matrix V stores the elementary reflectors H(i) in the i-th column !> below the diagonal. For example, if M=5 and N=3, the matrix V is !> !> V = ( 1 ) !> ( v1 1 ) !> ( v1 v2 1 ) !> ( v1 v2 v3 ) !> ( v1 v2 v3 ) !> !> where the vi's represent the vectors which define H(i), which are returned !> in the matrix A. The 1's along the diagonal of V are not stored in A. The !> block reflector H is then given by !> !> H = I - V * T * V**T !> !> where V**T is the transpose of V. !>

So like, V stores the elementary reflectors H(i) in the i-th column below the diagonal. If M=5 and N=3, the matrix V looks exactly like that little triangle above β€” the vis are the vectors defining H(i), returned in A. The 1s along the diagonal of V are NOT stored in A (they're implied, lowkey iconic), and the block reflector H is literally H = I - V * T * V**T, where V**T is the transpose of V. Not me doing matrix math in my head, it's giving genius fr fr. πŸ”₯


πŸ“ Definition location πŸ“

Definition at line 126 of file sgeqrt2.f. You can literally go find it. Iykyk. πŸ’œ


🧚 Author (meta) 🧚

Generated automatically by Doxygen for LAPACK from the source code. The robots did this one, bestie β€” we just made it cute. πŸ€–βœ¨


LAPACK β€” Version 3.12.0 β€” SRC/sgeqrt2.f(3) πŸŽ€

That's the whole page, bestie! Go forth and factorize your QR like the linear algebra icon you are. No cap, you're gonna eat this up. πŸ’–πŸ’…πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from