x⊥y when ⟨x,y⟩=0. A family is orthogonal when its vectors are pairwise orthogonal, orthonormal when moreover each has norm 1. The orthogonal complement of a subspaceF is
Certification by the norm formula of the proposition:
29+625+316=627+25+32=14=∥x∥2=1+4+9.
This sum-of-squared-coordinates check (a finite Parseval identity) costs seconds and catches sign and normalization errors with near certainty — make it a habit whenever an orthonormal expansion is computed; its infinite-dimensional version, for the Fourier coefficients of Example 23.14, is a theorem of the Year 3 volume.
Example 23.9(Gram–Schmidt on polynomials, in full)
Orthonormalize (1,X,X2) in R2[X] with ⟨P,Q⟩=∫01PQ. Step 1: ∥1∥2=1, so e1=1. Step 2: w2=X−⟨X,1⟩1=X−21, and ∥w2∥2=∫01(x−21)2dx=121: e2=12(X−21). Step 3: ⟨X2,e1⟩=31 and
Its norm was computed in Exercise 23.9: ∥w3∥2=1801, whence e3=180(X2−X+61). The polynomials1, X−21, X2−X+61 are, up to scale, the first Legendre polynomials of the interval[0,1]; the construction continues one degree at a time, each new polynomialorthogonal to all its predecessors. Note how the algorithm recycles earlier work: the projection subtracted at step 3 is exactly the best affine approximation of X2 found in Example 23.12 — Gram–Schmidt is iterated orthogonal projection.
Example 23.11(Projections never lengthen)
Applying Pythagoras to the split x=pF(x)+(x−pF(x)):
∥pF(x)∥2=∥x∥2−∥x−pF(x)∥2≤∥x∥2,
with equality iff x∈F. In an orthonormalbasis(e1,…,ek) of F this reads ∑i≤k⟨x,ei⟩2≤∥x∥2 (a Bessel inequality): however many orthonormal directions one measures, the squared coordinates never exceed the squared length — compare the exact equality of Example 23.7 when the family is a full basis. This one-line inequality is what makes Fourier coefficients summable in the Year 3 volume; here it already explains why adding more basis functions to a least squares fit can only decrease the residual.