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 ABCABC is placed in the coordinate plane with vertex AA at the origin, side cc drawn along the x-axis, and vertex CC located at some point (x,y)(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 CC 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θ=x(adjacent)b(hypotenuse) and sinθ=y(opposite)b(hypotenuse)

In terms of θ, x=bcosθθ, x=bcosθ and y=bsinθ. y=bsinθ.  The (x,y)(x,y) point located at CC has coordinates (bcosθ,bsinθ)(bcosθ,bsinθ). Using the side (xc)(xc) as one leg of a right triangle and yy as the second leg, we can find the length of hypotenuse aa using the Pythagorean Theorem. Thus,

a2=(xc)2+y2 =(bcosθc)2+(bsinθ)2Substitute (bcosθ) forxand (bsinθ)for y. =(b2cos2θ2bccosθ+c2)+b2sin2θExpand the perfect square. =b2cos2θ+b2sin2θ+c22bccosθGroup terms noting that cos2θ+sin2θ=1. =b2(cos2θ+sin2θ)+c22bccosθFactor out b2.a2=b2+c22bccosθa2=(xc)2+y2 =(bcosθc)2+(bsinθ)2Substitute (bcosθ) forxand (bsinθ)for y. =(b2cos2θ2bccosθ+c2)+b2sin2θExpand the perfect square. =b2cos2θ+b2sin2θ+c22bccosθGroup terms noting that cos2θ+sin2θ=1. =b2(cos2θ+sin2θ)+c22bccosθFactor out b2.a2=b2+c22bccosθ

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.

A General Note: 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,ba,b, and cc, respectively, the Law of Cosines is given as three equations.

a2=b2+c22bccosαb2=a2+c22accosβc2=a2+b22abcosγa2=b2+c22bccosαb2=a2+c22accosβc2=a2+b22abcosγ
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+c2a22bccos β=a2+c2b22accos γ=a2+b2c22abcos α=b2+c2a22bccos β=a2+c2b22accos γ=a2+b2c22ab

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

b2=a2+c22accosβb2=102+1222(10)(12)cos(30)Substitute the measurements for the known quantities.b2=100+144240(32)Evaluate the cosine and begin to simplify.b2=2441203b=2441203Use the square root property.b6.013b2=a2+c22accosβb2=102+1222(10)(12)cos(30)Substitute the measurements for the known quantities.b2=100+144240(32)Evaluate the cosine and begin to simplify.b2=2441203b=2441203Use the square root property.b6.013

Because we are solving for a length, we use only the positive square root. Now that we know the length bb, 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.013Multiply both sides of the equation by 10.α=sin1(10sin(30)6.013)Find the inverse sine of 10sin(30)6.013.α56.3sinαa=sinβbsinα10=sin(30)6.013sinα=10sin(30)6.013Multiply both sides of the equation by 10.α=sin1(10sin(30)6.013)Find the inverse sine of 10sin(30)6.013.α56.3

The other possibility for αα would be α=18056.3123.7α=18056.3123.7. In the original diagram, αα is adjacent to the longest side, so αα is an acute angle and, therefore, 123.7123.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 00 and 180180. Proceeding with α56.3α56.3, we can then find the third angle of the triangle.

γ=1803056.393.7γ=1803056.393.7

The complete set of angles and sides is

α56.3a=10β=30b6.013γ93.7c=12α56.3a=10β=30b6.013γ93.7c=12

Try It 1

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

Solution

Example 2: Solving for an Angle of a SSS Triangle

Find the angle αα for the given triangle if side a=20a=20, side b=25b=25, and side c=18c=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+c22bccosα 202=252+1822(25)(18)cosαSubstitute the appropriate measurements. 400=625+324900cosαSimplify in each step. 400=949900cosα 549=900cosαIsolate cos α. 549900=cosα 0.61cosαcos1(0.61)αFind the inverse cosine. α52.4 a2=b2+c22bccosα 202=252+1822(25)(18)cosαSubstitute the appropriate measurements. 400=625+324900cosαSimplify in each step. 400=949900cosα 549=900cosαIsolate cos α. 549900=cosα 0.61cosαcos1(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 of the Solution

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=7a=5,b=7, and c=10c=10, find the missing angles.

Solution