# Vectors Dot Product

1. Oct 21, 2013

### Justabeginner

1. The problem statement, all variables and given/known data
Prove that if u and v are nonzero vectors, and theta is the angle between them then u dot product v = ||u|| ||v|| cos (theta). Consider the triangle with sides u ,v , and u-v. The Law of Cosines implies that ||u-v||^2 = ||u||^2 + ||v||^2 - 2||u|| ||v|| cos(theta). On the other hand, ||u-v||^2 = (u-v) dot product (u-v)... Simplify this last expression, then equate the two formulas for ||u-v||^2.

2. Relevant equations

3. The attempt at a solution

I have no idea how to start! I thought of doing
cos(theta)= uxvx + uyvy / sqrt[(uxvy- vxuy)^2] + (uxvx + uyvy)^2] When x and y are subscripts, because
u= uxi + uyj
v= vxi + vyj

2. Oct 21, 2013

### CAF123

Expand the dot product $(u-v) \cdot (u-v)$ using distributivity.

3. Oct 21, 2013

### Justabeginner

Yes I did that, and I get u^2 - 2uv + v^2.
But as for the left side ||u-v||^2, I get [sqrt(u^2 + v^2)]^2 = u^2 + v^2.
That isn't equal though.

4. Oct 21, 2013

### CAF123

Since u and v are vectors, you should write that as||u||2-2(u . v) + ||v||2. Now compare this with the law of cosines.

5. Oct 21, 2013

### Justabeginner

So how is -2 ( u dot v) = -2 ||u|| ||v|| cos theta?
I don't understand. I thought once you take the norm of u and v you'll be left with -2 u times v cos theta?

6. Oct 21, 2013

### CAF123

The full expression before simplification is $u \cdot u -2(u \cdot v) + v \cdot v$. The middle term is a projection, while the first and third terms are the norm of the vectors squared (which is also the projection of a vector onto itself)