Householder QR¶
We will use Householder reflections to produce a QR factorization of the matrix
Our first step is to introduce zeros below the diagonal in column 1. Define the vector
Applying the Householder definitions gives us
6×6 Array{Float64,2}:
0.372678 0.0745356 0.521749 0.596285 0.298142 0.372678
0.0745356 0.991144 -0.0619919 -0.0708479 -0.0354239 -0.0442799
0.521749 -0.0619919 0.566057 -0.495935 -0.247968 -0.30996
0.596285 -0.0708479 -0.495935 0.433217 -0.283392 -0.354239
0.298142 -0.0354239 -0.247968 -0.283392 0.858304 -0.17712
0.372678 -0.0442799 -0.30996 -0.354239 -0.17712 0.7786
(Julia automatically fills in an identity of the correct size for the I
above.) By design we can use the reflector to get the zero structure we seek:
Now we let
We are set to put zeros into column 2. We must not use row 1 in any way, lest it destroy the zeros we just introduced. To put it another way, we can repeat the process we just did on the smaller submatrix
We now apply the reflector to the submatrix.
We need two more iterations of this process.
We have now reduced the original to an upper triangular matrix using four orthogonal Householder reflections: