Tutorials › Linear Algebra › Mapping Vectors with Householder Reflections

Orthogonal Matrices and Isometries · Tutorial 720 of 1000

Mapping Vectors with Householder Reflections

Use the difference of equal-length vectors to construct and verify a Householder reflection, including the special cases when the vectors are identical or opposite.

Intermediate 9 min read

What You'll Learn

  • Define the Householder matrix associated with a nonzero normal vector.
  • Construct a reflection that maps one vector to another when their lengths agree.
  • Prove why equal lengths are the exact condition for the difference-based formula.
  • Verify the construction by computing the matrix and its action on a vector.
  • Handle identical vectors without dividing by a zero difference.
  • Recognize the reflection that maps a nonzero vector to its opposite.

Using the Difference to Build a Reflection

A Householder reflection can be chosen to send one vector to another, provided the two vectors have the same length. The useful choice of normal vector is their difference: reflecting across the hyperplane perpendicular to that difference exchanges the two vectors. This gives a direct construction from the vectors themselves, rather than requiring a separate search for a reflecting hyperplane.

Throughout, vectors are columns in \(\mathbb{R}^n\), with the usual dot product \(\mathbf{u}^{\top}\mathbf{v}\) and norm \(\|\mathbf{u}\|=\sqrt{\mathbf{u}^{\top}\mathbf{u}}\). A hyperplane through the origin with nonzero normal vector \(\mathbf{u}\) consists of the vectors \(\mathbf{z}\) satisfying \(\mathbf{u}^{\top}\mathbf{z}=0\). The reflection fixes every vector in that hyperplane and reverses the component in the direction of \(\mathbf{u}\).

Definition: For a nonzero vector \(\mathbf{u}\in\mathbb{R}^n\), the Householder matrix with normal \(\mathbf{u}\) is \( \mathbf{H}_{\mathbf{u}}=\mathbf{I}_n-\dfrac{2\mathbf{u}\mathbf{u}^{\top}}{\mathbf{u}^{\top}\mathbf{u}} \). It acts as a reflection across the hyperplane perpendicular to \(\mathbf{u}\). The matrix is not defined by this formula when \(\mathbf{u}=\mathbf{0}\), because its denominator would be zero.

The fraction involving \(\mathbf{u}\mathbf{u}^{\top}\) is an \(n\times n\) matrix: \(\mathbf{u}\mathbf{u}^{\top}\) is the outer product of the column vector with its transpose. Scaling the normal does not change the reflection. Indeed, for any nonzero real \(c\), replacing \(\mathbf{u}\) by \(c\mathbf{u}\) multiplies both the numerator and denominator by \(c^2\).

Why the Householder Matrix Is a Reflection

Before using the matrix to map vectors, we verify its defining properties. Write \(\alpha=2/(\mathbf{u}^{\top}\mathbf{u})\), so \(\mathbf{H}_{\mathbf{u}}=\mathbf{I}_n-\alpha\mathbf{u}\mathbf{u}^{\top}\). Since \(\mathbf{u}^{\top}\mathbf{u}\) is a nonzero real number, the expression is defined. The matrix is symmetric, fixes vectors perpendicular to \(\mathbf{u}\), and sends \(\mathbf{u}\) to its negative.

Theorem: For every nonzero \(\mathbf{u}\in\mathbb{R}^n\), the Householder matrix \(\mathbf{H}_{\mathbf{u}}\) is orthogonal. It fixes each \(\mathbf{z}\) with \(\mathbf{u}^{\top}\mathbf{z}=0\), and \(\mathbf{H}_{\mathbf{u}}\mathbf{u}=-\mathbf{u}\).

