Home [Linear Algebra] 4.2 Projections
Post
Cancel

[Linear Algebra] 4.2 Projections

Keywords

[1] The projection of a vector b onto the line through a is the closest point p=aaTbaTa

[2] The error e=bp is perpendicular to a: Right triangle bpe has p2+e2=b2

[3] The projection of b onto a subspace S is the cloest vector p in S; bp is orthogonal to S.

[4] ATA is invertible (and symmetric) only if A has independent columns: N(ATA)=N(A)

[5] Then the projection of b onto the column space A is the vector p=A(ATA)1ATb

[6] The projection matrix onto C(A) is p=A(ATA)1AT. It has p=Pb and P2=P=PT

Project onto a Line

joint
Introduction to Linear Algebra, 5th edition

Suppose a line a going through the origin. Along that line, we want to find the point p closest to b. The key to projection is orthogonality

The line from b to p is perpendicular to the vector a.

Then, the projection p will be some multiple of a so we call p=x^a.

Now we use a bit of algebra.

e=bp p=x^a e=bx^a aT(bx^a)=0, since a is perpendicular to e x^aTa=aTb x^=aTbaTa p=aTbaTaa

The projection of b onto the line through a is the vector p=x^a=aTbaTaa

Special cases

[1] If b=a then x^=1. Then, the projection of a onto a is itself: Pa=a

[2] If b is perpendicular to a, then aTb=0 so the projection is p=0

Projection Matrix P

In the formula of p, what matrix is multiplying b? We can decompose it into

p=aTbaTaa=(aaTaTa)b=Pb

The projection matrix P=aaTaTa

The rank of P is 1 and p is in C(P).

Projection onto a Subspace

joint
Introduction to Linear Algebra, 5th edition

Suppose n vectors a1,...,an in Rm and these a’s are linearly independent. Now, we want to find the combination p=x1^a1++xn^an closest to a given vector b.

We suppose the matrix A has columns as a1,...,an. The combinations in Rm are the vectors Ax in the column space. We’re looking for the particular combination p=Ax^, the projection, that is closest to b.

Then,

p=Ax^ e=bp e=bAx^

But e is perpendicular to A,

AT(bAx^)=0 ATb=ATAx^

Hence, we get

x^=(ATA)1ATb p=Ax^=A(ATA)1ATb P=A(ATA)1AT

where p is the projection of b onto A and P is the projection matrix.

Notice that since e is orthogonal to C(A), e is in the left-nullspace N(AT). Also, ATA is invertible only if A has linearly independent columns.

The projection matrix satisfies PT=P,P2=P, and Pb=p

References

[1] Introduction to Linear Algebra, 5th edition

This post is licensed under CC BY 4.0 by the author.
Trending Tags