Keywords: orthogonal projector · subspace · Gram--Schmidt · complementary projector · distance to a subspace · best approximation
Exercise 1 : Orthogonal projector onto a plane
In R3, viewed as a real subspace of C3 equipped with the usual inner product, consider the plane F spanned by the vectors ∣a⟩=(1,−1,0) and ∣b⟩=(1,0,−1), together with the unit vector ∣n⟩=31(1,1,1).
Question 1
Construct an orthonormal basis (∣e1⟩,∣e2⟩) of F, then find the matrix of the orthogonal projector P^=∣e1⟩⟨e1∣+∣e2⟩⟨e2∣ onto F.
Solution
The vectors ∣a⟩ and ∣b⟩ are not orthogonal, since ⟨a∣b⟩=1. We apply the Gram—Schmidt procedure. First, ∣e1⟩=21(1,−1,0). Next, ⟨e1∣b⟩=21, and
∣b⟩−⟨e1∣b⟩∣e1⟩=(1,0,−1)−21(1,−1,0)=(21,21,−1),
whose norm is 3/2, hence ∣e2⟩=61(1,1,−2). The matrices of the two rank-one projectors are
Verify that P2=P,P†=P and trP=2. Calculate P∣n⟩, and show that P=1−∣n⟩⟨n∣. Interpret the result.
Solution
The matrix P is real and symmetric, so P†=P. Its trace is 31(2+2+2)=2, the dimension of F. For the square, for example, we calculate the first entry: 91(2⋅2+(−1)(−1)+(−1)(−1))=96=32, and the second: 91(2⋅(−1)+(−1)⋅2+(−1)(−1))=−93=−31; the other entries follow by symmetry, and P2=P. This may also be obtained without calculation, from ⟨ei∣ej⟩=δij.
The vectors ∣a⟩ and ∣b⟩ are orthogonal to ∣n⟩, since the sum of their components is zero: F is the plane orthogonal to ∣n⟩. We verify that P∣n⟩=331(2−1−1,...)=0. Now ∣n⟩⟨n∣=31J, where J is the matrix all of whose entries are equal to 1, and 1−31J is exactly the matrix P. The projector onto F is the complementary projector to the projector onto the orthogonal line: (∣e1⟩,∣e2⟩,∣n⟩) is an orthonormal basis of R3, and the closure relation reads ∣e1⟩⟨e1∣+∣e2⟩⟨e2∣+∣n⟩⟨n∣=1.
Question 3
Calculate the orthogonal projection of the vector ∣x⟩=(1,2,3) onto F, then the distance from ∣x⟩ to the plane F.
Solution
The simplest method is to use P=1−∣n⟩⟨n∣. We have ⟨n∣x⟩=31(1+2+3)=36, hence
P∣x⟩=∣x⟩−⟨n∣x⟩∣n⟩=(1,2,3)−36(1,1,1)=(−1,0,1).
We verify that this vector does belong to F (the sum of its components is zero). The orthogonal component is ∣x⟩−P∣x⟩=(2,2,2), and the distance from ∣x⟩ to the plane is ∥(2,2,2)∥=23.
Question 4
Show that P∣x⟩ is the vector in F closest to ∣x⟩: for every ∣y⟩∈F,∥x−y∥≥∥x−Px∥.
Solution
Write ∣x⟩−∣y⟩=(∣x⟩−P∣x⟩)+(P∣x⟩−∣y⟩). The first vector belongs to F⊥, since (1−P) is the projector onto F⊥, and the second belongs to F, since P∣x⟩ and ∣y⟩ are in F. These two vectors are orthogonal, and the Pythagorean theorem gives
∥x−y∥2=∥x−Px∥2+∥Px−y∥2≥∥x−Px∥2,
with equality if and only if ∣y⟩=P∣x⟩. Orthogonal projection yields the best approximation of a vector by a vector in the subspace: this is what justifies, in infinite dimension, approximating a function by the first terms of its expansion in a Hilbert basis.