why to calculate unit vectors before calculating their dot product?

Could someone explain this to me?

- Mar 2nd 2011, 08:17 PMprobladywhy to calculate unit vectors before calculating their dot product?
why to calculate unit vectors before calculating their dot product?

Could someone explain this to me? - Mar 2nd 2011, 08:32 PMdwsmith
- Mar 2nd 2011, 09:20 PMproblady
Lets assume I have many vectors with different lengths and I would like to calculate their angle etc. To do that I need dot product ... but since they have different length is suggested to normalize them (unit vector them) and later take the dot product... so my question is why we need to "unit vector them" first etc. THANKS

- Mar 3rd 2011, 02:18 AMmr fantastic
- Mar 3rd 2011, 02:41 AMAckbeet
I would say you don't. It's six of one, a half-dozen of the other. The formula for dot product is

$\displaystyle \mathbf{a}\cdot\mathbf{b}=\|\mathbf{a}\|\,\|\mathb f{b}\|\cos(\theta),$ or

$\displaystyle \cos(\theta)=\dfrac{\mathbf{a}\cdot\mathbf{b}}{\|\ mathbf{a}\|\,\|\mathbf{b}\|},$

where $\displaystyle \theta$ is the angle between them. If $\displaystyle \mathbf{a},\mathbf{b}$ are unit vectors (you've normalized them), then the formula reduces down to

$\displaystyle \mathbf{a}\cdot\mathbf{b}=\cos(\theta).$

However, you've had to do the work of normalizing. So it's either normalize first and use a slightly simplified dot product formula, or just use the full dot product formula. You'll have to divide by the lengths either way.