Proof. Because \((\mathbf{u}\mathbf{u}^{\top})^{\top}=\mathbf{u}\mathbf{u}^{\top}\), the matrix \(\mathbf{H}_{\mathbf{u}}\) is symmetric. Put \(s=\mathbf{u}^{\top}\mathbf{u}\), which is positive because \(\mathbf{u}\ne\mathbf{0}\). Then \(\alpha=2/s\), and \((\mathbf{u}\mathbf{u}^{\top})(\mathbf{u}\mathbf{u}^{\top})=\mathbf{u}(\mathbf{u}^{\top}\mathbf{u})\mathbf{u}^{\top}=s\mathbf{u}\mathbf{u}^{\top}\). Thus \(\mathbf{H}_{\mathbf{u}}^{\top}\mathbf{H}_{\mathbf{u}}=(\mathbf{I}_n-\alpha\mathbf{u}\mathbf{u}^{\top})^2=\mathbf{I}_n+(-2\alpha+\alpha^2s)\mathbf{u}\mathbf{u}^{\top}=\mathbf{I}_n\), since \(-2\alpha+\alpha^2s=-4/s+4/s=0\). This is the defining condition for an orthogonal matrix. If \(\mathbf{u}^{\top}\mathbf{z}=0\), then \(\mathbf{H}_{\mathbf{u}}\mathbf{z}=\mathbf{z}-2\mathbf{u}(\mathbf{u}^{\top}\mathbf{z})/s=\mathbf{z}\). Also, \(\mathbf{H}_{\mathbf{u}}\mathbf{u}=\mathbf{u}-2\mathbf{u}s/s=-\mathbf{u}\). The matrix therefore fixes the perpendicular hyperplane and reverses the normal direction, as claimed. \(\square\)

Orthogonality also guarantees that the transformation preserves length: if \(\mathbf{H}^{\top}\mathbf{H}=\mathbf{I}_n\), then \(\|\mathbf{H}\mathbf{x}\|^2=(\mathbf{H}\mathbf{x})^{\top}(\mathbf{H}\mathbf{x})=\mathbf{x}^{\top}\mathbf{H}^{\top}\mathbf{H}\mathbf{x}=\|\mathbf{x}\|^2\). Consequently, a Householder reflection cannot map vectors of different lengths to each other.

The Difference-Vector Construction

Theorem: Let \(\mathbf{x},\mathbf{y}\in\mathbb{R}^n\) satisfy \(\|\mathbf{x}\|=\|\mathbf{y}\|\) and \(\mathbf{x}\ne\mathbf{y}\). Then \(\mathbf{u}=\mathbf{x}-\mathbf{y}\) is nonzero, and the Householder matrix with normal \(\mathbf{u}\) satisfies \(\mathbf{H}_{\mathbf{u}}\mathbf{x}=\mathbf{y}\). For \(\mathbf{x}\ne\mathbf{y}\), the difference-based formula maps \(\mathbf{x}\) to \(\mathbf{y}\) only if their lengths are equal.

Proof. First assume \(\|\mathbf{x}\|=\|\mathbf{y}\|\) and \(\mathbf{x}\ne\mathbf{y}\). The difference \(\mathbf{u}=\mathbf{x}-\mathbf{y}\) is nonzero, so \(\mathbf{H}_{\mathbf{u}}\) is defined. Expanding the two dot products gives \(\mathbf{u}^{\top}\mathbf{x}=\|\mathbf{x}\|^2-\mathbf{y}^{\top}\mathbf{x}\), while \(\mathbf{u}^{\top}\mathbf{u}=\|\mathbf{x}\|^2+\|\mathbf{y}\|^2-2\mathbf{y}^{\top}\mathbf{x}\). Equality of the squared lengths therefore implies \(\mathbf{u}^{\top}\mathbf{u}=2\mathbf{u}^{\top}\mathbf{x}\). Substitute this into the reflection formula: \(\mathbf{H}_{\mathbf{u}}\mathbf{x}=\mathbf{x}-2\mathbf{u}\dfrac{\mathbf{u}^{\top}\mathbf{x}}{\mathbf{u}^{\top}\mathbf{u}}=\mathbf{x}-\mathbf{u}=\mathbf{x}-(\mathbf{x}-\mathbf{y})=\mathbf{y}\). For the reverse implication, suppose \(\mathbf{x}\ne\mathbf{y}\), set \(\mathbf{u}=\mathbf{x}-\mathbf{y}\), and assume \(\mathbf{H}_{\mathbf{u}}\mathbf{x}=\mathbf{y}\). The formula then gives \(2\mathbf{u}^{\top}\mathbf{x}/(\mathbf{u}^{\top}\mathbf{u})=1\), because \(\mathbf{x}-\mathbf{y}=\mathbf{u}\ne\mathbf{0}\). Hence \(2\mathbf{u}^{\top}\mathbf{x}=\mathbf{u}^{\top}\mathbf{u}\). Substituting the expansions above yields \(2\|\mathbf{x}\|^2-2\mathbf{y}^{\top}\mathbf{x}=\|\mathbf{x}\|^2+\|\mathbf{y}\|^2-2\mathbf{y}^{\top}\mathbf{x}\), so \(\|\mathbf{x}\|^2=\|\mathbf{y}\|^2\). Both implications are proved. \(\square\)

