We will show and apply the Law of Cosines which is a relationship among the sides and one angle
of a triangle. Applications will involve solving a triangle: calculating the lengths of sides and the measurement of angles. The Lesson:
We refer to the diagram below of triangle ABC with angle A located at the origin and side c along the x-axis. Therefore point A = (0, 0) and point B = (c, 0). We will set point C = (u, v). Let's Practice:
Using the distance formula, we have:
Using basic right triangle
trig ratios, we know that: u = bsinA and v = bcosA. Substituting we have:
. Collecting like terms and factoring, we get the expression
. Since we know the Pythagorean Identity we can simplify our expression to:
. This is known as the Law of Cosines.
The key to remembering this formula is noticing that the triangle side on the left hand side of the equation is the side opposite the angle used with cosine on the right hand side of the equation. Thus we can write a Law of Cosines for any triangle such as XYZ and choosing any side such as y:
- Suppose a triangle ABC has side a = 4, side b = 7, and angle C = 54º. What is the measure of side C?
We show a diagram below.
According to the Law of Cosines we have:
Solving for c gives us:
- Suppose a triangle XYZ has sides of x = 5, y = 6, and z = 7. What is the measure of the angle across from the side of measure 6?
A diagram is shown below. The angle across from y = 6 is Y.
Solving for Y gives us the answer to our question:
The next three examples show situations in which the quadratic formula
can be used to determine whether or not a triangle
can exist with the given information. In some situations there may be one or possibly two triangles which can exist using the given information.
- Suppose a triangle ABC has side b = 2, side a = 5, and angle B = 27º. Find the measure of side c. We show a diagram below.
Applying the Law of Cosines we have
We can set this expression equal to zero by subtracting 4
giving us a quadratic equation with coefficients 1, -8.91, and 21.
Solutions from the quadratic formula are
. Note that the quantity under the radical is negative and therefore there are no real number solutions. This triangle is impossible to draw because side b is too short to reach side c. The Law of Sines would have given us a clue as well.
Note that we would have NOT used the Law of Sines to solve this problem since we do not know the measures of two angles.
If we try the Law of Sines we have
. Since sine cannot have a value greater than 1, we also see from this application that no such triangle is possible.
- Suppose a triangle ABC has side b = 4, side a = 5, and angle B = 27º. Find the measure of side c.
We show a diagram below.
We will apply the Law of Cosines to find the measure of side c.
We can set this expression equal to zero by subtracting 16
giving us a quadratic equation with coefficients 1, -8.91, and 9.
Using the quadratic formula we obtain the following values for c:
Note that there are two possibilities for the measure of side c.
We can now calculate the measure of angle C (two possibilities) by using the Law of Sines:
. These equations give us the following values for sinC:
. Solving for C we find
From the diagram it appears the angle C opposite the 7.75 side is obtuse. We obtain the obtuse angle by subtracting . This dilemma in using the Law of Sines is created because we have the following fact:
. But note that
. A method to be sure about the size of angle C is to use the Law of Cosines.
So is the measure of angle C equal to 61.59º or 118.41º? Subject to rounding errors
showing us that the Law of Cosines is the easiest way to calculate the measure of this angle.
If c = 1.16, angle A will be .
If c = 7.75, angle A will be .
- Another possibility exists if in triangle ABC we have side a = 5, and angle B = 27º. Suppose side b is perpendicular to side c. A diagram of this case is shown below.
Notice that b and c can be found using the basic definition of sine and cosine since in this case we have triangle ABC as a right triangle.