Multiply corresponding components and add. Geometrically \(\vec a\cdot\vec b=\lVert\vec a\rVert\lVert\vec b\rVert\cos\theta\) for nonzero vectors. The result is a scalar.
Two nonzero vectors are perpendicular if their scalar product vanishes. To find a missing component, set the dot product equal to zero and solve for that component.
The signed scalar projection of \(\vec a\) along \(\vec b\) is \((\vec a\cdot\vec b)/\lVert\vec b\rVert\). Multiply it by the unit vector along \(\vec b\) to obtain \(\operatorname{proj}_{\vec b}\vec a=(\vec a\cdot\vec b)\vec b/\lVert\vec b\rVert^2\).