6.2 The Law of Cosines

What is the Law of Cosines?

The Law of Cosines is a generalization of the Pythagorean Theorem. In a triangle, if \(C\) is a right angle, then \(a^2 + b^2 = c^2\). The Law of cosines states that

\(a^2 + b^2 - 2 ab \cos C = c^2\).

But if \(C\) is not \(90^\circ\), then that angle has lost its special Status. Thus the Law of Cosines must apply to other given variables.

So \(b^2 + c^2 - 2 bc \cos A = a^2\) and \(a^2 + c^2 - 2 ac \cos B = b^2\).

Solving SAS triangles

The Law of Cosines may be used to solve triangles of type SAS and SSS.

To solve SAS problems, use the Law of Cosines to find the length of the side opposite the given angle.

Example:, given \(a = 10, B = 32^\circ\)and \(c = 15\).

The first step is to find the side opposite the given angle, in this case, \(b\).

\(b^2 = a^2 + c^2 -2 ac \cos B\). Thus, \(b^2 = 100 + 225 - 2 ( 10 ) (15 )\cos 32^\circ = 325 - 300 (0.848048096) = 325 - 254.4 = 70.59\).

Thus \(b = 8.40\), approximately.

Now, we must find the sizes of angles \(A\) and \(C\).

We can use the Law of Sines, provided we find the angle opposite the smaller side first.

Why is it important to find the angle opposite the smaller of \(a\) and \(c\) first? If the triangle has an obtuse angle ( i.e. \(> 90^\circ\) ), then it will be opposite the largest side of the triangle. So we know that the angle opposite the smaller of the two given sides cannot be obtuse. Why should we be concerned whether an angle is obtuse or not? Remember that knowing the sine of an angle of a triangle does not tell you what the angle is, since there are two solutions to an equation \(\sin D = y\) between \(0^\circ\) and \(180^\circ\), an acute angle \(D = \arcsin y\) and an obtuse angle \(D = 180^\circ - \arcsin y\). If we know in advance that the angle \(D\) is acute, then we know to use \(D = \arcsin y\).

In the example, we know \(a = 10, B = 32^\circ, c = 15\) and \(b = 8.40\). Since \(a\) is smaller than \(c\), we find \(A\) next using the Law of Sines.

\(\dfrac{\sin A}{10}=\dfrac{\sin 32^\circ}{8.40}\) so \(\sin A=0.6309\) and since \(A\) is the acute solution we know that \(A=\arcsin(0.6309)=39.1^\circ\).

Then the remaining angle can be found

\(C = 180^\circ - 32^\circ - 39.1^\circ = 108.9^\circ\)

So the solution is

\(b = 8.40\)
\(A = 39.1^\circ\)
\(C = 108.9^\circ\)

Exercise 6.2.1

Given \(A = 28^\circ, b = 14, c = 10\) solve the triangle.

See Solution

Exercise 6.2.2

An engineer wishes to measure the diameter of a hole in the ground, but his tape measure isn't long enough. The hole is roughly circular in shape. He places stakes at points \(A\) and \(B\) on opposite sides of the hole, then places a third stake at a point \(C\) at the edge of the hole somewhere between \(A\) and \(C\). His tape is long enough to measure the distance from \(C\) to \(A\) at \(28\) feet and the distance from \(C\) to \(B\) at \(26\) feet. From the point \(C\), the angle between the lines \(AC\) and \(CB\) is \(88^\circ\). How far is it from \(A\) to \(B\)?

See Solution

Solving SSS triangles

There is an alternate form of the Law of Cosines which is used to solve the SSS case. In the standard form of the Law of Cosines, each of the three equations is solved for the cosine of the angle to get

\(\cos A = \dfrac{b^2 + c^2 - a^2}{2 bc }\)

\(\cos B = \dfrac{a^2 + c^2 - b^2}{ 2 ac }\)

\(\cos C = \dfrac{a^2 + b^2 - c^2 }{ 2 ab }\)

Thus, given the lengths of the three sides of a triangle, we can find the cosines of the three angles.

Knowing the cosine of an angle of a triangle, can we deduce the angle itself?

If we know that \(\cos D = x\), where \(D\) is an interior angle of a triangle, can we deduce that \(D = \arccos x\) ? Recall that the principle domain of the cosine function ( for the purpose of finding the inverse function ) is the interval \([ 0, 180^\circ ]\). This means that there is only one angle between \(0^\circ\) and \(180^\circ\) whose cosine is \(x\). Thus, we can conclude that

\( A = \arccos\dfrac{b^2 + c^2 - a^2}{2 bc }\)

\( B = \arccos \dfrac{a^2 + c^2 - b^2}{ 2 ac }\)

\( C = \arccos\dfrac{a^2 + b^2 - c^2 }{ 2 ab }\)

Typically, we use the Law of Cosines to find \(A\) and \(B\), then subtract their sum from \(180^\circ\) to find \(C\).

Exercise 6.2.3

Given \(a = 8, b = 5\) and \(c = 4\), solve the triangle.

See Solution

Heron's Fomula

There is a formula from antiquity for computing the area of a triangle from the lengths of its three sides called Heron's Formula (also called Hero's Formula). It makes use of the idea of the semiperimeter. The semiperimeter is simply half the perimeter:

\(s=\frac{1}{2}(a+b+c)\)

Given a \(\triangle ABC\) with sides \(a, b\) and \(c\) and semiperimeter \(s\), the area can be given as

Area \(=\sqrt{ s ( s - a )( s - b )( s - c )}\)

Exercise 6.2.4

Given a \(\triangle ABC\) with sides \(a = 8, b = 5\) and \(c = 4\), find the area of the triangle.

See Solution