# Shedding some light on the dot product

1. Jan 15, 2013

### cytochrome

The dot product A . B is the magnitude of vector A times the projection of B onto A.

B . A is the magnitude of vector B times the projection of A onto B.

Correct?

A . B = B . A and this makes sense. But, say you're trying to find the components of a vector V in the direction of a vector W. Would it matter whether or not you wrote V . W or W . V?

EDIT: Also, does anyone know what it means (geometrically speaking) to find the components of a vector in the direction of another vector? I can give an example from a book if needed.

2. Jan 15, 2013

### Vorde

To the first question, no it wouldn't matter. The dot product is commutative so $\vec{V} \cdot \vec{W} = \vec{W} \cdot \vec{V}$ for any vectors V and W.

To the edit, imagine you have your vector lying in the plane. Now imagine it is the hypotenuse of a right triangle where one of the sides of the triangle is parallel to the x-axis and the other side is parallel to the y-axis. The component of the main vector (which remember is represented as the hypotenuse) in the x direction is the length of the side of the triangle parallel to the x-axis, and the same for the y direction.

3. Jan 16, 2013

### nasu

It does not matter which way you write. But none of them will give you the component of V along the direction of W.
You need to multiply V by the unit vector along W.
So the magnitude of the projection is given by V.W/W