Reason: Proof of the Gram-Schmidt lemma by induction with the subtract-and-normalize step.
Proof
All dot products are those of Rn, and β β is the positive square root. We use that vβ v=βjβvj2ββ₯0, with vβ v>0 exactly when v is not the zero vector, directly from the definition of the dot product. The proof is by induction on r.
Base r=1. If x1β=0, the first alternative holds. Otherwise set s=x1ββ x1ββ>0 and e1β=(1/s)x1β. Then e1ββ e1β=(1/s2)x1ββ x1β=1, so (e1β) is an orthonormal family with p=1β€r; moreover x1ββ e1β=(1/s)x1ββ x1β=s, so x1β=se1β=(x1ββ e1β)e1β, proving part 1, and part 2 holds with c11β=1/s.
Step from rβ1 to r, rβ₯2. Apply the induction hypothesis to x1β,β¦,xrβ1β. There are two cases.
Case (i): x1β,β¦,xrβ1β are all zero. If also xrβ=0, the first alternative holds. Otherwise the base construction applied to xrβ yields an orthonormal family (e1β) with xrβ=(xrββ e1β)e1β and e1β=cxrβ for a real c; part 1 holds for i<r as well, since xiβ=0 and xiββ e1β=0; and p=1β€r.
Case (ii): the induction hypothesis provides pβ²β€rβ1 and an orthonormal family e1β,β¦,epβ²β with parts 1 and 2 for x1β,β¦,xrβ1β. Define
y=xrββu=1βpβ²β(xrββ euβ)euβ.
For each 1β€uβ²β€pβ², bilinearity of the dot product (immediate from its definition as a finite sum) and orthonormality give
If y=0, keep the family e1β,β¦,epβ²β and p=pβ²β€r: part 1 for xrβ reads xrβ=βuβ(xrββ euβ)euβ, which is exactly y=0; parts 1 and 2 for the remaining data are inherited.
If yξ =0, set s=yβ yβ>0 and epβ²+1β=(1/s)y, and take p=pβ²+1β€r. Then epβ²+1ββ epβ²+1β=1 and epβ²+1ββ euβ²β=(1/s)yβ euβ²β=0 for uβ²β€pβ², so e1β,β¦,epβ²+1β is an orthonormal family. Part 1: for i<r, part 1 of the induction hypothesis gives xiβ=βuβ€pβ²β(xiββ euβ)euβ, and then xiββ epβ²+1β=βuβ€pβ²β(xiββ euβ)(euββ epβ²+1β)=0, so the expansion over uβ€pβ²+1 adds only a zero term. For i=r: from the definition of y,
and xrββ epβ²+1β=yβ epβ²+1β+βuβ€pβ²β(xrββ euβ)(euββ epβ²+1β)=(1/s)yβ y=s, so the displayed identity is the required expansion. Part 2: each euβ with uβ€pβ² is a linear combination of x1β,β¦,xrβ1β by the induction hypothesis, and
is a linear combination of xrβ and of e1β,β¦,epβ²β; substituting the expressions of the euβ in terms of x1β,β¦,xrβ1β and collecting coefficients exhibits epβ²+1β as a linear combination of x1β,β¦,xrβ. This completes the induction. β