The vector projection of the vector v onto a non-zero vector d is the component of v that is parallel to d. In mathematical terms,
where is the unit vector in the direction of d.
The projection can also be used to find component of v normal (or orthogonal) to d as follows: