Suppose a boat leaves port, travels 10 miles, turns 20 degrees, and travels another 8 miles as shown in [link]. How far from port is the boat?

Unfortunately, while the Law of Sines enables us to address many non-right triangle cases, it does not help us with triangles where the known angle is between two known sides, a SAS (side-angle-side) triangle, or when all three sides are known, but no angles are known, a SSS (side-side-side) triangle. In this section, we will investigate another tool for solving oblique triangles described by these last two cases.

# Using the Law of Cosines to Solve Oblique Triangles

The tool we need to solve the problem of the boat’s distance from the port is the **Law of Cosines**, which defines the relationship among angle measurements and side lengths in oblique triangles. Three formulas make up the Law of Cosines. At first glance, the formulas may appear complicated because they include many variables. However, once the pattern is understood, the Law of Cosines is easier to work with than most formulas at this mathematical level.

Understanding how the Law of Cosines is derived will be helpful in using the formulas. The derivation begins with the Generalized Pythagorean Theorem, which is an extension of the Pythagorean Theorem to non-right triangles. Here is how it works: An arbitrary non-right triangle$\text{\hspace{0.17em}}ABC\text{\hspace{0.17em}}$is placed in the coordinate plane with vertex$\text{\hspace{0.17em}}A\text{\hspace{0.17em}}$at the origin, side$\text{\hspace{0.17em}}c\text{\hspace{0.17em}}$drawn along the *x*-axis, and vertex$\text{\hspace{0.17em}}C\text{\hspace{0.17em}}$located at some point$\text{\hspace{0.17em}}\left(x,y\right)\text{\hspace{0.17em}}$in the plane, as illustrated in [link]. Generally, triangles exist anywhere in the plane, but for this explanation we will place the triangle as noted.

We can drop a perpendicular from$\text{\hspace{0.17em}}C\text{\hspace{0.17em}}$to the *x-*axis (this is the altitude or height). Recalling the basic trigonometric identities, we know that

In terms of$\text{\hspace{0.17em}}\theta ,\text{}x=b\mathrm{cos}\text{\hspace{0.17em}}\theta \text{\hspace{0.17em}}$and$y=b\mathrm{sin}\text{\hspace{0.17em}}\theta .\text{}$The$\text{\hspace{0.17em}}(x,y)\text{\hspace{0.17em}}$point located at$\text{\hspace{0.17em}}C\text{\hspace{0.17em}}$has coordinates$\text{\hspace{0.17em}}\left(b\mathrm{cos}\text{\hspace{0.17em}}\theta ,\text{\hspace{0.17em}}\text{\hspace{0.17em}}b\mathrm{sin}\text{\hspace{0.17em}}\theta \right).\text{\hspace{0.17em}}$Using the side$\text{\hspace{0.17em}}\left(x-c\right)\text{\hspace{0.17em}}$as one leg of a right triangle and$\text{\hspace{0.17em}}y\text{\hspace{0.17em}}$as the second leg, we can find the length of hypotenuse$\text{\hspace{0.17em}}a\text{\hspace{0.17em}}$using the Pythagorean Theorem. Thus,

The formula derived is one of the three equations of the Law of Cosines. The other equations are found in a similar fashion.

Keep in mind that it is always helpful to sketch the triangle when solving for angles or sides. In a real-world scenario, try to draw a diagram of the situation. As more information emerges, the diagram may have to be altered. Make those alterations to the diagram and, in the end, the problem will be easier to solve.

The Law of Cosines states that the square of any side of a triangle is equal to the sum of the squares of the other two sides minus twice the product of the other two sides and the cosine of the included angle. For triangles labeled as in [link], with angles$\text{\hspace{0.17em}}\alpha ,\beta ,$ and$\text{\hspace{0.17em}}\gamma ,$ and opposite corresponding sides$\text{\hspace{0.17em}}a,b,$ and$\text{\hspace{0.17em}}c,\text{\hspace{0.17em}}$respectively, the Law of Cosines is given as three equations.

To solve for a missing side measurement, the corresponding opposite angle measure is needed.

