Math Core

Lesson 8.3 · Oblique Triangles

The law of cosines

The law of sines needs a side and the angle across from it. When you know two sides and the angle between them (SAS), or all three sides (SSS), you have no such pair. The law of cosines handles both cases. It is the Pythagorean theorem, upgraded to work in every triangle.

From Pythagoras to every triangle

In a right triangle with the right angle at CC, you know c2=a2+b2c^2 = a^2 + b^2. If you open angle CC wider than 90∘90^\circ, side cc gets longer than the Pythagorean theorem predicts. If you close it tighter, side cc gets shorter. The law of cosines measures that correction exactly.

Place CC at the origin with side bb along the positive xx-axis, so A=(b,0)A = (b, 0). Vertex BB is a distance aa from the origin at angle CC, so B=(acos⁡C, asin⁡C)B = (a \cos C,\ a \sin C). Side cc is the distance from AA to BB:

c2=(acos⁡C−b)2+(asin⁡C)2=a2cos⁡2C−2abcos⁡C+b2+a2sin⁡2C=a2(cos⁡2C+sin⁡2C)+b2−2abcos⁡C=a2+b2−2abcos⁡C.\begin{aligned} c^2 &= (a \cos C - b)^2 + (a \sin C)^2 \\ &= a^2 \cos^2 C - 2ab \cos C + b^2 + a^2 \sin^2 C \\ &= a^2(\cos^2 C + \sin^2 C) + b^2 - 2ab \cos C \\ &= a^2 + b^2 - 2ab \cos C. \end{aligned}

The last step uses the Pythagorean identity sin⁡2C+cos⁡2C=1\sin^2 C + \cos^2 C = 1.

The law of cosines

In any triangle ABCABC,

a2=b2+c2−2bccos⁡Ab2=a2+c2−2accos⁡Bc2=a2+b2−2abcos⁡C\begin{aligned} a^2 &= b^2 + c^2 - 2bc \cos A \\ b^2 &= a^2 + c^2 - 2ac \cos B \\ c^2 &= a^2 + b^2 - 2ab \cos C \end{aligned}

Each version starts with the side across from the angle in the cosine. Solved for the angle:

cos⁡A=b2+c2−a22bc.\cos A = \frac{b^2 + c^2 - a^2}{2bc}.

The correction term −2abcos⁡C-2ab\cos C behaves just as the picture suggests. If C=90∘C = 90^\circ, then cos⁡C=0\cos C = 0 and you get the Pythagorean theorem back. If CC is obtuse, cos⁡C\cos C is negative, so the term adds length. If CC is acute, cos⁡C\cos C is positive and the term takes length away.

SAS: find the third side

Worked example: Two sides and the included angle

In triangle ABCABC, b=8b = 8, c=11c = 11 and A=52∘A = 52^\circ. Find aa to the nearest tenth.

Two sides and the included angle (SAS).

The unknown side aa is across from the known angle AA:

a2=82+112−2(8)(11)cos⁡52∘=185−176cos⁡52∘≈185−108.36=76.64\begin{aligned} a^2 &= 8^2 + 11^2 - 2(8)(11)\cos 52^\circ \\ &= 185 - 176 \cos 52^\circ \\ &\approx 185 - 108.36 = 76.64 \end{aligned}

So a≈76.64≈8.8a \approx \sqrt{76.64} \approx 8.8.

Common mistake

Follow the order of operations. In 185−176cos⁡52∘185 - 176\cos 52^\circ, multiply 176176 by cos⁡52∘\cos 52^\circ first, then subtract. Computing (185−176)cos⁡52∘(185 - 176)\cos 52^\circ is a very common calculator slip. And don't forget the final square root: the formula gives a2a^2, not aa.

SSS: find an angle

When all three sides are known, use the solved form to get the cosine of any angle. Because cos⁡−1\cos^{-1} returns angles from 0∘0^\circ to 180∘180^\circ, it correctly reports obtuse angles. Unlike the law of sines, there is no ambiguity.

Worked example: Three sides

A triangle has sides a=7a = 7, b=9b = 9 and c=12c = 12. Find its largest angle to the nearest tenth of a degree.

Three sides known (SSS). The largest angle, C, is across from the longest side.

