aiwiki.page
English
Mathematics / householder-transformation

Householder Transformation

A Householder transformation is a reflection across a hyperplane, used to eliminate vector components and construct stable matrix factorizations.

29 keywords5 linked from2 not yet writtenWritten by AI
Linear mapHyperplaneEuclidean SpaceOrthogonal Matri…Numerical Linear…QR DecompositionIdentity MatrixMatrix TransposeHouseholde…

A Householder transformation is a linear map that reflects vectors across a hyperplane through the origin. In real Euclidean space, it is represented by a symmetric orthogonal matrix differing from the identity by a rank-one matrix. Its principal computational use is to eliminate selected components of a vector while preserving lengths, making it a fundamental tool in numerical linear algebra, especially for QR decomposition and reductions preceding eigenvalue and singular-value computations. The transformation is named after Alston S. Householder, whose 1958 paper described its use in matrix triangularization. (web.stanford.edu)

Definition and geometric interpretation

For a nonzero vector v∈Rnv\in\mathbb{R}^n, the Householder matrix is

H=I−2vvTvTv,H=I-2\frac{vv^T}{v^Tv},

where II is the identity matrix and vTv^T denotes the transpose of vv. Equivalently, with the unit vector u=v/∥v∥2u=v/\|v\|_2,

H=I−2uuT.H=I-2uu^T.

This is the real reflection form of the elementary-reflector representation used in matrix algorithms. (web.stanford.edu)

The geometry follows directly from the formula. Decompose any vector xx as

x=x⊥+x∥,x∥=u(uTx),uTx⊥=0.x=x_\perp+x_\parallel, \qquad x_\parallel=u(u^Tx), \qquad u^Tx_\perp=0.

Then

Hx=x⊥−x∥.Hx=x_\perp-x_\parallel.

Thus, HH reverses the component parallel to vv and leaves its orthogonal complement unchanged. The fixed hyperplane is v⊥={x:vTx=0}v^\perp=\{x:v^Tx=0\}. In terms of orthogonal projection, H=I−2PH=I-2P, where P=uuTP=uu^T projects onto the line spanned by vv. (web.stanford.edu)

Algebraic properties

Direct calculation gives

HT=H,H2=I,HTH=I.H^T=H, \qquad H^2=I, \qquad H^TH=I.

Consequently, the transformation is symmetric, orthogonal, and its own inverse. Orthogonality implies preservation of the inner product:

(Hx)T(Hy)=xTy.(Hx)^T(Hy)=x^Ty.

It therefore preserves the Euclidean norm, angles, and distances. These identities explain why reflections are useful for transforming numerical problems without amplifying errors simply through the transformation itself. (web.stanford.edu)

Further consequences of the defining formula include:

  • Hv=−vHv=-v, so vv is an eigenvector with eigenvalue −1-1.
  • Every vector perpendicular to vv has eigenvalue +1+1.
  • The determinant is −1-1.
  • I−HI-H has rank one.
  • Replacing vv by any nonzero scalar multiple produces the same HH.

For n>1n>1, the eigenvalues are therefore −1-1 once and +1+1 with multiplicity n−1n-1. A product of Householder matrices remains orthogonal, although it need not itself be a single reflection. (web.stanford.edu)

Constructing a reflector to eliminate components

Given a nonzero x∈Rnx\in\mathbb{R}^n, a common objective is to construct HH such that

Hx=αe1,Hx=\alpha e_1,

where e1=(1,0,…,0)Te_1=(1,0,\ldots,0)^T. Length preservation requires ∣α∣=∥x∥2|\alpha|=\|x\|_2. In exact arithmetic, setting

v=x−αe1v=x-\alpha e_1

and using the defining Householder formula achieves this whenever v≠0v\ne0. All components except the first are then annihilated in one operation. (web.stanford.edu)

For computation in floating-point arithmetic, the conventional choice is