When solving for an angle, the corresponding opposite side measure is needed. We can use another version of the Law of Cosines to solve for an angle.

**Given two sides and the angle between them (SAS), find the measures of the remaining side and angles of a triangle.**

- Sketch the triangle. Identify the measures of the known sides and angles. Use variables to represent the measures of the unknown sides and angles.
- Apply the Law of Cosines to find the length of the unknown side or angle.
- Apply the Law of Sines or Cosines to find the measure of a second angle.
- Compute the measure of the remaining angle.

Find the unknown side and angles of the triangle in [link].

First, make note of what is given: two sides and the angle between them. This arrangement is classified as SAS and supplies the data needed to apply the Law of Cosines.

Each one of the three laws of cosines begins with the square of an unknown side opposite a known angle. For this example, the first side to solve for is side$\text{\hspace{0.17em}}b,\text{\hspace{0.17em}}$as we know the measurement of the opposite angle$\text{\hspace{0.17em}}\beta .$

Because we are solving for a length, we use only the positive square root. Now that we know the length$\text{\hspace{0.17em}}b,\text{\hspace{0.17em}}$we can use the Law of Sines to fill in the remaining angles of the triangle. Solving for angle$\text{\hspace{0.17em}}\alpha ,\text{\hspace{0.17em}}$we have

The other possibility for$\text{\hspace{0.17em}}\alpha \text{\hspace{0.17em}}$would be$\text{\hspace{0.17em}}\alpha =\mathrm{180\xb0}\u2013\mathrm{56.3\xb0}\approx \mathrm{123.7\xb0.}\text{\hspace{0.17em}}$In the original diagram,$\text{\hspace{0.17em}}\alpha \text{\hspace{0.17em}}$is adjacent to the longest side, so$\text{\hspace{0.17em}}\alpha \text{\hspace{0.17em}}$is an acute angle and, therefore,$\text{\hspace{0.17em}}\mathrm{123.7\xb0}\text{\hspace{0.17em}}$does not make sense. Notice that if we choose to apply the Law of Cosines, we arrive at a unique answer. We do not have to consider the other possibilities, as cosine is unique for angles between$\text{\hspace{0.17em}}\mathrm{0\xb0}\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}\mathrm{180\xb0.}\text{\hspace{0.17em}}$Proceeding with$\text{\hspace{0.17em}}\alpha \approx \mathrm{56.3\xb0},\text{\hspace{0.17em}}$we can then find the third angle of the triangle.

The complete set of angles and sides is

Find the missing side and angles of the given triangle:$\text{\hspace{0.17em}}\alpha =\mathrm{30\xb0},\text{\hspace{0.17em}}\text{\hspace{0.17em}}b=12,\text{\hspace{0.17em}}\text{\hspace{0.17em}}c=24.$

$a\approx 14.9,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\beta \approx \mathrm{23.8\xb0},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\gamma \approx \mathrm{126.2\xb0}.$

Find the angle$\text{\hspace{0.17em}}\alpha \text{\hspace{0.17em}}$for the given triangle if side$\text{\hspace{0.17em}}a=20,\text{\hspace{0.17em}}$side$\text{\hspace{0.17em}}b=25,\text{\hspace{0.17em}}$and side$\text{\hspace{0.17em}}c=18.$

For this example, we have no angles. We can solve for any angle using the Law of Cosines. To solve for angle$\text{\hspace{0.17em}}\alpha ,\text{\hspace{0.17em}}$we have

See [link].

Given$\text{\hspace{0.17em}}a=5,b=7,\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}c=10,\text{\hspace{0.17em}}$find the missing angles.

$\alpha \approx \mathrm{27.7\xb0},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\beta \approx \mathrm{40.5\xb0},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\gamma \approx \mathrm{111.8\xb0}$

# Solving Applied Problems Using the Law of Cosines

Just as the Law of Sines provided the appropriate equations to solve a number of applications, the Law of Cosines is applicable to situations in which the given data fits the cosine models. We may see these in the fields of navigation, surveying, astronomy, and geometry, just to name a few.

