Learning

open
close

Non-right Triangles: Law of Cosines

June 15, 2024 | by Bloom Code Studio

Learning Objectives

In this section, you will:

  • Use the Law of Cosines to solve oblique triangles.
  • Solve applied problems using the Law of Cosines.
  • Use Heron’s formula to find the area of a triangle.

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

A triangle whose vertices are the boat, the port, and the turning point of the boat. The side between the port and the turning point is 10 mi, and the side between the turning point and the boat is 8 miles. The side between the port and the turning point is extended in a straight dotted line. The angle between the dotted line and the 8 mile side is 20 degrees.

Figure 1

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 ABC𝐴𝐵𝐶 is placed in the coordinate plane with vertex A𝐴 at the origin, side c𝑐 drawn along the x-axis, and vertex C𝐶 located at some point (x,y)(𝑥,𝑦) in the plane, as illustrated in Figure 2. Generally, triangles exist anywhere in the plane, but for this explanation we will place the triangle as noted.

A triangle A B C plotted in quadrant 1 of the x,y plane. Angle A is theta degrees with opposite side a, angles B and C, with opposite sides b and c respectively, are unknown. Vertex A is located at the origin (0,0), vertex B is located at some point (x-c, 0) along the x-axis, and point C is located at some point in quadrant 1 at the point (b times the cos of theta, b times the sin of theta).

Figure 2

We can drop a perpendicular from C𝐶 to the x-axis (this is the altitude or height). Recalling the basic trigonometric identities, we know that

cosθ=x(adjacent)b(hypotenuse) and sinθ=y(opposite)b(hypotenuse)cos𝜃=𝑥(adjacent)𝑏(hypotenuse) and sin𝜃=𝑦(opposite)𝑏(hypotenuse)

In terms of θ,x=bcosθ𝜃,𝑥=𝑏cos𝜃 and y=bsinθ.𝑦=𝑏sin𝜃. The (x,y)(𝑥,𝑦) point located at C𝐶 has coordinates (bcosθ,(𝑏cos𝜃, bsinθ).𝑏sin𝜃). Using the side (x−c)(𝑥−𝑐) as one leg of a right triangle and y𝑦 as the second leg, we can find the length of hypotenuse a𝑎 using the Pythagorean Theorem. Thus,

a2=(x−c)2+y2       =(bcosθ−c)2+(bsinθ)2       =(b2cos2θ−2bccosθ+c2)+b2sin2θ       =b2cos2θ+b2sin2θ+c2−2bccosθ       =b2(cos2θ+sin2θ)+c2−2bccosθa2=b2+c2−2bccosθSubstitute (bcosθ) forxand (bsinθ)for y.Expand the perfect square.Group terms noting that cos2θ+sin2θ=1.Factor out b2.𝑎2=(𝑥−𝑐)2+𝑦2       =(𝑏cos𝜃−𝑐)2+(𝑏sin𝜃)2Substitute (𝑏cos𝜃) for𝑥and (𝑏sin𝜃)for 𝑦.       =(𝑏2cos2𝜃−2𝑏𝑐cos𝜃+𝑐2)+𝑏2sin2𝜃Expand the perfect square.       =𝑏2cos2𝜃+𝑏2sin2𝜃+𝑐2−2𝑏𝑐cos𝜃Group terms noting that cos2𝜃+sin2𝜃=1.       =𝑏2(cos2𝜃+sin2𝜃)+𝑐2−2𝑏𝑐cos𝜃Factor out 𝑏2.𝑎2=𝑏2+𝑐2−2𝑏𝑐cos𝜃

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.

LAW OF COSINES

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 Figure 3, with angles α,β,𝛼,𝛽, and γ,𝛾, and opposite corresponding sides a,b,𝑎,𝑏, and c,𝑐, respectively, the Law of Cosines is given as three equations.

a2=b2+c2−2bccosαb2=a2+c2−2accosβc2=a2+b2−2abcosγ𝑎2=𝑏2+𝑐2−2𝑏𝑐cos𝛼𝑏2=𝑎2+𝑐2−2𝑎𝑐cos𝛽𝑐2=𝑎2+𝑏2−2𝑎𝑏cos𝛾

A triangle with standard labels: angles alpha, beta, and gamma with opposite sides a, b, and c respectively.

Figure 3

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.

cosα=b2+c2−a22bccosβ=a2+c2−b22accosγ=a2+b2−c22abcos𝛼=𝑏2+𝑐2−𝑎22𝑏𝑐cos𝛽=𝑎2+𝑐2−𝑏22𝑎𝑐cos𝛾=𝑎2+𝑏2−𝑐22𝑎𝑏

HOW TO

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

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

EXAMPLE 1

Finding the Unknown Side and Angles of a SAS Triangle

Find the unknown side and angles of the triangle in Figure 4.

A triangle with standard labels. Side a = 10, side c = 12, and angle beta = 30 degrees.

Figure 4

Solution

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 b,𝑏, as we know the measurement of the opposite angle β.𝛽.

