Skip to main content
Logo image

Section 4.2 The Law of Cosines

For centuries, Micronesian navigators have sailed vast distances between islands, relying on ancestral knowledge passed down through generations. Using clues to determine their speed and direction, these navigators construct a mental map of their journey, viewing the canoe as stationary compared to the ever-shifting backdrop of movable islands.
Before embarking on a voyage, navigators know relative positions of islands to the canoes at the start, along their route, and at the end. As the journey unfolds, the navigator’s perspective from the stationary canoe will figuratively “move islands” in their mental map of the voyage. This dynamic process, known as etak, allows navigators to gauge their progress and anticipate their destination even before sighting land.
For example, consider the voyage from Polowat to Guam. Initially, Chuuk Lagoon lies due east in Tan Mailap (see Figure 1.1.2). However, as the journey progresses, Chuuk Lagoon gradually shifts southeastward, aligning with Tan Tumur at approximately 42.5 south of east at the end of the voyage at Guam. This process of moving islands is illustrated in Figure 4.2.1.
Figure 4.2.1. In Micronesian navigation, the concept of etak is illustrated as islands appear to move relative to the stationary canoe. During a voyage from Polowat to Guam, Chuuk Lagoon transitions from an eastern to southeastern position, demonstrating the navigator’s perspective where islands are perceived to move while the canoe remains still. If you are viewing the PDF or a printed copy, you can scan the QR code or follow the “Standalone” link to watch the video online.
Suppose the navigator is 200 nautical miles into their journey. What is θ, the angle the navigator moved Chuuk Lagoon relative to due east? Assume Chuuk is 143 nm east of Polowat and the angle formed between Chuuk Lagoon, Polowat, and Guam is 124.5. We can illustrate what is happening below:
Since the line from Polowat to Chuuk Lagoon and the line due east from the canoe’s current position are parallel, the angle θ that Chuuk Lagoon has shifted below east is equivalent to the angle formed from Polowat to Chuuk Lagoon to the canoe by the alternate interior angles of parallel lines in geometry. This is shown in the figure below, where the lines in blue change, depending on the position of the canoe, but the distance between Polowat and Chuuk Lagoon, represented in black, remains the same.
This now creates a triangle where two sides (the distances between Chuuk Lagoon and Polowat, and between Polowat and the canoe) and the included angle (from Chuuk Lagoon to Polowat to the canoe) are known. This triangular configuration is a side-angle-side (SAS) scenario. Unfortunately, we cannot apply the Law of Sines to solve this oblique triangle. In this section, we learn the principles of the Law of Cosines and how to use it to solve triangles that are side-side-side (SSS) and side-angle-side (SAS), as well as calculating the areas of triangles with only their sides given.

Subsection 4.2.1 Law of Cosines

Note: If the triangle is a right triangle, say C=90, then since cos90=0, the Law of Cosines simplifies into the Pythagorean Theorem: c2=a2+b2.

Proof.

To prove the first part, we will place a triangle with A at the origin and B on the x-axis, as shown below.
Using right triangle trigonometry, the coordinates of C can be written as (bcosA,bsinA). Using the Pythagorean Theorem, we get
a2=(bcosAc)2+(bsinA)2=b2cos2A2bccosA+c2+b2sin2A=b2(cos2A+sin2A)+c22bccosA=b2(1)+c22bccosA=b2+c22bccosA
where we used the identity cos2A+sin2A=1. The other two parts of the Law of Cosines can be proved using a similar argument.

Subsection 4.2.2 Using Law of Cosines (SAS)

We are now ready to revisit the problem posed at the start of this section.

Example 4.2.3. Using Law of Cosines (SAS): Etak - Moving Islands.

A canoe is 200 nautical miles into a journey from Polowat to Guam. If Chuuk Lagoon is 143 nm east of Polowat and the angle formed between Chuuk Lagoon, Polowat, and Guam is 124.5, what is θ, the angle the navigator moved Chuuk Lagoon relative to due east? First, we note that the angle formed between the canoe, Chuuk Lagoon, and Polowat is also θ, giving us a SAS triangle. If we denote the side of the triangle between Chuuk Lagoon and the canoe as d, we have the following triangle:

Solution.

Since the Law of Cosines states that the square of one side equals the sum of the squares of the other two sides minus twice their product times the cosine of their included angle, we get:
d2=2002+14322200143cos124.5.
Taking the square root we get:
d=2002+14322200143cos124.5304.71.
Now, to find the angle θ, we can use either the Law of Sines or the Law of Cosines. If we opt for the Law of Sines, we already know side d=304.71, the side between Polowat and Chuuk Lagoon at 143 nm, and the angle between the canoe, Polowat, and Chuuk Lagoon at 124.5. This combination results in a side-side-angle (SSA) triangle. Given that our angle is obtuse (124.5) and the side opposite it is greater than the side adjacent to the angle (i.e., 304.71>143), we fall under Case 6 of Table 4.1.7, which gives us one triangle. We will choose the Law of Sines since it requires fewer steps to isolate the angle θ:
sin124.5304.71=sinθ200.
Isolating sinθ:
sinθ=200sin124.5304.71.
Finally, to solve for θ take the inverse sine of both sides to get:
θ=sin1(200sin124.5304.71)32.7.
Thus, 200 nm into their voyage, the navigator has moved Chuuk Lagoon 32.7 south of due east to Tan Harapwel.

