Householder Reflection: A Mirror That Clears a Column

Chapter 4 · Mathematics for AI and Machine Learning · Beginner · 1:51

An interactive live film: a vector x is reflected onto the first axis by the mirror perpendicular to v = x - y in 3D; the reader drags x, switches to the stable sign, and sees v cancel when x is close to its target.

Narration

Here is a vector x in three dimensions. Householder's idea is to reflect x in a mirror, so that it lands on the first axis, with every other entry zero.

A reflection keeps lengths, so the target y must have the same length as x. It sits on the first axis, in green.

The mirror is the plane perpendicular to v, which is x minus y. It passes through the origin, and it cuts the segment from x to y in half, at a right angle.

Reflecting across that plane removes twice the part of a vector along v. That is the matrix H, the identity minus two v v transpose over v transpose v, and H sends x exactly to y.

The same mirror reflects every vector. The blue vector z flips to its mirror image H z, with the same length. H is orthogonal.

There are two possible targets, plus or minus the length of x. If x already points close to the target, x minus y is tiny, and computing it loses digits. The stable choice is the target on the opposite side from the first entry of x.

Your turn. Drag x, and switch the sign of the target with the slider. Find where v becomes very short.

In the QR decomposition, one such mirror clears each column below the diagonal, and multiplying the mirrors together gives Q.

More from Chapter 4

Preview1:30The Rank of a Product: Dimensions Can Only Be LostChapter 4Preview1:56Householder QR: One Mirror per ColumnChapter 4Preview1:24Numerical Rank: When Is a Pancake a Plane?Chapter 4Preview1:39Gram-Schmidt or Householder: Losing the Right AnglesChapter 4Preview1:41A Rank-One Change of the Identity: Identity, Projection, MirrorChapter 4