b2=a2+c2−2accosβb2=102+122−2(10)(12)cos(30∘)b2=100+144−240(3√2)b2=244−1203–√b=244−1203–√−−−−−−−−−−√b≈6.013Substitute the measurements for the known quantities.Evaluate the cosine and begin to simplify.Use the square root property.𝑏2=𝑎2+𝑐2−2𝑎𝑐cos𝛽𝑏2=102+122−2(10)(12)cos(30∘)Substitute the measurements for the known quantities.𝑏2=100+144−240(32)Evaluate the cosine and begin to simplify.𝑏2=244−1203𝑏=244−1203Use the square root property.𝑏≈6.013

Because we are solving for a length, we use only the positive square root. Now that we know the length b,𝑏, we can use the Law of Sines to fill in the remaining angles of the triangle. Solving for angle α,𝛼, we have

sinαa=sinβbsinα10=sin(30°)6.013sinα=10sin(30°)6.013α=sin−1(10sin(30°)6.013)α≈56.3°Multiply both sides of the equation by 10.Find the inverse sine of 10sin(30°)6.013.sin𝛼𝑎=sin𝛽𝑏sin𝛼10=sin(30°)6.013sin𝛼=10sin(30°)6.013Multiply both sides of the equation by 10.𝛼=sin−1(10sin(30°)6.013)Find the inverse sine of 10sin(30°)6.013.𝛼≈56.3°

The other possibility for α𝛼 would be α=180°–56.3°≈123.7°.𝛼=180°–56.3°≈123.7°. In the original diagram, α𝛼 is adjacent to the longest side, so α𝛼 is an acute angle and, therefore, 123.7°123.7° 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 0°0° and 180°.180°. Proceeding with α≈56.3°,𝛼≈56.3°, we can then find the third angle of the triangle.

γ=180°−30°−56.3°≈93.7°𝛾=180°−30°−56.3°≈93.7°

The complete set of angles and sides is

α≈56.3°β=30°γ≈93.7°a=10b≈6.013c=12𝛼≈56.3°𝑎=10𝛽=30°𝑏≈6.013𝛾≈93.7°𝑐=12

TRY IT #1

Find the missing side and angles of the given triangle: α=30°,𝛼=30°, b=12,𝑏=12, c=24.𝑐=24.

EXAMPLE 2

Solving for an Angle of a SSS Triangle

Find the angle α𝛼 for the given triangle if side a=20,𝑎=20, side b=25,𝑏=25, and side c=18.𝑐=18.

Solution

For this example, we have no angles. We can solve for any angle using the Law of Cosines. To solve for angle α,𝛼, we have

              a2=b2+c2−2bccosα             202=252+182−2(25)(18)cosα             400=625+324−900cosα             400=949−900cosα          −549=−900cosα          −549−900=cosα           0.61≈cosαcos−1(0.61)≈α                 α≈52.4°Substitute the appropriate measurements. Simplify in each step. Isolate cos α.Find the inverse cosine.              𝑎2=𝑏2+𝑐2−2𝑏𝑐cos𝛼             202=252+182−2(25)(18)cos𝛼Substitute the appropriate measurements.             400=625+324−900cos𝛼Simplify in each step.             400=949−900cos𝛼          −549=−900cos𝛼Isolate cos 𝛼.          −549−900=cos𝛼           0.61≈cos𝛼cos−1(0.61)≈𝛼Find the inverse cosine.                 𝛼≈52.4°

See Figure 5.

A triangle with standard labels. Side b =25, side a = 20, side c = 18, and angle alpha = 52.4 degrees.

Figure 5

Analysis

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

TRY IT #2

Given a=5,b=7,𝑎=5,𝑏=7, and c=10,𝑐=10, find the missing angles.

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.

EXAMPLE 3

Using the Law of Cosines to Solve a Communication Problem

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 5,050 feet from the first tower and 2,420 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.

Solution

For simplicity, we start by drawing a diagram similar to Figure 6 and labeling our given information.

A triangle formed between the two cell phone towers located on am east to west highway and the cellphone between and north of them. The side between the two towers is 6000 feet, the side between the left tower and the phone is 5050 feet, and the side between the right tower and the phone is 2420 feet. The angle between the 5050 and 6000 feet sides is labeled theta.

Figure 6

Using the Law of Cosines, we can solve for the angle θ.𝜃. Remember that the Law of Cosines uses the square of one side to find the cosine of the opposite angle. For this example, let a=2,420,b=5,050,𝑎=2,420,𝑏=5,050, and c=6,000.𝑐=6,000. Thus, θ𝜃 corresponds to the opposite side a=2,420.𝑎=2,420.

