Givens row-pair update 2026-10-14
Left matrix multiplication by a Givens rotation replaces rows of a matrix byBoth right-hand sides use the old entries. An in-place algorithm must save the first result temporarily, update the second entry, and only then overwrite the first. The reference BLAS
DROT implementation follows this order with its temporary DTEMP.[ref]DROT (Reference BLAS, LAPACK 3.12.1) by LAPACK project. DROT source, lines 116–120 and 130–134: temporary first-row value and second-row update
For elimination in column , construct from . This sets the lower component to zero in exact arithmetic. In floating-point arithmetic the computed expression can leave a small remainder; after computing the other updated entries, explicitly store and . Previously eliminated columns stay zero if both participating rows are already zero there. This is why the ordering in QR decomposition by Givens rotations matters.