Calculate Householder Matrix for 0 Below
This calculator helps you construct a Householder reflection matrix that zeros elements below a specified diagonal position. Householder matrices are fundamental in numerical linear algebra for QR decomposition and solving linear systems.
What is a Householder Matrix?
A Householder matrix is a square matrix that reflects vectors over a hyperplane. It's defined by a vector v and has the form:
H = I - 2vvᵀ / (vᵀv)
Where:
- I is the identity matrix
- v is the reflection vector
- vᵀ is the transpose of v
Householder matrices are orthogonal (Hᵀ = H⁻¹) and symmetric (Hᵀ = H), making them useful for numerical computations where stability is important.
How to Calculate
To calculate a Householder matrix that zeros elements below a specified diagonal position:
- Identify the vector to reflect (typically a column of the matrix being transformed)
- Compute the Householder vector v
- Construct the matrix H using the formula above
- Apply H to the matrix to zero the specified elements
The calculator automates this process for you.
Formula
For a vector x = [x₁, x₂, ..., xₙ]ᵀ, the Householder vector is:
v = x + sign(x₁) ||x|| e₁
Where e₁ is the first standard basis vector and ||x|| is the Euclidean norm of x.
The resulting Householder matrix will reflect vectors over the hyperplane perpendicular to v, effectively zeroing elements below the specified diagonal position.
Worked Example
Let's calculate a Householder matrix for the vector [3, 4, 0, 0]ᵀ to zero elements below the first diagonal position:
- Compute the norm: ||x|| = √(3² + 4²) = 5
- Construct v: v = [3, 4, 0, 0] + sign(3)*5*[1, 0, 0, 0] = [8, 4, 0, 0]
- Compute vᵀv = 8² + 4² = 80
- Construct H: H = I - 2vvᵀ/80
The resulting matrix will have the form:
H = [ [0.05, 0.10, 0, 0], [0.10, 0.70, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]
Applications
Householder matrices are used in:
- QR decomposition for solving linear systems
- Eigenvalue algorithms
- Least squares problems
- Numerical optimization
They provide a stable way to perform orthogonal transformations in numerical computations.