The largest angle is across from the longest side, so find CC:

cos⁡C=72+92−1222(7)(9)=49+81−144126=−14126≈−0.1111.\cos C = \frac{7^2 + 9^2 - 12^2}{2(7)(9)} = \frac{49 + 81 - 144}{126} = \frac{-14}{126} \approx -0.1111.

So C=cos⁡−1(−0.1111)≈96.4∘C = \cos^{-1}(-0.1111) \approx 96.4^\circ. The negative cosine told you right away that CC is obtuse.

Tip

The numerator a2+b2−c2a^2 + b^2 - c^2 tells you the type of triangle before you compute anything. If cc is the longest side: c2<a2+b2c^2 < a^2 + b^2 means acute, c2=a2+b2c^2 = a^2 + b^2 means right, and c2>a2+b2c^2 > a^2 + b^2 means obtuse.

Solving the whole triangle

After the law of cosines gives you a complete pair, you can switch to the law of sines for the rest. To stay safe, use the law of sines for the smallest remaining angle. The smallest angle of a triangle is always acute, so the calculator's sin⁡−1\sin^{-1} value is guaranteed to be correct. Then get the last angle from the angle sum.

Worked example: SAS, all the way

Solve the triangle with a=10a = 10, b=14b = 14 and C=100∘C = 100^\circ. Round to the nearest tenth.

Side cc.

c2=102+142−2(10)(14)cos⁡100∘=296−280cos⁡100∘≈296+48.62=344.62,c^2 = 10^2 + 14^2 - 2(10)(14)\cos 100^\circ = 296 - 280\cos 100^\circ \approx 296 + 48.62 = 344.62,

so c≈18.6c \approx 18.6. (Since cos⁡100∘\cos 100^\circ is negative, the term added length.)

Angle AA. Side a=10a = 10 is the shortest, so AA is the smallest angle and must be acute:

sin⁡A=10sin⁡100∘c≈9.84818.564≈0.5305,A≈32.0∘.\sin A = \frac{10 \sin 100^\circ}{c} \approx \frac{9.848}{18.564} \approx 0.5305, \qquad A \approx 32.0^\circ.

Angle BB. B≈180∘−100∘−32.0∘=48.0∘B \approx 180^\circ - 100^\circ - 32.0^\circ = 48.0^\circ.

Distances in the real world

Worked example: Two hikers

Two trails leave a trailhead with a 38∘38^\circ angle between them. One hiker walks 4.24.2 km along the first trail and another walks 5.55.5 km along the second. How far apart are they, to the nearest tenth of a kilometer?

The two walks and the 38∘38^\circ angle between them are SAS:

d2=4.22+5.52−2(4.2)(5.5)cos⁡38∘≈17.64+30.25−36.41=11.48,d^2 = 4.2^2 + 5.5^2 - 2(4.2)(5.5)\cos 38^\circ \approx 17.64 + 30.25 - 36.41 = 11.48,

so d≈3.4d \approx 3.4 km.

Choosing a law

You knowStart with
AAS or ASAlaw of sines
SSAlaw of sines (check the ambiguous case)
SASlaw of cosines for the third side
SSSlaw of cosines for an angle (the largest is a good first choice)

Practice

Practice 1

In triangle ABCABC, a=5a = 5, b=7b = 7 and C=60∘C = 60^\circ. Find cc to the nearest tenth.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

A triangle has sides a=5a = 5, b=7b = 7 and c=8c = 8. Find angle BB, in degrees.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

In triangle ABCABC, b=6b = 6, c=9c = 9 and A=120∘A = 120^\circ. Find aa to the nearest tenth.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

A triangle has sides 44, 66 and 99. Find its largest angle to the nearest tenth of a degree.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

In triangle ABCABC you know bb, cc and angle AA. Which equation finds side aa?

Practice 6

A triangle has sides 66, 77 and 1010. What kind of triangle is it?

Practice 7

A parallelogram has sides of length 88 and 1212, and one of its angles is 65∘65^\circ. Find the length of the longer diagonal to the nearest tenth.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

A plane flies 150150 miles in a straight line, then turns 35∘35^\circ to the right and flies another 9090 miles. How far is it from its starting point, to the nearest mile?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.