a2(2,420)2(2,420)2−(5,050)2−(6,000)2(2,420)2−(5,050)2−(6,000)2−2(5,050)(6,000)cosθθθ====≈≈≈b2+c2−2bc cosθ(5,050)2+(6,000)2−2(5,050)(6,000) cosθ−2(5,050)(6,000) cosθcosθ0.9183cos−1(0.9183)23.3°𝑎2=𝑏2+𝑐2-2𝑏𝑐 cos𝜃(2,420)2=(5,050)2+(6,000)2-2(5,050)(6,000) cos𝜃(2,420)2-(5,050)2-(6,000)2=-2(5,050)(6,000) cos𝜃(2,420)2-(5,050)2-(6,000)2-2(5,050)(6,000)=cos𝜃cos𝜃≈0.9183𝜃≈cos-1(0.9183)𝜃≈23.3°

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 Figure 7. This forms two right triangles, although we only need the right triangle that includes the first tower for this problem.

The triangle between the phone, the left tower, and a point between the phone and the highway between the towers. The side between the phone and the highway is perpendicular to the highway and is y feet. The highway side is x feet. The angle at the tower, previously labeled theta, is 23.3 degrees.

Figure 7

Using the angle θ=23.3°𝜃=23.3° and the basic trigonometric identities, we can find the solutions. Thus

cos(23.3°)=x5,050                   x=5,050cos(23.3°)                   x≈4,638.15feet  sin(23.3°)=y5,050                   y=5,050sin(23.3°)                   y≈1,997.5feetcos(23.3°)=𝑥5,050                   𝑥=5,050cos(23.3°)                   𝑥≈4,638.15feet  sin(23.3°)=𝑦5,050                   𝑦=5,050sin(23.3°)                   𝑦≈1,997.5feet

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

EXAMPLE 4

Calculating Distance Traveled Using a SAS Triangle

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 Figure 8.

A triangle whose vertices are the boat, the port, and the turning point of the boat. The side between the port and the turning point is 10 mi, and the side between the turning point and the boat is 8 miles. The side between the port and the turning point is extended in a straight dotted line. The angle between the dotted line and the 8 mile side is 20 degrees.

Figure 8

Solution

The boat turned 20 degrees, so the obtuse angle of the non-right triangle is the supplemental angle, 180°−20°=160°.180°−20°=160°. 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.

x2=82+102−2(8)(10)cos(160°)x2=314.35x=314.35−−−−−√x≈17.7miles𝑥2=82+102−2(8)(10)cos(160°)𝑥2=314.35𝑥=314.35𝑥≈17.7miles

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

Heron’s formula finds the area of oblique triangles in which sides a,b,𝑎,𝑏, and c𝑐 are known.

Area=s(s−a)(s−b)(s−c)−−−−−−−−−−−−−−−−−−√Area=𝑠(𝑠−𝑎)(𝑠−𝑏)(𝑠−𝑐)

where s=(a+b+c)2𝑠=(𝑎+𝑏+𝑐)2 is one half of the perimeter of the triangle, sometimes called the semi-perimeter.

EXAMPLE 5

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

Find the area of the triangle in Figure 9 using Heron’s formula.

A triangle with angles A, B, and C and opposite sides a, b, and c, respectively. Side a = 10, side b - 15, and side c = 7.

Figure 9

Solution

First, we calculate s.𝑠.

s=(a+b+c)2s=(10+15+7)2=16𝑠=(𝑎+𝑏+𝑐)2𝑠=(10+15+7)2=16

Then we apply the formula.

Area=s(s−a)(s−b)(s−c)−−−−−−−−−−−−−−−−−√Area=16(16−10)(16−15)(16−7)−−−−−−−−−−−−−−−−−−−−−−−√Area≈29.4Area=𝑠(𝑠−𝑎)(𝑠−𝑏)(𝑠−𝑐)Area=16(16−10)(16−15)(16−7)Area≈29.4

The area is approximately 29.4 square units.

TRY IT #3

Use Heron’s formula to find the area of a triangle with sides of lengths a=29.7ft,b=42.3ft,𝑎=29.7ft,𝑏=42.3ft, and c=38.4ft.𝑐=38.4ft.

EXAMPLE 6

Applying Heron’s Formula to a Real-World Problem

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 Figure 10 for a view of the city property.

A triangle formed by sides Rush Street, N. Wabash Ave, and E. Pearson Street with lengths 62.4, 43.5, and 34.1, respectively.

Figure 10

Solution

Find the measurement for s,𝑠, which is one-half of the perimeter.

s=(62.4+43.5+34.1)2s=70m𝑠=(62.4+43.5+34.1)2𝑠=70m

Apply Heron’s formula.

Area=70(70−62.4)(70−43.5)(70−34.1)−−−−−−−−−−−−−−−−−−−−−−−−−−−−√Area=506,118.2−−−−−−−−√Area≈711.4Area=70(70−62.4)(70−43.5)(70−34.1)Area=506,118.2Area≈711.4

The developer has about 711.4 square meters.

TRY IT #4

Find the area of a triangle given a=4.38ft,b=3.79ft,𝑎=4.38ft,𝑏=3.79ft, and c=5.22ft.

RELATED POSTS

View all

view all