Saturday, April 07, 2007

Projecting a vector



Projection of a vector on to another vector
Suppose we want to project b on a. This is an another vector with the same direction as a. So we will just calculate the component of b along a and multiply it with unit vector of a to get the projection of b on a. The component of b along a is b cos(theta) where theta is the angle between a and b. we know that a.b = a.b.cos(theta).Then proj of b on a = (a.b/a)*(unit vector a)