Remark 4.2.4. Steps for solving SAS triangles.

In general, when solving SAS triangles:
  1. Use the Law of Cosines to solve for the remaining side.
  2. To find the second angle, use either the Law of Cosines or Law of Sines.
    • Using the Law of Sines may offer a simpler method for finding the angle. Be cautious of the SSA triangle (side-side-angle), which uses the ambiguous case. Refer to Table 4.1.7 to identify the applicable case. If we encounter Case 3 (two triangles), check if the angle we need to find is acute (<90) or obtuse (>90). If it’s obtuse, subtract the angle found using the Law of Sines from 180.
    • Using the Law of Cosines does not require verification of whether the angle is acute or obtuse, but it involves more steps to isolate the angle.
  3. Use the fact that the sum of the three angles in a triangle equals 180 to find the third angle.

Subsection 4.2.3 Using Law of Cosines (SSS)

Example 4.2.5. Using Law of Cosines (SSS).

If the sides of a triangle are a=5, b=7, and c=3, find the angles.

Solution.

To find A, we begin by using the Law of Cosines:
a2=b2+c22bccosA.
Isolating the term with angle A we get
cosA=b2+c2a22bc=72+3252273=3342.
Taking the inverse cosine we get
A=cos1(3342)38.2.
To find B, we can use either the Law of Sines or Law of Cosines. However, to avoid the ambiguous case with the Law of Sines, we will continue with the Law of Cosines and get:
cosB=a2+c2b22ac=52+3272253=1530=12.
Taking the inverse cosine we get
B=cos1(12)=120.
To find the last angle, C, we can use the fact that the angles in a triangle sum to 180:
C=180AB18038.2120=21.8.

Remark 4.2.6. Steps for solving SSS triangles.

When solving SSS triangles, the process is similar to that of solving SAS triangles, with a slight variation. Instead of solving for a side in Step 1, we solve for an angle. Steps 2 and 3 remain the same:
  1. Use the Law of Cosines to solve for the first angle.
  2. To find the second angle, use either the Law of Cosines or Law of Sines.
    • Using the Law of Sines may provide a simpler method for finding the angle. Be cautious of the SSA triangle (side-side-angle), which can lead to the ambiguous case. Refer to Table 4.1.7 to determine our case. If we encounter Case 3 (two triangles), verify if the angle we need to find is acute (<90) or obtuse (>90). For obtuse angles, subtract the angle found using the Law of Sines from 180.
    • Using the Law of Cosines does not require verification of whether the angle is acute or obtuse, but it involves more steps to isolate the angle.
  3. Use the fact that the sum of the three angles in a triangle equals 180 to find the third angle.

Subsection 4.2.4 Area of an oblique triangle

The Greek mathematician Heron of Alexandria derived a formula for the area of a triangle when all three sides are given. Although a more modern derivation for this formula involves the Law of Cosines, it is still known as Heron’s Formula.

Proof.

We begin by solving for cosC in the Law of Cosines:
c2=a2+b22abcosCcosC=a2+b2c22ab.
Using this and the difference of squares, we get:
1+cosC=1+a2+b2c22ab=2ab+a2+b2c22ab=(a2+2ab+b2)c22ab=(a+b)2c22ab=((a+b)+c)((a+b)c)2ab=(a+b+c)(a+bc)2ab=2s2(sc)2ab=2s(sc)ab,
where the last step comes from the fact that 2s=a+b+c and
2(sc)=2(a+b+c2c)=a+b+c2c=a+bc.
Similarly, we have:
1cosC=1a2+b2c22ab=2aba2b2+c22ab=c2(a22ab+b2)2ab=c2(ab)22ab=(c+(ab))(c(ab))2ab=(a+cb)(b+ca)2ab=2(sb)(sa)ab,
where the last step comes from the fact that
2(sb)=2(a+b+c2b)=a+b+c2b=a+cb
and
2(sa)=2(a+b+c2a)=a+b+c2a=b+ca.
Next, we use Definition 4.1.11 for the area of a triangle:
Area=12absinC.
Squaring both sides of the equation we get:
(Area)2=14a2b2sin2C=14a2b2(1cos2C)=14a2b2(1+cosC)(1cosC)=14a2b2(2s(sc)ab)(2(sb)(sa)ab)=s(sa)(sb)(sc).
Taking the square root of both sides of the equation gives us Heron’s Formula:
Area=s(sa)(sb)(sc).
Note that our proof differs from Heron’s original proof.

