Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

The Law of Cosines

Author: Sophia

1. Using the Law of Cosines to Solve Oblique Triangles

Consider an oblique triangle. Another set of relationships that can be used to find unknown sides and angles of an oblique triangle is known as the law of cosines.

Remember:

  • Side a is opposite angle alpha.
  • Side b is opposite angle beta.
  • Side c is opposite angle gamma.
formula to know
The Law of Cosines
table attributes columnalign left end attributes row cell a squared equals b squared plus c squared minus 2 b c   cos   alpha end cell row cell b squared equals a squared plus c squared minus 2 a c   cos   beta end cell row cell c squared equals a squared plus b squared minus 2 a b   cos   gamma end cell end table

For simplicity, the law of cosines is used when either the side on the left side of the equation is not known or the angle is unknown.

1a. The Side-Angle-Side Case (SAS)

EXAMPLE

A triangle has sides a equals 40 comma b equals 30 comma and angle gamma equals 88 degree. Find the remaining side and angles.

The angle gamma equals 88 degree is included between the given sides, which means the law of cosines can be used to find the unknown side.

c squared equals a squared plus b squared minus 2 a b   cos   gamma Use this version since gamma was given.
c squared equals 40 squared plus 30 squared minus 2 open parentheses 40 close parentheses open parentheses 30 close parentheses   cos   88 degree Replace known sides and angles by their values.
c squared almost equal to 2416.241208 Approximate the right side.
c almost equal to 49 Apply the square root principle to find the value of c. Note that only the positive solution is considered.

Next, find one of the unknown angles. Now that we know the value of c, we can use the law of sines since c is opposite gamma. However, remember that we need to check the second solution that comes from the law of sines.

When solving for an angle using the law of cosines, the inverse cosine function is used. Recall that this function returns an angle between 0 degree and 180 degree inclusive, meaning that there is only one unique answer for the angle.

To find alpha comma we will use the law of cosines.

a squared equals b squared plus c squared minus 2 b c   cos   alpha Use this version since it contains alpha.
40 squared equals 30 squared plus 2416.241208 minus 2 open parentheses 30 close parentheses open parentheses 49 close parentheses   cos   alpha Substitute all known values. To preserve accuracy, note that c squared almost equal to 2416.241208 from above is used.
1600 equals 3316.241208 minus 2940   cos   alpha Simplify.
cos   alpha almost equal to 0.5837555129 Subtract 3316.241208 from both sides, then divide both sides by -2940 to isolate cos   alpha on one side.
alpha almost equal to 54.28 degree Apply the inverse cosine function and then round alpha to two decimal places.

Now that two angles are known, find the angle :

beta equals 180 degree minus 88 degree minus 54.28 degree equals 37.72 degree

Here is the set of all sides and angles in this triangle, rounded to the nearest degree:

Sides Angles
a equals 40 alpha almost equal to 54 degree
b equals 30 beta almost equal to 38 degree
c almost equal to 49 gamma equals 88 degree

try it
A triangle has sides b equals 80 and c equals 90 comma with included angle alpha equals 140 degree. All sides are measured in inches.
Find the length of side a to the nearest whole inch.
Use the law of cosines: a squared equals b squared plus c squared minus 2 b c   cos   alpha

a squared equals 80 squared plus 90 squared minus 2 open parentheses 80 close parentheses open parentheses 90 close parentheses cos   140 degree Substitute all given values into the equation.
a squared equals 25531.03998... Approximate the right-hand side.
a almost equal to 159.78 Apply the square root principle.
a almost equal to 160 Round to the nearest whole number.
Find the measure of angle β.
To find angle beta comma use this version of the law of cosines: b squared equals a squared plus c squared minus 2 a c   cos   beta

80 squared equals open parentheses 159.78 close parentheses squared plus 90 squared minus 2 open parentheses 159.78 close parentheses open parentheses 90 close parentheses cos   beta Substitute all given values into the equation.
6400 equals 33629.6484 minus 28760.4   cos   beta Simplify.
short dash 27229.6484 equals short dash 28760.4   cos   beta Subtract 33629.6484 from both sides.
0.9467757194 equals cos   beta Divide both sides by -28760.4, approximate.
beta equals cos to the power of short dash 1 end exponent open parentheses 0.9467757194 close parentheses Apply the inverse cosine.
beta almost equal to 19 degree Approximate.
Find the measure of angle γ.
Now that we know two angles, the last unknown angle, gamma comma is 180 degree minus 140 degree minus 19 degree equals 21 degree.

1b. The Side-Side-Side Case (SSS)

When three lengths are given, the law of cosines can be used to determine the angles opposite each side.

EXAMPLE

A triangle is to have sides with lengths a equals 10 comma b equals 12 comma and c equals 18. Find the angles of the triangle to the nearest degree.

First, find gamma.

c squared equals a squared plus b squared minus 2 a b   cos   gamma Use the formula that contains gamma.
18 squared equals 10 squared plus 12 squared minus 2 open parentheses 10 close parentheses open parentheses 12 close parentheses   cos   gamma Substitute known quantities.
324 equals 244 minus 240   cos   gamma Simplify.
80 equals short dash 240   cos   gamma
cos   gamma equals short dash 1 third
Isolate cos   gamma on one side.
gamma equals cos to the power of short dash 1 end exponent open parentheses short dash 1 third close parentheses Apply the inverse cosine function.
gamma almost equal to 109.47 degree Approximate to two decimal places.

Therefore, gamma almost equal to 109.47 degree.

Next, use the law of cosines again to find another angle. For this example, we will find beta.

b squared equals a squared plus c squared minus 2 a c   cos   beta Use the formula that contains beta.
12 squared equals 10 squared plus 18 squared minus 2 open parentheses 10 close parentheses open parentheses 18 close parentheses   cos   beta Substitute known quantities.
144 equals 424 minus 360   cos   beta Simplify.
short dash 280 equals short dash 360   cos   beta
cos   beta equals 7 over 9
Isolate cos   beta on one side.
beta equals cos to the power of short dash 1 end exponent open parentheses 7 over 9 close parentheses Apply the inverse cosine function.
beta almost equal to 38.94 degree Approximate to two decimal places.

Now, we know that gamma almost equal to 109.47 degree and beta almost equal to 38.94 degree.

Since 180 degree minus 109.47 degree minus 38.94 degree equals 31.59 degree comma here is the set of all sides and angles in this triangle, rounded to the nearest degree:

Sides Angles
a equals 10 alpha almost equal to 32 degree
b equals 12 beta almost equal to 39 degree
c equals 18 gamma almost equal to 109 degree

watch
This video shows how to find the angles of a triangle for the SSS case.

try it
A triangle is to have sides whose lengths are a equals 20 comma b equals 24 comma and c equals 25.
Find the measure of angle α to two decimal places.
To find angle alpha comma use the equation a squared equals b squared plus c squared minus 2 b c   cos   alpha.

20 squared equals 24 squared plus 25 squared minus 2 open parentheses 24 close parentheses open parentheses 25 close parentheses cos   alpha Replace the values of a comma b, and c in the equation.
400 equals 1201 minus 1200   cos   alpha Simplify.
short dash 801 equals short dash 1200   cos   alpha Subtract 1201 from both sides.
cos   alpha equals 801 over 1200 Divide both sides by -1200, then cancel negatives.
alpha equals cos to the power of short dash 1 end exponent open parentheses 801 over 1200 close parentheses Apply the inverse cosine function.
alpha almost equal to 48.13 degree Approximate the angle to the nearest hundredth.
Find the measure of angle β to two decimal places.
To find angle beta comma use the equation b squared equals a squared plus c squared minus 2 a c   cos   beta.

24 squared equals 20 squared plus 25 squared minus 2 open parentheses 20 close parentheses open parentheses 25 close parentheses cos   beta Replace the values of a comma b, and c in the equation.
576 equals 1025 minus 1000   cos   beta Simplify.
short dash 449 equals short dash 1000   cos   beta Subtract 1025 from both sides.
cos   beta equals 0.449 Divide both sides by -1000, then convert to decimal (since the denominator is 1000).
beta equals cos to the power of short dash 1 end exponent open parentheses 0.449 close parentheses Apply the inverse cosine function.
beta almost equal to 63.32 degree Approximate the angle to the nearest hundredth.


2. Finding the Area of an Oblique Triangle

2a. Finding the Area of an Oblique Triangle Given Two Sides and Their Included Angle

An acute triangle is a triangle in which all angles are less than 90 degree. An obtuse triangle is a triangle in which one angle is more than 90 degree.

