with the identity matrix I and any normalized vector x with
.
Householder transformations zero the m-1 elements of a column vector v below the first element:
One can verify that
fulfils
and that with
one obtains the vector
.
To perform the decomposition of the (m,n) matrix A = QR (with
) we construct in this way an (m,m) matrix H(1) to zero the m-1 elements of the first column. An (m-1,m-1) matrix G(2) will zero the m-2 elements of the second column.
With G(2) we produce the (m,m) matrix
After n (n-1 for m = n) such orthogonal transforms H(i) we obtain:
R is upper triangular and the orthogonal matrix Q becomes:
In practice the H(i) are never explicitely computed.