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.
Figure 1.
A Givens rotation takes clockwise to while preserving the Euclidean norm
. Details.
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 by
Both 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]
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.
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 , then
A 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.
A Givens rotation is the identity except in rows and columns , where it has the block
For and , choose
when . Then
If both entries vanish, any angle works.
For the given matrix, first use
It gives
Then use
Thus is
All leading row entries are positive. The resulting QR decomposition by Givens rotations is
where
and is the matrix above. Since it is a product of transposed rotations, is orthogonal.
Put and write its second column as . For , take
where 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 form
This 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.
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 is
and coordinates are zero. Later Givens rotations involve only coordinate one and a new coordinate, so those zeros remain zero. Therefore
where 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 gives
For 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 block
The 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.