Recall that the area of a triangle is A equals 1 half open parentheses base close parentheses open parentheses height close parentheses.

Acute Triangle Obtuse Triangle

In order to find the area of an oblique triangle, we need an expression for the height.

In the acute triangle, we have sin   alpha equals h over c comma which means h equals c   sin   alpha.

In the obtuse triangle, we have sin   alpha apostrophe equals h over c comma which means h equals c   sin   alpha apostrophe.

  • Note that alpha apostrophe equals 180 degree minus alpha.
  • By using a difference of angles identity, sin open parentheses 180 degree minus alpha close parentheses equals sin   alpha.
  • Therefore, sin   alpha apostrophe equals sin   alpha.
Thus, in both cases, h equals c   sin   alpha.

This means that the area of the triangle is A equals 1 half b open parentheses c   sin   alpha close parentheses equals 1 half b c   sin   alpha.

Note that in this formula, angle alpha is formed by sides b and c, meaning that alpha is the included angle of sides b and c.

Using the formula we derived above, there are two other versions of this form of the area of a triangle.

formula to know
Area of a Triangle, Two Sides and Their Included Angle Given
table attributes columnalign left end attributes row cell A equals 1 half b c   sin   alpha end cell row cell A equals 1 half a c   sin   beta end cell row cell A equals 1 half a b   sin   gamma end cell end table

EXAMPLE

A triangle has two sides, one of length 50 cm and the other of length 90 cm, and an angle of 110 degree between the sides. Find the area of the triangle to the nearest whole number.

Let b equals 50 comma c equals 90 comma and alpha equals 110 degree.

Then, A equals 1 half open parentheses 50 close parentheses open parentheses 90 close parentheses   sin   110 degree almost equal to 2 comma 114 space cm squared.

try it
Consider the triangle shown below.

terms to know
Acute Triangle
A triangle in which all angles are less than 90 degree.
Obtuse Triangle
A triangle in which one angle is more than 90 degree.
Included Angle
An angle between two sides of a triangle.

2b. Using Heron’s Formula to Find the Area of a Triangle

From earlier, the area of an oblique triangle is found by knowing two sides and the included angle. When three sides of a triangle are known, it is not necessary to find one of the angles in order to find the area of the triangle.

formula to know
Heron’s Formula
Suppose a triangle has sides with lengths a comma b, and c. Let s equals fraction numerator a plus b plus c over denominator 2 end fraction comma which is called the semiperimeter of the triangle.

Then, the triangle has area A equals square root of s open parentheses s minus a close parentheses open parentheses s minus b close parentheses open parentheses s minus c close parentheses end root.

EXAMPLE

A triangle has sides with lengths a equals 10 comma b equals 12 comma and c equals 18 comma where all sides are measured in feet. Then, we can use Heron’s formula to find the area of the triangle to the nearest tenth, as follows.

s equals fraction numerator 10 plus 12 plus 18 over denominator 2 end fraction equals 20 Find the semiperimeter using the given sides.
A equals square root of 20 open parentheses 20 minus 10 close parentheses open parentheses 20 minus 12 close parentheses open parentheses 20 minus 18 close parentheses end root Substitute all known values into Heron’s formula.
A almost equal to 56.6 Approximate to the nearest tenth.

The area of the triangle is approximately 56.6 space ft squared.

watch
A realtor measures the sides of a triangular lot to find the area in square feet. Check out this video to see this application of Heron’s formula.

try it
A triangle has sides measuring 20 ft, 24 ft, and 25 ft.
Use Heron’s formula to find the area of the triangle, rounded to the nearest tenth.
First, find the semi-perimeter, s:

s equals fraction numerator 20 plus 24 plus 25 over denominator 2 end fraction equals 34.5

Then, apply Heron’s formula:

A equals square root of s open parentheses s minus a close parentheses open parentheses s minus b close parentheses open parentheses s minus c close parentheses end root</dd></dl></dd></dl>
space space space equals square root of 34.5 open parentheses 34.5 minus 20 close parentheses open parentheses 34.5 minus 24 close parentheses open parentheses 34.5 minus 25 close parentheses end root
space space space equals square root of 49899.9375 end root
space space space almost equal to 223.4 space square space feet


3. Solving Applied Problems Using the Law of Cosines

We can now expand our abilities to solve application problems to situations modeled by oblique triangles that lend themselves to using the law of cosines to find unknown information.