On many cell phones with GPS, an approximate location can be given before the GPS signal is received. This is accomplished through a process called triangulation, which works by using the distances from two known points. Suppose there are two cell phone towers within range of a cell phone. The two towers are located 6000 feet apart along a straight highway, running east to west, and the cell phone is north of the highway. Based on the signal delay, it can be determined that the signal is 5050 feet from the first tower and 2420 feet from the second tower. Determine the position of the cell phone north and east of the first tower, and determine how far it is from the highway.

For simplicity, we start by drawing a diagram similar to [link] and labeling our given information.

Using the Law of Cosines, we can solve for the angle$\text{\hspace{0.17em}}\theta .\text{\hspace{0.17em}}$Remember that the Law of Cosines uses the square of one side to find the cosine of the opposite angle. For this example, let$\text{\hspace{0.17em}}a=2420,b=5050,\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}c=6000.\text{\hspace{0.17em}}$Thus,$\text{\hspace{0.17em}}\theta \text{\hspace{0.17em}}$corresponds to the opposite side$\text{\hspace{0.17em}}a=2420.\text{\hspace{0.17em}}$

To answer the questions about the phone’s position north and east of the tower, and the distance to the highway, drop a perpendicular from the position of the cell phone, as in [link]. This forms two right triangles, although we only need the right triangle that includes the first tower for this problem.

Using the angle$\text{\hspace{0.17em}}\theta =\mathrm{23.3\xb0}\text{\hspace{0.17em}}$and the basic trigonometric identities, we can find the solutions. Thus

The cell phone is approximately 4638 feet east and 1998 feet north of the first tower, and 1998 feet from the highway.

Returning to our problem at the beginning of this section, suppose a boat leaves port, travels 10 miles, turns 20 degrees, and travels another 8 miles. How far from port is the boat? The diagram is repeated here in [link].

The boat turned 20 degrees, so the obtuse angle of the non-right triangle is the supplemental angle,$\mathrm{180\xb0}-\mathrm{20\xb0}=\mathrm{160\xb0}.\text{\hspace{0.17em}}$With this, we can utilize the Law of Cosines to find the missing side of the obtuse triangle—the distance of the boat to the port.

The boat is about 17.7 miles from port.

# Using Heron’s Formula to Find the Area of a Triangle

We already learned how to find the area of an oblique triangle when we know two sides and an angle. We also know the formula to find the area of a triangle using the base and the height. When we know the three sides, however, we can use Heron’s formula instead of finding the height. Heron of Alexandria was a geometer who lived during the first century A.D. He discovered a formula for finding the area of oblique triangles when three sides are known.

Heron’s formula finds the area of oblique triangles in which sides$\text{\hspace{0.17em}}a,b\text{,}$and$\text{\hspace{0.17em}}c\text{\hspace{0.17em}}$are known.

where$\text{\hspace{0.17em}}s=\frac{\left(a+b+c\right)}{2}\text{\hspace{0.17em}}$ is one half of the perimeter of the triangle, sometimes called the semi-perimeter.

Find the area of the triangle in [link] using Heron’s formula.

First, we calculate$\text{\hspace{0.17em}}s.$

Then we apply the formula.

The area is approximately 29.4 square units.

Use Heron’s formula to find the area of a triangle with sides of lengths$\text{\hspace{0.17em}}a=29.7\text{\hspace{0.17em}}\text{ft},b=42.3\text{\hspace{0.17em}}\text{ft},\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}c=38.4\text{\hspace{0.17em}}\text{ft}.$

Area = 552 square feet

A Chicago city developer wants to construct a building consisting of artist’s lofts on a triangular lot bordered by Rush Street, Wabash Avenue, and Pearson Street. The frontage along Rush Street is approximately 62.4 meters, along Wabash Avenue it is approximately 43.5 meters, and along Pearson Street it is approximately 34.1 meters. How many square meters are available to the developer? See [link] for a view of the city property.

Find the measurement for$\text{\hspace{0.17em}}s,\text{\hspace{0.17em}}$which is one-half of the perimeter.

Apply Heron’s formula.

The developer has about 711.4 square meters.

