Dan Taylor     About     Archive     Feed     Misc     Sunday School

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=P

is 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 vrange(P). Then it lies in it’s own shadow. That is if v=Px for some x then

Pv=P2x=Px=v.

If vrange(P), then vPv and we can consider the vector Pvv. This is the vector from v to Pv. Applying P to this vector will give us 0:

P(Pvv)=P2vPv=0.

So Pvvnull(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 IP, since

(IP)2=(IP)(IP)=I2P+P2=IP.

The projector IP is the complementary projector of P.

But what is the range of the projector (IP)? It is the nullspace of P! To see this notice that if Pv=0, then (IP)v=v so range(IP)null(P). But we also have that for any v, (IP)v=vPvnull(P), so range(IP)null(P) and thus

range(IP)=null(P).

By the exact same argument (but making the substitution P=IP) we get that

range(P)=null(IP).

So, P and IP 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 xS1 and yS2, then xy=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 PxS1 and (IP)yS2 is zero:

(Px)(IP)y=xP(IP)y=x(PPP)y=x(PP2)y=0.

So the projector is orthogonal.

For the other direction we can use the SVD. Suppose P projects onto S1 along S2 and S1S2 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 jn 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=(|||q1qn0|||)

and

QPQ=(110)=Σ

is a diagonal matrix with ones along the first n entries and zeros in the remaining mn 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 yrange(A), we must have that the difference yv is orthogonal to range(A). This is equivalent to saying that aj(yv)=0 for all j. Since this is true for all j, we can write A(Axv)=0 or

AAx=Av

which is the normal equation. Since A has full rank AA is invertible and

x=(AA)1Av

Then the projection y of the vector v, y=Ax in the space spanned by the columns of A, is given by y=A(AA)1Av. So the orthogonal projector, P onto range(A) is given by

P=A(AA)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.