EXAMPLE

A surveyor has made the following measurements at two ends of the lake. What is the approximate distance across the lake to the nearest foot?



Let a equals the unknown side. Then, alpha equals 70 degree. Since the other two sides are known, we then use the law of cosines to find the length of the lake.

a squared equals b squared plus c squared minus 2 b c   cos   alpha Use this version of the law of cosines since it contains alpha.
a squared equals 800 squared plus 900 squared minus 2 open parentheses 800 close parentheses open parentheses 900 close parentheses   cos   70 degree Let b equals 800 and c equals 900. This is an arbitrary choice. The calculation does not change if b equals 900 and c equals 800.
a squared almost equal to 957490.9936 Simplify.
a almost equal to 979 Apply the square root principle. Note that only the positive solution is considered.

Thus, the lake is approximately 979 feet across.

hint
In the formulas for the law of cosines, note that the placement of the angle and its opposite side is important. Therefore, if the problem doesn’t have a name for an angle, you are free to choose one. If you choose alpha comma then make sure the side opposite the angle is named a. Once that is established, it doesn’t matter which side is called b and which is called c.

try it
A satellite calculates the angle and the distances shown in the figure, which are not drawn to scale.

To the nearest kilometer, how far apart are the two cities?
Let a equals the distance between the two cities. The two given sides along with a make up a triangle. Let alpha equals the angle opposite side a. We solve this problem using the law of cosines, which uses the formula a squared equals b squared plus c squared minus 2 b c   cos   alpha.

a squared equals 370 squared plus 350 squared minus 2 open parentheses 370 close parentheses open parentheses 350 close parentheses   cos   2.1 degree Use b equals 370 comma c equals 350 comma and alpha equals 2.1 degree. (Note: b and c are interchangeable.)
a squared equals 573.9460113... Simplify the right-hand side and approximate (carry decimal places).
a almost equal to 24 km Take the square root and round to the nearest kilometer.

The cities are about 24 km apart.

hint
When solving a triangle, be sure to be consistent with labeling sides a comma b, and c and angles alpha comma beta comma and gamma comma also remembering that side a is opposite angle alpha comma side b is opposite angle beta comma and side c is opposite angle gamma. It’s also very helpful to organize your work with a table such as the one below to emphasize these relationships:

a equals alpha equals
b equals beta equals
c equals gamma equals

summary
In this lesson, you learned how to use the law of cosines to solve oblique triangles—in other words, finding unknown sides and angles—when either the side on the left side of the equation is not known (the side-angle-side case, or SAS) or the angle is unknown (the side-side-side case, or SSS). You also learned how to find the area of an oblique triangle, by applying the formula for the area of an oblique triangle given two sides and their included angle. In addition, you learned that if the three side lengths are known, you can find the area of a triangle by using Heron’s formula. Finally, you explored solving applied problems using the law of cosines, in scenarios that are modeled by triangles with either all three sides or two sides with an included angle given.

SOURCE: THIS WORK IS ADAPTED FROM PRECALCULUS BY JAY ABRAMSON. ACCESS FOR FREE AT OPENSTAX.ORG/BOOKS/PRECALCULUS/PAGES/1-INTRODUCTION-TO-FUNCTIONS

Terms to Know
Acute Triangle

A triangle in which all angles are less than 90 degree.

Included Angle

An angle between two sides of a triangle.

Obtuse Triangle

A triangle in which one angle is more than 90 degree.

Formulas to Know
Area of a Triangle, Two Sides and Their Included Angle Given

A equals 1 half b c   sin   alpha</p>
<p>A equals 1 half a c   sin   beta</p>
<p>A equals 1 half a b   sin   gamma

Heron’s Formula

Suppose a triangle has sides with lengths a comma b, and c. Let s equals fraction numerator a plus b plus c over denominator 2 end fraction comma which is called the semiperimeter of the triangle.

Then, the triangle has area A equals square root of s open parentheses s minus a close parentheses open parentheses s minus b close parentheses open parentheses s minus c close parentheses end root.

The Law of Cosines

a squared equals b squared plus c squared minus 2 b c   cos   alpha</p>
<p>b squared equals a squared plus c squared minus 2 a c   cos   beta</p>
<p>c squared equals a squared plus b squared minus 2 a b   cos   gamma