A Householder transformation reflects a vector across a plane orthogonal to a chosen direction. Given a nonzero vector , we construct a unit vector and then form the matrix . Applying to any vector mirrors it with respect to the plane perpendicular to .
This transformation lies at the heart of many numerical algorithms. In particular, QR decomposition often uses successive Householder reflections to convert a matrix into an upper triangular form while preserving orthogonality. Because each reflection is orthogonal, rounding errors remain well controlled, making the approach numerically stable.
To build , we normalize the input vector to obtain . The reflection matrix is then . This is an orthogonal matrix with determinant , meaning it flips orientation while preserving lengths.
Our calculator works in three dimensions for simplicity, though the concept generalizes to any dimension. By entering the components of , you can explore how different directions affect the reflection. The output matrix is displayed with entries rounded to six decimals.
Householder reflections appear in algorithms for eigenvalue problems, least squares fitting, and more. Because a reflection can zero out all but one component of a vector, repeated applications can systematically introduce zeros below a matrix diagonal. This process yields an efficient method to compute QR decompositions without forming explicit rotations.
The transformation also helps visualize mirror symmetries. If you choose along the -axis, the Householder matrix reflects points across the plane . With other vectors, the plane rotates accordingly. Experimenting with different vectors reveals how reflections depend on orientation.
In practice we must normalize carefully to avoid overflow or underflow. When the components are large or small, computing the norm may lead to loss of significance. Stable algorithms rescale the vector or use higher precision. For most moderate inputs, however, simple normalization suffices.
Because is orthogonal, applying it preserves vector norms. This property is valuable in iterative algorithms, preventing errors from growing without bound. Many textbook algorithms rely on this stability to achieve reliable results in finite-precision arithmetic.
Use this calculator to see how the reflection matrix changes when you alter . Try unit vectors along the coordinate axes to observe familiar reflections, then experiment with arbitrary directions. Multiplying by your original vector should yield its negative, confirming the mirror action.
Understanding Householder transformations provides insight into matrix factorizations and geometric optics alike. By mastering this simple yet powerful concept, you gain a tool that recurs throughout computational mathematics.
Compute barycentric coordinates of a point with respect to a triangle.
Compute the characteristic polynomial of a 2x2 or 3x3 matrix and learn how it relates to eigenvalues.
Approximate the zero-order Hankel transform of a radial function using numerical integration.