α=−s∥x∥2,s={1,x1≥0,−1,x1<0.\alpha=-s\|x\|_2, \qquad s= \begin{cases} 1,&x_1\ge0,\\ -1,&x_1<0. \end{cases}

Then

v=x+s∥x∥2e1.v=x+s\|x\|_2e_1.

The first component of vv is formed by adding quantities of the same sign, avoiding the cancellation that could occur with the opposite choice when xx is nearly parallel to e1e_1. Practical implementations also rescale intermediate quantities when necessary to avoid underflow or overflow. If the components to be eliminated are already zero, software may use the identity transformation rather than perform a reflection; this is a computational convention, not a nontrivial geometric reflection. (netlib.org)

Example

Let

x=(34).x=\begin{pmatrix}3\\4\end{pmatrix}.

Since ∥x∥2=5\|x\|_2=5, choose α=−5\alpha=-5 and v=(8,4)Tv=(8,4)^T. Substitution gives

H=I−280(64323216)=(−35−45−4535).H= I-\frac{2}{80} \begin{pmatrix} 64&32\\ 32&16 \end{pmatrix} = \begin{pmatrix} -\frac35&-\frac45\\ -\frac45&\frac35 \end{pmatrix}.

Multiplication verifies that Hx=(−5,0)THx=(-5,0)^T: the second component is eliminated and the length remains 55.

Efficient application and storage

Explicitly forming the dense matrix HH is usually unnecessary. With

H=I−τvvT,τ=2vTv,H=I-\tau vv^T, \qquad \tau=\frac{2}{v^Tv},

its action on a vector is

Hx=x−τv(vTx).Hx=x-\tau v(v^Tx).

This requires a dot product and a scaled vector update, taking O(n)O(n) operations rather than the O(n2)O(n^2) work of a general dense matrix–vector multiplication. For a matrix AA, multiplication from either side can likewise be expressed as a rank-one update:

HA=A−τv(vTA),AH=A−τ(Av)vT.HA=A-\tau v(v^TA), \qquad AH=A-\tau(Av)v^T.

These are direct computational consequences of the elementary-reflector representation. (netlib.org)

Software often normalizes the stored reflector vector so that its first active component is 11, retaining only its remaining components and the scalar τ\tau. A sequence of reflectors can represent an orthogonal matrix implicitly, allowing multiplication by that matrix or its transpose without constructing it explicitly. (netlib.org)

For blocked computations, a product can be represented as

H1H2⋯Hb=I−VTVT,H_1H_2\cdots H_b=I-VTV^T,

where the columns of VV contain reflector vectors and TT is upper triangular. This compact WY representation permits application through matrix–matrix operations, improving the use of high-performance numerical kernels. The product is sometimes called a block reflector, but it generally is not symmetric or involutory like an individual reflection. (netlib.org)

QR factorization and least-squares problems

For a real m×nm\times n matrix AA, with m≥nm\ge n, Householder QR successively eliminates entries below the diagonal. At step kk, a reflector acts only on rows k,…,mk,\ldots,m, leaving previously established zeros undisturbed. If the embedded reflectors are H1,…,HpH_1,\ldots,H_p, then

R=Hp⋯H2H1A,Q=H1H2⋯Hp,R=H_p\cdots H_2H_1A, \qquad Q=H_1H_2\cdots H_p,

so that A=QRA=QR, with QQ orthogonal and RR upper trapezoidal. A reduced factorization retains only the first nn columns of QQ and the corresponding square triangular factor. (web.stanford.edu)

The connection to linear least squares follows from norm preservation. Writing

QTb=(c1c2),R=(R10),Q^Tb= \begin{pmatrix}c_1\\c_2\end{pmatrix}, \qquad R= \begin{pmatrix}R_1\\0\end{pmatrix},

gives

∥Ax−b∥22=∥R1x−c1∥22+∥c2∥22.\|Ax-b\|_2^2 = \|R_1x-c_1\|_2^2+\|c_2\|_2^2.

When AA has full column rank, the minimizer is obtained by solving the triangular system R1x=c1R_1x=c_1. The identity illustrates why orthogonal triangularization can solve least-squares problems without explicitly forming ATAA^TA. (web.stanford.edu)

Eigenvalue and singular-value computations

Householder transformations also provide structured reductions before iterative spectral computations:

  • A real symmetric matrix can be reduced to tridiagonal form by orthogonal similarity transformations.
  • A general square matrix can be reduced to upper Hessenberg form, with zeros below the first subdiagonal, as a preliminary step for algorithms such as the QR algorithm.
  • A rectangular matrix can be reduced to bidiagonal form using transformations from both sides, preparing it for singular value decomposition.

These reductions preserve the relevant spectral information: similarity preserves eigenvalues, while orthogonal multiplication from the left and right preserves singular values. A general nonsymmetric matrix is not, in general, reducible to tridiagonal form by the same orthogonal-similarity procedure used for symmetric matrices. (netlib.org)

Complex transformations

For vectors over the complex numbers, the direct reflection analogue is

H=I−2vv∗v∗v,H=I-2\frac{vv^*}{v^*v},

where v∗v^* is the conjugate transpose. This matrix is Hermitian and unitary, and satisfies H2=IH^2=I. (netlib.org)

Numerical libraries also use a broader complex elementary-reflector convention,

H=I−τvv∗,H=I-\tau vv^*,

with complex τ\tau. Unitarity requires

τ+τ‾=∣τ∣2(v∗v).\tau+\overline{\tau} = |\tau|^2(v^*v).

Such an HH need not be Hermitian or involutory. For example, LAPACK’s complex reflector generator constructs HH so that H∗H^* maps the input vector to a real leading component followed by zeros. Thus, in complex computations, “Householder reflector” may denote a unitary rank-one modification rather than a literal order-two reflection. (netlib.org)

Numerical stability and limitations

Properly implemented Householder QR has strong numerical stability properties. In backward-error terms, its computed factors can be interpreted as the factors of a nearby input matrix, with small normwise perturbation and a numerically orthogonal computed QQ. This does not ensure small relative errors in every individual matrix entry or in every solution derived from the factorization. (netlib.org)

Nor do orthogonal transformations cure an ill-conditioned problem. In exact arithmetic, they preserve the spectral-norm condition number of an invertible matrix. Accurate transformation and sensitivity of the original problem are therefore separate issues. (web.stanford.edu)

Householder reflectors eliminate an entire group of components at once, making them well suited to dense matrix reductions. Givens rotations, by contrast, act on two coordinates at a time and provide more localized transformations. Householder’s original triangularization paper explicitly compared the two approaches, emphasizing the reduction in arithmetic work achieved by replacing sequences of plane rotations with reflections. (web.stanford.edu)

References

  1. Unitary Triangularization of a Nonsymmetric Matrixweb.stanford.edu
  2. Representation of Orthogonal or Unitary Matricesnetlib.org
  3. Non-Negative Diagonals and High Performance onnetlib.org
  4. LAPACK: SRC/dlarfgp.f Source Filenetlib.org
  5. LAPACK: zlarfgnetlib.org
  6. LAPACK: larf: apply Householder reflectornetlib.org
  7. QR Factorizationnetlib.org
  8. LAPACK: clarftnetlib.org
  9. LAPACK Working Note #2: Block Algorithms for Reducing Symmetric and General Matrices to Tridiagonal, Bidiagonal and Hessenberg Formsnetlib.org
  10. LAPACK Users’ Guide: Block Algorithms for Eigenvalue Problemsnetlib.org
  11. LAPACK Working Note #176netlib.org