Original stated goal: Find the projection of b orthogonal to the space V spanned by arbitrary vectors <math>{v_1} , \dots , {v_n}</math>
<MATH>Span \{ v_1^* , \dots , v_n^* \} = Span \{v_1, \dots , v_n\}</MATH>
# output: a list of mutually orthogonal vectors.
def orthogonalize(vlist):
vstarlist = []
for v in vlist:
# project orthogonal find the next orthogonal vector
# and make iteratively a longer and longer list of mutually orthogonal vectors.
vstarlist.append(project_orthogonal(v, vstarlist))
return vstarlist
where:
Lemma: Throughout the execution of orthogonalize, the vectors in vstarlist are mutually orthogonal.
Proof: by induction, using the fact that each vector added to vstarlist is orthogonal to all the vectors already in the list.
If we run the procedure orthogonalize twice, once with a list of vectors and once with the reverse of that list, the output lists will not be the reverses of each other.
<MATH> \begin{bmatrix} \begin{array}{r|r|r|r} \, \: \; \> & \\ \, \: \; \> & \\ \\ v_0 & v_1 & v_2 & \dots & v_n \ \\ \ \\ \end{array} \end{bmatrix} = \begin{bmatrix} \begin{array}{r|r|r|r} v^*_0 & v^*_1 & v^*_2 & \dots & v^*_n \end{array} \end{bmatrix} \begin{bmatrix} 1 & \sigma_{01} & \sigma_{02} & \dots & \sigma_{0n} \\ & 1 & \sigma_{12} & \dots & \sigma_{1n} \\ & & 1 & \dots & \sigma_{2n} \\ & & & \ddots & \vdots \\ & & & & 1 \\ \end{bmatrix} </MATH>
The two matrices on the right are special: