Projectors and Least Squares
Here, we will take a look at projection matrices and finish up with looking again at the principle of least squares.
Projectors
A square matrix P such that
P2=Pis said to be a projection matrix. The projection need not be orthogonal, if P is indeed not orthogonal, we may call it oblique.
Projectors are named such since they can be thought of as the result of shining a light on range(P) from just the right direction. So that Pv is the shadow of v.
But from what direction does the light shine? To answer that question first consider if v∈range(P). Then it lies in it’s own shadow. That is if v=Px for some x then
Pv=P2x=Px=v.If v∉range(P), then v≠Pv and we can consider the vector Pv−v. This is the vector from v to Pv. Applying P to this vector will give us 0:
P(Pv−v)=P2v−Pv=0.So Pv−v∈null(P). So for any v, the direction that the light is shining from may be different, but it will be a vector in null(P).
Complementary Projectors
If P is a projector, so is the matrix I−P, since
(I−P)2=(I−P)(I−P)=I−2P+P2=I−P.The projector I−P is the complementary projector of P.
But what is the range of the projector (I−P)? It is the nullspace of P! To see this notice that if Pv=0, then (I−P)v=v so range(I−P)⊇null(P). But we also have that for any v, (I−P)v=v−Pv∈null(P), so range(I−P)⊆null(P) and thus
range(I−P)=null(P).By the exact same argument (but making the substitution P=I−P) we get that
range(P)=null(I−P).So, P and I−P split the space Cm into two subspaces, S1 and S2 whose intersection is the singleton 0. If range(P)=S1 and null(P)=S2, we say that the projector P projects onto the space S1 along the space S2.
Orthogonal Projectors
An orthogonal projector is one that projects onto one subspace, S1 along another space, S2 such that S1 and S2 are orthogonal to each other (that is if x∈S1 and y∈S2, then x∗y=0). Another useful definition is that in addition to the criterion for projection matrices above in (1), an orthogonal projection matrix is also Hermitian with P∗=P.
Theorem: A projector P is orthogonal if and only if P=P∗.
Proof If P∗=P then the inner product between a vector Px∈S1 and (I−P)y∈S2 is zero:
(Px)∗(I−P)y=x∗P∗(I−P)y=x∗(P∗−P∗P)y=x∗(P−P2)y=0.So the projector is orthogonal.
For the other direction we can use the SVD. Suppose P projects onto S1 along S2 and S1⊥S2 and that S1 has dimension n. The we can form the SVD of P as follows. Let q1,…,qm be an orthonormal basis for Cm where q1,…,qn is a basis for S1 and qn+1,…,qm is a basis for S2. For j≤n we have Pqj=qj and for j>n we have Pqj=0. Now, let Q be the unitary matrix whose jth column is qj. Then clearly,
PQ=(|||q1⋯qn0⋯|||)and
Q∗PQ=(1⋱10⋱)=Σis a diagonal matrix with ones along the first n entries and zeros in the remaining m−n diagonal entries. Thus we have the following SVD of P:
P=QΣQ∗.Then to see that P is hermitian we simply look at the conjugate transpose:
P∗=(QΣQ∗)∗=QΣ∗Q∗=QΣQ∗=P◻Projection with an Arbitrary Basis (and Least Squares)##
An orthogonal projector can be constructed from an arbitrary set set n linearly independent vectors in Cm (not necessarily orthogonal). Suppose that the n-dimensional space is spanned by the linearly independent set of vectors, a1,…,an and let A be the m×n matrix whose jth column is aj.
If A is orthogonal, then in passing from the vector v to it’s orthogonal projection y∈range(A), we must have that the difference y−v is orthogonal to range(A). This is equivalent to saying that a∗j(y−v)=0 for all j. Since this is true for all j, we can write A∗(Ax−v)=0 or
A∗Ax=A∗vwhich is the normal equation. Since A has full rank A∗A is invertible and
x=(A∗A)−1A∗vThen the projection y of the vector v, y=Ax in the space spanned by the columns of A, is given by y=A(A∗A)−1A∗v. So the orthogonal projector, P onto range(A) is given by
P=A(A∗A)−1A∗.Note While this is yet again looking at the principle of least squares, I am convinced that it is better to be the master of a few fundamental ideas than it is to have a dabbling knowledge of many different techniques. I don’t claim that this is true for me (the mastery part I mean) but am simply striving to emphasize the importance of returning to familiar ideas to increase the depth of understanding.