Find the area of a triangle given$\text{\hspace{0.17em}}a=4.38\text{\hspace{0.17em}}\text{ft}\text{\hspace{0.17em}},b=3.79\text{\hspace{0.17em}}\text{ft,}\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}c=5.22\text{\hspace{0.17em}}\text{ft}\text{.}$

about 8.15 square feet

Access these online resources for additional instruction and practice with the Law of Cosines.

# Key Equations

Law of Cosines | $\begin{array}{l}{a}^{2}={b}^{2}+{c}^{2}-2bc\mathrm{cos}\text{\hspace{0.17em}}\alpha \hfill \\ {b}^{2}={a}^{2}+{c}^{2}-2ac\mathrm{cos}\text{\hspace{0.17em}}\beta \hfill \\ {c}^{2}={a}^{2}+{b}^{2}-2abcos\text{\hspace{0.17em}}\gamma \hfill \end{array}$ |

Heron’s formula | $\begin{array}{l}\text{Area}=\sqrt{s(s-a)(s-b)(s-c)}\hfill \\ \text{where}s=\frac{(a+b+c)}{2}\hfill \end{array}$ |

# Key Concepts

- The Law of Cosines defines the relationship among angle measurements and lengths of sides in oblique triangles.
- The Generalized Pythagorean Theorem is the Law of Cosines for two cases of oblique triangles: SAS and SSS. Dropping an imaginary perpendicular splits the oblique triangle into two right triangles or forms one right triangle, which allows sides to be related and measurements to be calculated. See [link] and [link].
- The Law of Cosines is useful for many types of applied problems. The first step in solving such problems is generally to draw a sketch of the problem presented. If the information given fits one of the three models (the three equations), then apply the Law of Cosines to find a solution. See [link] and [link].
- Heron’s formula allows the calculation of area in oblique triangles. All three sides must be known to apply Heron’s formula. See [link] and See [link].

# Section Exercises

## Verbal

If you are looking for a missing side of a triangle, what do you need to know when using the Law of Cosines?

two sides and the angle opposite the missing side.

If you are looking for a missing angle of a triangle, what do you need to know when using the Law of Cosines?

Explain what$\text{\hspace{0.17em}}s\text{\hspace{0.17em}}$represents in Heron’s formula.

$\text{\hspace{0.17em}}s\text{\hspace{0.17em}}$is the semi-perimeter, which is half the perimeter of the triangle.

Explain the relationship between the Pythagorean Theorem and the Law of Cosines.

When must you use the Law of Cosines instead of the Pythagorean Theorem?

The Law of Cosines must be used for any oblique (non-right) triangle.

## Algebraic

For the following exercises, assume$\text{\hspace{0.17em}}\alpha \text{\hspace{0.17em}}$is opposite side$\text{\hspace{0.17em}}a,\beta \text{\hspace{0.17em}}$ is opposite side$\text{\hspace{0.17em}}b,\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}\gamma \text{\hspace{0.17em}}$ is opposite side$\text{\hspace{0.17em}}c.\text{\hspace{0.17em}}$If possible, solve each triangle for the unknown side. Round to the nearest tenth.

$\gamma =\mathrm{41.2\xb0},a=2.49,b=3.13$

$\alpha =\mathrm{120\xb0},b=6,c=7$

11.3

$\beta =\mathrm{58.7\xb0},a=10.6,c=15.7$

$\gamma =\mathrm{115\xb0},a=18,b=23$

34.7

$\alpha =\mathrm{119\xb0},a=26,b=14$

$\gamma =\mathrm{113\xb0},b=10,c=32$

26.7

$\beta =\mathrm{67\xb0},a=49,b=38$

$\alpha =\mathrm{43.1\xb0},a=184.2,b=242.8$

257.4

$\alpha =\mathrm{36.6\xb0},a=186.2,b=242.2$

$\beta =\mathrm{50\xb0},a=105,b=45{}_{}{}^{}$

not possible

For the following exercises, use the Law of Cosines to solve for the missing angle of the oblique triangle. Round to the nearest tenth.

$\text{\hspace{0.17em}}a=42,b=19,c=30;\text{\hspace{0.17em}}$find angle$\text{\hspace{0.17em}}A.$

