(of a vector on a vector)
Given non-zero vectors a and b, let and be directed line-segments representing a and b, and let θ be the angle between them (θ in radians, with 0≤θ≤π). Let C be the projection of B on the line OA. The vector projection of b on a is the vector represented by Since |OC|=|OB|cosθ, this vector projection is equal to |b|cosθ times the unit vector a/|a|. Thus the vector projection of b on a equalsThe scalar projection of b on a is equal to (a. b)/|a|, which equals |b|cosθ. It is positive when the vector projection of b on a is in the same direction as a, and negative when the vector projection is in the opposite direction to a; its absolute value gives the length of the vector projection of b on a.