Projections
The projection of b onto a:
p=a⋅aa⋅ba=aTaaaTb
Projection Matrix
P=aTaaaT
Properties: P2=P, PT=P (idempotent and symmetric).
Projection onto a Subspace
For projecting onto C(A):
P=A(ATA)−1AT
Key Property
The error e=b−p is orthogonal to the projection:
e⊥p