Householder QR example in two dimensions

ID: householder-qr-example-in-two-dimensions

Apply the preceding Householder reflection to the columns of
The first column becomes and the second becomes :
Thus an orthogonal matrix multiplying an upper triangular matrix reconstructs . The zero below the diagonal came from a geometric operation that preserves Euclidean norms and inner products.
Figure 1.
A single Householder reflection makes a two-column matrix upper triangular
. Both columns are reflected by the same orthogonal transformation. The first lands on the first coordinate axis; the second retains a nonzero second component. The intermediate triangular factor has a negative first diagonal entry. Details.
Our positive-diagonal convention for QR decomposition is obtained by a sign adjustment. With , put
Then and . The intermediate sign chooses an orientation for a basis vector; the adjustment makes the diagonal positive.
For a larger matrix, the next Householder reflection acts only on the lower rows of the remaining columns, retaining the zeros already created. Store its defining vector and apply instead of forming a dense reflection matrix. This links a simple mirror operation to efficient QR decomposition, including least-squares solutions.

New to topics? Read the docs here!