# Dot product and the law of cosines

1. Jun 28, 2007

### linuspauling

I can't seem to derive the law of cosines from the vector addition of

C = A + B

using the dot product.

Does anybody have any insights?

2. Jun 28, 2007

### Staff: Mentor

Can you show us what you have done so far? Is this homework or coursework? If so, I can move it to the Homework Help forums. In any case, you need to show us what you know so far, in order for us to be of help to you.

3. Jun 28, 2007

### robphy

Just do it...
A picture might help, as well.

4. Jun 28, 2007

### linuspauling

C = A + B

C dot C = |C| squared

and then I'm stuck. by the way, how do you guys post pictures and proper vector and math notations here?

5. Jun 28, 2007

### robphy

Let me get you a little further along. Click on the typeset equations to see how I did them. (You can use the "sigma summation symbol" in the advanced editor view for more TeX symbols via a popup menu.)

$$\vec C=\vec A +\vec B$$

$$\vec C \cdot \vec C = (\vec A +\vec B) \cdot (\vec A +\vec B)$$

6. Jun 28, 2007

### linuspauling

$$\vec C \cdot \vec C = |\vec C|^2$$
$$|\vec C|^2 = |\vec A|^2 + |\vec B|^2 + 2|\vec A||\vec B|cos\theta$$

i'm not really sure how to put up the absolute value sign in proper laTeX notation. And, i'm stuck here...I don't know how these steps came about.

Last edited: Jun 29, 2007
7. Jun 28, 2007

### robphy

Forget the absolute value signs for now.
How do you evaluate (expand out) the right-hand side of the equation I wrote?

8. Jun 29, 2007

### linuspauling

I'm not sure....

$$(\vec A + \vec B) \cdot (\vec A + \vec B) = \vec C \cdot \vec C$$

or

$$= |\vec A|^2 + 2|\vec A||\vec B| + |\vec B|^2$$

is this it?

Last edited: Jun 29, 2007
9. Jun 30, 2007

### robphy

How does the dot-product distribute over addition?
After you do that, then you may start to write terms like $\vec V\cdot \vec V$ as $|\vec V|^2$, for any vector $\vec V$.

Since this discussion is about the law of COSINES, where does a COSINE arise from the dot-product?

10. Jun 30, 2007

### Staff: Mentor

Slow down, you're trying to do too many steps at once. Don't do the absolute value (magnitude) yet, just multiply out the left side of the first equation to get rid of the parentheses. What does that give you?

11. Jun 30, 2007

### ice109

you guys have all missed something crucial

if $$\vec C=\vec A +\vec B$$ then we will not have $$|\vec C|^2$$ on the left hand side of the law of cosines but either but it will be like this

$$\vec B=\vec C -\vec A$$ and it will be $$|\vec B|^2$$ on the left hand side of the law of cosines

12. Jun 30, 2007

### robphy

Using $\vec C=\vec A +\vec B$, the minus sign in the law of cosines that you seek arises when you realize that the "angle between $\vec A$ and $\vec B$" is an external angle of the triangle, which is supplementary to the interior angle at that vertex. Using a little identity for $\cos (\theta+\phi)$, you'll get the minus sign. You don't have to do this for any other side because the "angles between the vectors [on the right-hand side, with a relative minus sign between them]" are already interior angles.