The projection of v onto u, where u and v are both vectors in the same dimension euclidean vector space is as follows:
(u • v) ------------ u |u|2
(u • v) u