This proof gives a practical recipe. When the vectors differ, calculate their difference, form the Householder matrix with that difference as its normal, and apply the matrix. Equal lengths are essential: they are what make the dot-product identity in the proof hold, and orthogonality independently shows that unequal lengths could not be mapped by a reflection.

Worked Example: Map One Vector to Another in \(\mathbb{R}^3\)

Construct a Householder matrix mapping \(\mathbf{x}=(3,0,0)^{\top}\) to \(\mathbf{y}=(1,2,2)^{\top}\). First check the lengths: \(\|\mathbf{x}\|^2=3^2=9\), and \(\|\mathbf{y}\|^2=1^2+2^2+2^2=9\). The lengths agree, and the vectors are not identical, so the construction applies.

The difference is \(\mathbf{u}=\mathbf{x}-\mathbf{y}=(2,-2,-2)^{\top}\), with \(\mathbf{u}^{\top}\mathbf{u}=4+4+4=12\). Its outer product is

$$ \mathbf{u}\mathbf{u}^{\top} = \begin{bmatrix} 4&-4&-4\\ -4&4&4\\ -4&4&4 \end{bmatrix}. $$

Since \(2/(\mathbf{u}^{\top}\mathbf{u})=1/6\), the reflection matrix is

$$ \mathbf{H}_{\mathbf{u}} = \mathbf{I}_3-\frac{1}{6}\mathbf{u}\mathbf{u}^{\top} = \begin{bmatrix} \frac13&\frac23&\frac23\\ \frac23&\frac13&-\frac23\\ \frac23&-\frac23&\frac13 \end{bmatrix}. $$

Multiplying by the starting vector gives \(\mathbf{H}_{\mathbf{u}}\mathbf{x}=(1,2,2)^{\top}\), since the first column of the matrix multiplied by \(3\) is \((1,2,2)^{\top}\). Thus the calculated matrix maps \(\mathbf{x}\) to \(\mathbf{y}\), as required.

Check: The result is exactly the target vector, and its squared length is \(1^2+2^2+2^2=9=\|\mathbf{x}\|^2\), consistent with the length preservation of an orthogonal matrix.

Identical and Opposite Vectors

The difference-based formula has a special case that must not be handled by substitution alone. If \(\mathbf{x}=\mathbf{y}\), then \(\mathbf{x}-\mathbf{y}=\mathbf{0}\), which cannot be used as a Householder normal. There is no need to reflect the vector to reach itself: use the identity matrix \(\mathbf{I}_n\), which maps every vector to itself. This is the identity transformation, not a nontrivial Householder reflection. In some dimensions one can also choose a nonzero normal perpendicular to \(\mathbf{x}\), but that is a different choice of normal and is unnecessary for the mapping.

If \(\mathbf{y}=-\mathbf{x}\) and \(\mathbf{x}\ne\mathbf{0}\), the two vectors have equal lengths and are distinct. Their difference is \(2\mathbf{x}\), so the normal points in the direction of \(\mathbf{x}\). The corresponding reflection reverses the vector and fixes every vector perpendicular to it. If \(\mathbf{x}=\mathbf{0}\), then \(-\mathbf{x}=\mathbf{x}\), so this is the identical-vector case instead.

Worked Example: Map a Vector to Its Opposite

Map \(\mathbf{x}=(1,2,2)^{\top}\) to \(\mathbf{y}=(-1,-2,-2)^{\top}\). Their squared lengths are both \(1+4+4=9\), and they are distinct. The difference is \(\mathbf{u}=\mathbf{x}-\mathbf{y}=(2,4,4)^{\top}=2\mathbf{x}\), with \(\mathbf{u}^{\top}\mathbf{u}=4+16+16=36\).

The outer product and resulting Householder matrix are

$$ \mathbf{u}\mathbf{u}^{\top} = \begin{bmatrix} 4&8&8\\ 8&16&16\\ 8&16&16 \end{bmatrix}, \qquad \mathbf{H}_{\mathbf{u}} = \mathbf{I}_3-\frac{1}{18}\mathbf{u}\mathbf{u}^{\top} = \begin{bmatrix} \frac79&-\frac49&-\frac49\\ -\frac49&\frac19&-\frac89\\ -\frac49&-\frac89&\frac19 \end{bmatrix}. $$

Apply this matrix to \(\mathbf{x}\). Its first component is \((7-8-8)/9=-1\), its second is \((-4+2-16)/9=-2\), and its third is \((-4-16+2)/9=-2\). Thus \(\mathbf{H}_{\mathbf{u}}\mathbf{x}=(-1,-2,-2)^{\top}=\mathbf{y}\).

Check: The computed vector is the target \(-\mathbf{x}\), and its squared length is \(1+4+4=9\), the same as the starting vector’s. In this case the reflecting hyperplane is perpendicular to \(\mathbf{x}\), so the whole vector is reversed.

Worked Example: Identical Vectors Require No Difference Normal

Suppose \(\mathbf{x}=\mathbf{y}=(1,-2)^{\top}\). Their difference is \(\mathbf{0}\), so the Householder formula with this difference as the normal is undefined. Instead choose the identity matrix \(\mathbf{I}_2\). Then \(\mathbf{I}_2\mathbf{x}=(1,-2)^{\top}=\mathbf{y}\).

Check: The first component is \(1\cdot1+0\cdot(-2)=1\), and the second is \(0\cdot1+1\cdot(-2)=-2\). Thus the identity map gives the required output without dividing by zero.

Common Mistake: Omitting the Factor of Two

A frequent error is to use \(\mathbf{I}_n-\mathbf{u}\mathbf{u}^{\top}/(\mathbf{u}^{\top}\mathbf{u})\), omitting the factor \(2\). That matrix does not reverse the normal component; it subtracts only half of the required change. For the first worked example, \(\mathbf{u}=(2,-2,-2)^{\top}\) and \(\mathbf{u}^{\top}\mathbf{u}=12\). The incorrect expression sends \(\mathbf{x}=(3,0,0)^{\top}\) to \(\mathbf{x}-\mathbf{u}(\mathbf{u}^{\top}\mathbf{x})/12=(3,0,0)^{\top}-(1,-1,-1)^{\top}=(2,1,1)^{\top}\), not to \((1,2,2)^{\top}\). The correct factor gives \(\mathbf{x}-2\mathbf{u}(\mathbf{u}^{\top}\mathbf{x})/12=(3,0,0)^{\top}-2(1,-1,-1)^{\top}=(1,2,2)^{\top}\). The final multiplication is a useful check: a proposed matrix is a valid answer to a mapping problem only if applying it to the starting vector actually produces the target.

Check Your Understanding

For each construction, check the relevant length condition and verify the resulting action by multiplication.

  1. For \(\mathbf{x}=(0,3,0)^{\top}\) and \(\mathbf{y}=(0,0,3)^{\top}\), find \(\mathbf{u}\) and \(\mathbf{H}_{\mathbf{u}}\), then verify that \(\mathbf{H}_{\mathbf{u}}\mathbf{x}=\mathbf{y}\).
  2. Explain why the difference-based formula cannot be used when \(\mathbf{x}=\mathbf{y}\), and give a matrix that maps \(\mathbf{x}\) to itself.
  3. For a nonzero \(\mathbf{x}\), show that the difference \(\mathbf{x}-(-\mathbf{x})\) is parallel to \(\mathbf{x}\).
  4. Use the length-preserving property of an orthogonal matrix to explain why no Householder reflection can map vectors of unequal lengths to each other.
  5. For \(\mathbf{u}=(1,1)^{\top}\), compute \(\mathbf{H}_{\mathbf{u}}\) and verify that it fixes \((1,-1)^{\top}\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon