Similar algorithms exist for updating LU decompositions of A. If U is upper triangular and L is unit lower triangular, an element uij from U is related to the elements and of the LDU decomposition as follows.
The recurrence relations of the inner loop of Algorithm 8 must change to reflect this relationship. The following statement updates the z vector for a unit upper triangular U.
If U is upper triangular, the statement becomes
where is the value of uii before it was changed during stage i of the procedure. Along the same lines, the factor update statement
Solving for the updated value of uij yields
Taking these observations into consideration and pulling operations on constants out of the inner loop, Algorithm 9 updates U based on a rank one change to A.