For a nonzero real vector , the Householder transformation is
Writing gives , , so and . Thus is orthogonal. It reverses the component along and fixes its orthogonal complement.
For Householder QR decomposition, successively choose a reflector on each trailing row block to send its current column to a multiple of the first coordinate vector. Each step annihilates the subdiagonal entries without disturbing earlier columns. The reflector product gives an upper-trapezoidal and its transpose gives an orthogonal with .
Here the first column has norm four. Taking gives and
The second column already has no unwanted entries. On the last two rows, reflect using :
This maps to . Therefore a full QR factorization is
Both displayed factors arise from the explicit reflectors; in particular and .
The first three diagonal entries of are nonzero, so the column rank is three and a consistent system has a unique solution. Consistency requires the last component of to vanish. For the given right side this component is
Hence
For this value the transformed right side is . Back substitution also gives . This illustrates the Householder reduction of an overdetermined consistent system.
The linear least-squares problem is to minimize over , allowing an overdetermined system to have a nonzero residual. For a full QR decomposition, is orthogonal and is with an upper-triangular top block. Orthogonal transformations preserve the Euclidean norm, so
If has full column rank, the top triangular block is nonsingular; setting its residual to zero gives the unique minimizer, while the remaining residual is independent of . Without full column rank, minimizers still exist but need not be unique.
For the specified matrix, one Householder reflection already produces an upper-triangular matrix. Take , the difference between the first column and , and set
The formula gives , . Direct multiplication yields the Householder QR decomposition
All subdiagonal entries in the remaining columns are already zero, so no further reflection is needed. For the supplied right-hand side, . Back substitution gives , , , hence
The residual is orthogonal to every column of , independently confirming the normal equations .