Subsection 3.3.3 Practical computation of the Householder vector
¶Subsubsection 3.3.3.1 The real case
¶Next, we discuss a slight variant on the above discussion that is used in practice. To do so, we view \(x \) as a vector that consists of its first element, \(\chi_1 \text{,}\) and the rest of the vector, \(x_2 \text{:}\) More precisely, partition
where \(\chi_1 \) equals the first element of \(x \) and \(x_2 \) is the rest of \(x \text{.}\) Then we will wish to find a Householder vector \(u = \FlaTwoByOneSingleLine { 1 } { u_2 }\) so that
Notice that \(y \) in the previous discussion equals the vector \(\FlaTwoByOneSingleLine { \pm \| x \|_2 } { 0 }\text{,}\) so the direction of \(u \) is given by
We now wish to normalize this vector so its first entry equals "1":
where \(\nu_1 = \chi_1 \mp \| x \|_2 \) equals the first element of \(v \text{.}\) (Note that if \(\nu_1 = 0 \) then \(u_2 \) can be set to \(0 \text{.}\))
Subsubsection 3.3.3.2 The complex case (optional)
¶Let us work out the complex case, dealing explicitly with \(x \) as a vector that consists of its first element, \(\chi_1 \text{,}\) and the rest of the vector, \(x_2 \text{:}\) More precisely, partition
where \(\chi_1 \) equals the first element of \(x \) and \(x_2 \) is the rest of \(x \text{.}\) Then we will wish to find a Householder vector \(u = \FlaTwoByOneSingleLine { 1 } { u_2 }\) so that
Here \(\complexone \) denotes a complex scalar on the complex unit circle. By the same argument as before
We now wish to normalize this vector so its first entry equals "1":
where \(\nu_1 = \chi_1 - \complexone \| x \|_2 \text{.}\) (If \(\nu_1 = 0 \) then we set \(u_2 \) to \(0 \text{.}\))
As was the case for the real-valued case, the choice \(\complexone \) is important. We choose \(\complexone = - \sign( \chi_1 ) = - \frac{\chi_1}{\vert \chi_1 \vert} \text{.}\)
Subsubsection 3.3.3.3 A routine for computing the Householder vector
¶The vector
is the Householder vector that reflects \(x \) into \(\complexone \| x \|_2 e_0 \text{.}\) The notation
represents the computation of the above mentioned vector \(u_2 \text{,}\) and scalars \(\rho \) and \(\tau \text{,}\) from vector \(x \text{.}\) We will use the notation \(H(x) \) for the transformation \(I - \frac{1}{\tau} u u^H \) where \(u \) and \(\tau \) are computed by \({\rm Housev}( x ) \text{.}\)
Remark 3.3.3.2.
The function
function [ rho, ... u2, tau ] = Housev( chi1, ... x2 )1implements the function Housev. It can be found in
Assignments/Week03/matlab/Housev.m
Homework 3.3.3.1.
Function Assignments/Week03/matlab/Housev.m
implements the steps in Figure 3.3.3.1 (left). Update this implementation with the equivalent steps in Figure 3.3.3.1 (right), which isSv^T v closer to how it is implemented in practice.