$\text{\hspace{0.17em}}a=14,\text{}b=13,\text{}c=20;\text{\hspace{0.17em}}$find angle$\text{\hspace{0.17em}}C.$

95.5°

$\text{\hspace{0.17em}}a=16,b=31,c=20;\text{\hspace{0.17em}}$find angle$\text{\hspace{0.17em}}B.$

$\text{\hspace{0.17em}}a=13,\text{\hspace{0.17em}}b=22,\text{\hspace{0.17em}}c=28;\text{\hspace{0.17em}}$find angle$\text{\hspace{0.17em}}A.$

26.9°

$a=108,\text{\hspace{0.17em}}b=132,\text{\hspace{0.17em}}c=160;\text{\hspace{0.17em}}$find angle$\text{\hspace{0.17em}}C.\text{\hspace{0.17em}}$

For the following exercises, solve the triangle. Round to the nearest tenth.

$A=\mathrm{35\xb0},b=8,c=11$

$B\approx \mathrm{45.9\xb0},C\approx \mathrm{99.1\xb0},a\approx 6.4$

$B=\mathrm{88\xb0},a=4.4,c=5.2$

$C=\mathrm{121\xb0},a=21,b=37$

$A\approx \mathrm{20.6\xb0},B\approx \mathrm{38.4\xb0},c\approx 51.1$

$a=13,b=11,c=15$

$a=3.1,b=3.5,c=5$

$A\approx \mathrm{37.8\xb0},B\approx 43.8,C\approx \mathrm{98.4\xb0}$

$a=51,b=25,c=29$

For the following exercises, use Heron’s formula to find the area of the triangle. Round to the nearest hundredth.

Find the area of a triangle with sides of length 18 in, 21 in, and 32 in. Round to the nearest tenth.

177.56 in^{2}

Find the area of a triangle with sides of length 20 cm, 26 cm, and 37 cm. Round to the nearest tenth.

$a=\frac{1}{2}\text{\hspace{0.17em}}\text{m},b=\frac{1}{3}\text{\hspace{0.17em}}\text{m},c=\frac{1}{4}\text{\hspace{0.17em}}\text{m}$

0.04 m^{2}

$a=12.4\text{ft},\text{}b=13.7\text{ft},\text{}c=20.2\text{ft}$

$a=1.6\text{yd},\text{}b=2.6\text{yd},\text{}c=4.1\text{yd}$

0.91 yd^{2}

## Graphical

For the following exercises, find the length of side $x.$ Round to the nearest tenth.

3.0

29.1

0.5

For the following exercises, find the measurement of angle$\text{\hspace{0.17em}}A.$

70.7°

77.4°

Find the measure of each angle in the triangle shown in [link]. Round to the nearest tenth.

For the following exercises, solve for the unknown side. Round to the nearest tenth.

25.0

9.3

For the following exercises, find the area of the triangle. Round to the nearest hundredth.

43.52

1.41

0.14

## Extensions

A parallelogram has sides of length 16 units and 10 units. The shorter diagonal is 12 units. Find the measure of the longer diagonal.

The sides of a parallelogram are 11 feet and 17 feet. The longer diagonal is 22 feet. Find the length of the shorter diagonal.

18.3

The sides of a parallelogram are 28 centimeters and 40 centimeters. The measure of the larger angle is 100°. Find the length of the shorter diagonal.

A regular octagon is inscribed in a circle with a radius of 8 inches. (See [link].) Find the perimeter of the octagon.

48.98

A regular pentagon is inscribed in a circle of radius 12 cm. (See [link].) Find the perimeter of the pentagon. Round to the nearest tenth of a centimeter.

For the following exercises, suppose that$\text{\hspace{0.17em}}{x}^{2}=25+36-60\mathrm{cos}\left(52\right)\text{\hspace{0.17em}}$represents the relationship of three sides of a triangle and the cosine of an angle.

Draw the triangle.

Find the length of the third side.

For the following exercises, find the area of the triangle.

7.62

85.1

## Real-World Applications

