Givens rotation Created 2026-09-24 Updated 2026-10-14
A Givens rotation eliminates one component of a vector by rotating just two coordinates, preserving its Euclidean norm. For example,The length remains five: elimination moves the component into the retained coordinate rather than discarding it. Applied to a matrix, the same operation mixes two rows; QR decomposition by Givens rotations uses these local operations to build an upper triangular matrix.
For indices , the matrix is the identity matrix except for its block on coordinates :This article uses left matrix multiplication on column vectors. If and , the block is a rotation matrix through angle : the minus sign belongs in the lower left. Its transpose reverses the rotation. Direct multiplication gives and determinant one, so it is an orthogonal matrix; consequently . Only two coordinates change, but this Euclidean norm identity holds for the entire vector.
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.
Past exam of the mathematics course of the University of Cambridge 2016 ib Paper 2 19D b Solution Created 2026-09-24 Updated 2026-10-06
A QR decomposition of an matrix, , is , where is an orthogonal matrix and is and upper trapezoidal: for . In particular its bottom rows vanish.
Successive left Givens rotations annihilate the entries below the diagonal, column by column. When working on column , rotate rows and ; their earlier columns are already zero, so the earlier eliminations persist. If , thenA product of orthogonal matrices is orthogonal. The construction remains valid for a rank-deficient matrix, although uniqueness is not asserted. This is QR decomposition by Givens rotations.
Past exam of the mathematics course of the University of Cambridge 2024 ib Paper 1 17A Solution Created 2026-09-23 Updated 2026-09-25
A Givens rotation is the identity except in rows and columns , where it has the blockFor and , choosewhen . ThenIf both entries vanish, any angle works.
Past exam of the numerical analysis course of the University of Oxford 2015 3 d ii Solution 2026-10-31
Put and write its second column as . For , takewhere each angle is computed from the current second column, in the right-to-left application order. These Givens rotations eliminate its entries in rows by accumulating their Euclidean norm in row two.
Each rotation acts only on rows with indices at least two. The first column of is , whose entries in all those rows are zero. Mixing two zeros leaves them zero, and row one is untouched. Thus the first column is unchanged. The resulting matrix has the formThis verifies both required properties, including the case of zero second-column tail. When there are no rows to eliminate: take , the empty product. No sign change of is required in that case. Each Givens row-pair update preserves previously eliminated columns, which is the central invariant of QR decomposition by Givens rotations.
Past exam of the numerical analysis course of the University of Oxford 2015 3 d i Solution 2026-10-31
Apply the product from right to left, choosing every Givens rotation from the current first column. First replaces by . Next combines that retained entry with and sets the third entry to zero. Inductively, after eliminating coordinates , the first coordinate isand coordinates are zero. Later Givens rotations involve only coordinate one and a new coordinate, so those zeros remain zero. Thereforewhere is the first standard basis vector. The zero vector is included by choosing the identity matrix for every zero pair. The nonnegative sign follows from the convention fixed in part (c)(ii). This is the first-column stage of QR decomposition by Givens rotations.
A real square orthogonal matrix satisfies , so it preserves the Euclidean norm. The columns of are orthonormal, hence . The induced matrix norm therefore givesFor the left truncation, , and equality is guaranteed for arbitrary only when . Indeed, if , take , where is an omitted column of . Then but . Merely taking does not guarantee preservation for an arbitrary .
A full QR decomposition of a real matrix is , with orthogonal and upper trapezoidal; for a square matrix, is upper triangular. Fix the following sign convention for a Givens rotation: it is the identity except for its blockThe block transpose times the block is because , proving orthogonality. Writing , the choice gives and . To zero the other coordinate take , giving . If , both entries are already zero and the identity suffices.
For a tridiagonal matrix, successively rotate adjacent row pairs , each time zeroing the current entry . Earlier columns remain triangular because both affected rows are already zero there. The result is upper triangular, so gives its QR decomposition. Only rotations are required; the resulting has at most two superdiagonals.
For a full square matrix, process columns . Within column , for , rotate rows to eliminate the current entry. Previously cleared columns stay clear. With in application order, , one has . This is QR decomposition by Givens rotations.