Example 4.2.8. Polynesian Triangle.

The Polynesian Triangle is an expanse in the Pacific Ocean comprising over 1,000 islands collectively known as Polynesia. Positioned at its northern corner are the Hawaiian Islands, while Aotearoa marks the southwestern corner, and Rapa Nui lies at the southeastern corner. Historically, the first settlers are believed to have arrived at Ka Lae, Hawaiʻi; Hokianga, Aotearoa; and Anakena, Rapa Nui, respectively. The distances between these pivotal locations are as follows: 6,850 km separates Ka Lae, Hawai`i from Hokianga, Aotearoa; 7,250 km span between Hokianga, Aotearoa and Anakena, Rapa Nui; and 7,150 km separate Rapa Nui from Ka Lae, Hawaiʻi. What is the area of the Polynesian Triangle, rounded to the nearest square kilometer?

Solution.

Using Heron’s Formula, we begin by calculating the semiperimeter
s=12(6,850+7,250+7,150)=10,625.
Then the area created by the Polynesian Triangle is:
Area=10,625(10,6256,850)(10,6257,250)(10,6257,150)21,688,886km2.

Exercises 4.2.5 Exercises

Exercise Group.

Use the Law of Cosines to solve each triangle. Express angles in degrees rounded to one decimal and sides rounded to two decimals.
1.
b=8, c=10, A=45.
Answer.
a7.13, B52.5, C82.5
2.
a=6, c=9, B=60.
Answer.
b7.94, A40.9, C79.1
3.
a=12, c=15, B=40.
Answer.
b9.66, A53.0, C87.0
4.
a=10, c=14, B=50.
Answer.
b10.77, A45.3, C84.7
5.
a=7, b=9, c=12.
Answer.
A35.4, B48.2, C96.4
6.
a=10, b=13, c=15.
Answer.
A41.1, B58.7, C80.2 (Rounded values may cause a slight discrepancy)
7.
a=14, b=12, c=9.
Answer.
A82.3, B58.1, C39.6
8.
a=13, b=6, c=10.
Answer.
A106.0, B26.3, C47.7

Exercise Group.

Use the Law of Cosines to solve each triangle. Express angles in degrees rounded to one decimal and sides rounded to two decimals.
9.
a=15, b=20, C=60.
Answer.
c18.03, A46.1, B73.9
10.
b=8, c=12, A=60.
Answer.
a10.58, B40.9, C79.1
11.
a=5, c=13, B=30.
Answer.
b9.02, A16.1, C133.9
12.
a=9, b=12, C=75.
Answer.
c13.00, A42.0, B63.0
13.
b=7, c=10, A=45.
Answer.
a7.07, B44.4, C90.6
14.
a=15, c=20, B=55.
Answer.
b16.76, A47.2, C77.8 (Rounded values may cause a slight discrepancy)
15.
a=5, b=8, c=9.
Answer.
A33.6, B62.2, C84.2 (Rounded values may cause a slight discrepancy)
16.
a=7, b=21, c=25.
Answer.
A14.4, B48.3, C117.3
17.
a=12, b=16, c=5.
Answer.
A31.1, B136.5, C12.4
18.
a=5, b=2, c=4.
Answer.
A108.2, B22.3, C49.5
19.
a=3, b=7, c=6.
Answer.
A25.2, B96.4, C58.4
20.
a=9, b=10, c=17.
Answer.
A25.1, B28.1, C126.8 (Rounded values may cause a slight discrepancy)

Exercise Group.

Use Heron’s Formula to find the semiperimeter and area of each triangle. Round your answer to the nearest tenth
21.
a=5, b=6, c=7.
Answer.
s=9; K=14.7
22.
a=9, b=12, c=15.
Answer.
s=18; K=54
23.
a=8, b=10, c=12.
Answer.
s=15; K=39.7
24.
a=7, b=9, c=13.
Answer.
s=14.5; K=30
25.
a=15, b=20, c=25.
Answer.
s=30; K=150
26.
a=12, b=16, c=20.
Answer.
s=24; K=96
27.
a=8, b=15, c=17.
Answer.
s=20; K=60
28.
a=9, b=40, c=41.
Answer.
s=45; K=180

29.

The Fijian canoe Uto Ni Yalo embarks on a voyage from Fiji to Tonga, covering 400 nautical miles with a heading of 117 (in the house ʻĀina Malanai). After traveling 100 nautical miles, adverse weather conditions force a deviation of two houses (22.5) off the original course. After one day and 120 additional nautical miles, the navigator determines that a direct route to Tonga is now viable.
(a)
At this point, what is the remaining distance to Tonga, d, rounded to the nearest nautical mile?
Answer.
195 NM
(b)
What adjustment angle, θ, rounded to the nearest tenth of a degree, is needed to navigate to their destination?
Answer.
36.1
(c)
What was the total distance of the voyage from Fiji to Tonga, rounded to the nearest nautical mile?
Answer.
415 NM