A surveyor has taken the measurements shown in [link]. Find the distance across the lake. Round answers to the nearest tenth.

A satellite calculates the distances and angle shown in [link] (not to scale). Find the distance between the two cities. Round answers to the nearest tenth.

24.0 km

An airplane flies 220 miles with a heading of 40°, and then flies 180 miles with a heading of 170°. How far is the plane from its starting point, and at what heading? Round answers to the nearest tenth.

A 113-foot tower is located on a hill that is inclined 34° to the horizontal, as shown in [link]. A guy-wire is to be attached to the top of the tower and anchored at a point 98 feet uphill from the base of the tower. Find the length of wire needed.

99.9 ft

Two ships left a port at the same time. One ship traveled at a speed of 18 miles per hour at a heading of 320°. The other ship traveled at a speed of 22 miles per hour at a heading of 194°. Find the distance between the two ships after 10 hours of travel.

The graph in [link] represents two boats departing at the same time from the same dock. The first boat is traveling at 18 miles per hour at a heading of 327° and the second boat is traveling at 4 miles per hour at a heading of 60°. Find the distance between the two boats after 2 hours.

37.3 miles

A triangular swimming pool measures 40 feet on one side and 65 feet on another side. These sides form an angle that measures 50°. How long is the third side (to the nearest tenth)?

A pilot flies in a straight path for 1 hour 30 min. She then makes a course correction, heading 10° to the right of her original course, and flies 2 hours in the new direction. If she maintains a constant speed of 680 miles per hour, how far is she from her starting position?

2371 miles

Los Angeles is 1,744 miles from Chicago, Chicago is 714 miles from New York, and New York is 2,451 miles from Los Angeles. Draw a triangle connecting these three cities, and find the angles in the triangle.

Philadelphia is 140 miles from Washington, D.C., Washington, D.C. is 442 miles from Boston, and Boston is 315 miles from Philadelphia. Draw a triangle connecting these three cities and find the angles in the triangle.

Two planes leave the same airport at the same time. One flies at 20° east of north at 500 miles per hour. The second flies at 30° east of south at 600 miles per hour. How far apart are the planes after 2 hours?

Two airplanes take off in different directions. One travels 300 mph due west and the other travels 25° north of west at 420 mph. After 90 minutes, how far apart are they, assuming they are flying at the same altitude?

599.8 miles

A parallelogram has sides of length 15.4 units and 9.8 units. Its area is 72.9 square units. Find the measure of the longer diagonal.

The four sequential sides of a quadrilateral have lengths 4.5 cm, 7.9 cm, 9.4 cm, and 12.9 cm. The angle between the two smallest sides is 117°. What is the area of this quadrilateral?

65.4 cm^{2}

The four sequential sides of a quadrilateral have lengths 5.7 cm, 7.2 cm, 9.4 cm, and 12.8 cm. The angle between the two smallest sides is 106°. What is the area of this quadrilateral?

Find the area of a triangular piece of land that measures 30 feet on one side and 42 feet on another; the included angle measures 132°. Round to the nearest whole square foot.

468 ft^{2}

Find the area of a triangular piece of land that measures 110 feet on one side and 250 feet on another; the included angle measures 85°. Round to the nearest whole square foot.

- Precalculus
- Preface
- Functions
- Linear Functions
- Polynomial and Rational Functions
- Exponential and Logarithmic Functions
- Trigonometric Functions
- Periodic Functions
- Trigonometric Identities and Equations
- Further Applications of Trigonometry
- Systems of Equations and Inequalities
- Introduction to Systems of Equations and Inequalities
- Systems of Linear Equations: Two Variables
- Systems of Linear Equations: Three Variables
- Systems of Nonlinear Equations and Inequalities: Two Variables
- Partial Fractions
- Matrices and Matrix Operations
- Solving Systems with Gaussian Elimination
- Solving Systems with Inverses
- Solving Systems with Cramer's Rule

- Analytic Geometry
- Sequences, Probability and Counting Theory
- Introduction to Calculus
- Appendix

Because the inverse cosine can return any angle between 0 and 180 degrees, there will not be any ambiguous cases using this method.