Least Squares & Data Fitting

a Givens rotation

/ GIV-enz /

A Givens rotation is a surgical tool: where a Householder reflection clears a whole column at once, a Givens rotation zeroes just ONE entry. It rotates a single pair of coordinates in their plane by exactly the angle needed to spin a chosen number down to zero, leaving everything else untouched. It is the precision tweezers of numerical linear algebra — perfect when a matrix is almost triangular already and you only need to fix a few stray entries.

In two coordinates i and j, a Givens rotation is the 2-by-2 matrix with first row (c, s) and second row (-s, c), where c = cos(theta), s = sin(theta) are chosen so that, applied to (a, b)^T, it produces (r, 0)^T where r = sqrt(a^2 + b^2). You compute c = a/r and s = b/r directly — no trig functions needed. Embedded in a larger identity matrix, it touches only rows i and j. Like any rotation it preserves lengths, so it is numerically stable; chaining one rotation per below-diagonal entry triangularizes a matrix and gives a QR factorization, just like Householder but entry-by-entry.

Givens rotations shine where their selectivity pays off: zeroing the lone subdiagonal entries of an almost-triangular (Hessenberg) matrix in the QR eigenvalue algorithm, updating a QR factorization when one row of data arrives or leaves (streaming least squares), and on sparse matrices where you do not want a reflection to fill in zeros you worked to create. For a dense matrix from scratch, Householder is cheaper overall; Givens wins when you can target just the few entries that need fixing — and it parallelizes well, since non-overlapping rotations can run at once.

To zero the b in the column (a, b)^T = (3, 4)^T, set r = 5, c = 3/5, s = 4/5; then the rotation with rows (c, s) and (-s, c) sends (3, 4)^T to (5, 0)^T. Just that one entry is annihilated, and only two rows of the surrounding matrix change.

One plane rotation zeroes exactly one entry — the targeted alternative to Householder's whole-column sweep.

Compute c and s from c = a/r, s = b/r with r = sqrt(a^2 + b^2) (guarded against overflow via hypot), not from an explicit arctangent — calling trig functions is slower and less accurate.

Also called
plane rotationGivens transformation平面旋轉