# Law of Cosines

1. Jan 29, 2010

### huntingrdr

1. The problem statement, all variables and given/known data
Prove the law of cosines: If a triangle has sides with lengths a, b, and c, and theta is the angle between the sides a and b, then c^2 = a^2 + b^2 - 2ab*cos(theta).

Hint: Introduce a coordinate system so that theta is in standard position. Express x and y in terms of theta and then use the distance formula to compute c.

2. Relevant equations

3. The attempt at a solution

Don't know really where to begin or what is means.

2. Jan 29, 2010

### Staff: Mentor

Start by drawing a triangle (not a right triangle) in a coordinate system, with sides a and b meeting at the origin. Angle theta is the angle between sides a and b. Find an expression that represents the length of side c.

3. Jan 29, 2010

### huntingrdr

I drew the triangle and c^2 = a^2 + b^2 - 2abcos(theta). How do I represent x & y in terms of theta and use the distance formula to compute c? x & y are the axis and the point P on the triangle is (x,y).

4. Jan 29, 2010

### Staff: Mentor

What do you mean? This is what you're supposed to show.
Sides a and b meet at the origin, and side b is along the x-axis. What are the coordinates for the other end of side a? What are the coordinates for the other end of side b? Use the distance formula to find the length of side c.

5. Jan 29, 2010

### huntingrdr

The coordinates for the other end of b are (x,y) and the coordinates for the other end of a are (a,0). When I used the distance formula I gt c = sqrt((x-a)^2 + (y)^2). Is this right? How am I suppose to PROVE the law of cosines now?

6. Jan 29, 2010

### Staff: Mentor

Forget x and y. Get the coordinates in terms of the lengths of the sides. In your drawing, side a is apparently along the x-axis and side b extends out at an angle theta from the origin. From the endpoint of side b, drop a line segment directly down to the x-axis. Now you have a right triangle inside the larger triangle. What is the x-coordinate at the end of side b? You should be able to write it in terms of b and a trig function involving theta. What is the y-coordinate at the end of side b? You should be able to write it in terms of b and a trig function involving theta.