We know that projection of a vector v onto a vector n is given by
(v.n)/(n.n)
and the dot product of these 2 vectors are
(v.n)