If we know two angles and one side of a triangle, we can use the Law of Sines to solve the triangle. We can also use the Law of Sines when we know two sides and the angle opposite one of them. But the Law of Sines is not helpful for the problem that opened this chapter, finding the distance from Avery to Clio. In this case we know two sides of the triangle, \(a\) and \(c\text{,}\) and the included angle, \(B\text{.}\)
To solve a triangle when we know two sides and the included angle, we will need a generalization of the Pythagorean theorem known as the Law of Cosines.
In a right triangle, with \(C = 90\degree\text{,}\) the Pythagorean theorem tells us that
\begin{equation*}
c^{2} = a^{2} + b^{2}
\end{equation*}
If we allow angle \(C\) to vary, but keep \(a\) and \(b\) the same length, the side \(c\) will grow or shrink, depending on whether we increase or decrease the angle \(C\text{,}\) as shown below.
The Pythagorean theorem is actually a special case of a more general law that applies to all triangles, no matter what the size of angle \(C\text{.}\) The equation relating the three sides of a triangle is
\begin{equation*}
c^{2} = a^{2} + b^{2} - 2ab \cos (C)
\end{equation*}
You can see that when \(C\) is a right angle, \(\cos 90\degree = 0\text{,}\) so the equation reduces to the Pythagorean theorem.
We can write similar equations involving the angles or \(A\) or \(B\text{.}\) The three equations are all versions of the Law of Cosines.
Law of Cosines.
If the angles of a triangle are \(A, B\text{,}\) and \(C\text{,}\) and the opposite sides are respectively \(a, b,\) and \(c\text{,}\) then
\begin{gather*}
\blert{a^{2} = b^{2} + c^{2} - 2bc \cos (A)}\\
\blert{b^{2} = a^{2} + c^{2} - 2ac \cos (B)}\\
\blert{c^{2} = a^{2} + b^{2} - 2ab \cos (C)}
\end{gather*}
Subsection Finding an Angle
We can also use the Law of Cosines to find an angle when we know all three sides of a triangle. Pay close attention to the algebraic steps used to solve the equation in the next example.
Example 3.42.
In the triangle at right, \(a = 6,~ b = 7\text{,}\) and \(c = 11\text{.}\) Find angle \(C\text{.}\)
Solution.
We choose the version of the Law of Cosines that uses angle \(C\text{.}\)
\begin{align*}
c^{2} \amp = a^{2} + b^{2} - 2ab \cos (C) \amp\amp \blert{\text{Substitute the known values.}}\\
11^{2} \amp = 6^{2} + 7^{2} - 2(6)(7) \cos (C) \amp\amp \blert{\text{Simplify each side.}}\\
121 \amp = 36 + 49 - 84 \cos (C) \amp\amp \blert{\text{Isolate the cosine term.}}\\
36 \amp = -84 \cos (C) \amp\amp \blert{\text{Solve for cos (C).}}\\
\dfrac{-3}{7} \amp = \cos (C) \amp\amp \blert{\text{Solve for C.}}\\
C \amp = \cos^{-1} \left(\dfrac{-3}{7}\right) = 115.4\degree
\end{align*}
Angle \(C\) is about \(115.4\degree\text{.}\)
Checkpoint 3.43.
In \(\triangle ABC\text{,}\) \(a = 5.3,~b = 4.7\text{,}\) and \(c = 6.1\text{.}\) Find angle \(B\text{,}\) and round your answer to two decimal places.
Once we have calculated one of the angles in a triangle, we can use either the Law of Sines or the Law of Cosines to find a second angle. Here is how we would use the Law of Sines to find angle \(A\) in the previous Example.
\begin{align*}
\dfrac{\sin (A)}{a} \amp = \dfrac{\sin (C)}{c} \amp\amp \blert{\text{Substitute the known values.}}\\
\dfrac{\sin (A)}{6} \amp = \dfrac{\sin (115.4\degree)}{11} \amp\amp \blert{\text{Solve for} \sin A.}\\
\sin (A) \amp = 6 \cdot \dfrac{\sin (115.4\degree)}{11} \approx 0.4928
\end{align*}
Thus, \(A = \sin^{-1}(0.4928) = 29.5\degree\text{.}\) (We know that \(A\) is an acute angle because it is opposite the shortest side of the triangle.) Finally,
\begin{equation*}
B = 180\degree - (A + C) \approx 35.1\degree
\end{equation*}
Alternatively, we can use the Law of Cosines to find angle \(A\text{.}\)
\begin{align*}
a^{2} \amp = b^{2} + c^{2} - 2bc \cos (A) \amp\amp \blert{\text{Substitute the known values.}}\\
6^{2} \amp = 7^{2} + 11^{2} - 2(7)(11) \cos (A) \amp\amp \blert{\text{Simplify each side.}}\\
36 \amp = 49 + 121 - 154 \cos (A) \amp\amp \blert{\text{Isolate the cosine term.}}\\
-134 \amp = -154 \cos (A) \amp\amp \blert{\text{Solve for} \cos (A).}\\
\dfrac{67}{77} \amp = \cos (A) \amp\amp \blert{\text{Solve for A.}}\\
A \amp = \cos^{-1} \left(\dfrac{67}{77}\right) = 29.5\degree
\end{align*}
Subsection Using the Law of Cosines for the Ambiguous Case
In Section 3.2 we encountered the ambiguous case:
If we know two sides \(a\) and \(b\) of a triangle and the acute angle \(\alpha\) opposite one of them, there may be one solution, two solutions, or no solution, depending on the size of \(a\) in relation to \(b\) and \(\alpha\text{,}\) as shown below.
The Ambiguous Case.
-
No solution: \(a \lt b \sin (\alpha)\)
\(\alpha\) is too short to make a triangle.
-
One solution: \(a = b \sin (\alpha)\)
\(\alpha\) is exactly the right length to make a right triangle.
-
Two solutions: \(b \sin (\alpha) \lt a \lt b\)
-
One solution: \(a \gt b\)
If \(\alpha\) is an obtuse angle, things are simpler: there is one solution if \(a \gt b\text{,}\) and no solution if \(a \le b\text{.}\)
Because there are always two angles with a given sine, if we use the Law of Sines for the ambiguous case, we must check whether both possible angles result in a triangle. But here is another approach: We can apply the Law of Cosines to find the third side first. With that method, we’ll need the quadratic formula.
Quadratic Formula.
The solutions of the quadratic equation \(ax^{2} + bx + c = 0,~~a \not= 0,\) are given by
\begin{equation*}
\blert{x = \dfrac{-b \pm \sqrt{b^{2} - 4ac}}{2a}}
\end{equation*}
A quadratic equation can have one solution, two solutions, or no solution, depending on the value of the discriminant, \(b^{2} - 4ac\text{.}\) If we use the Law of Cosines to find a side in the ambiguous case, the quadratic formula will tell us how many triangles have the given properties.
If the quadratic equation has one positive solution, there is one triangle.
If the quadratic equation has two positive solutions, there are two triangles.
If the quadratic equation has no positive solutions, there is no triangle with the given properties.
Example 3.45.
In \(\triangle ABC,~ B = 14.4\degree,~ a = 8\text{,}\) and \(b = 3\text{.}\) Solve the triangle.
Solution.
We begin by finding the third side of the triangle. Using the Law of Cosines, we have
\begin{align*}
b^{2} \amp = a^{2} + c^{2} - 2ac \cos (B) \amp\amp \blert{\text{Substitute the known values.}}\\
3^{2} \amp = 8^{2} + c^{2} - 2(8)c \cos (14.4\degree) \amp\amp \blert{\text{Simplify.}}\\
9 \amp = 64 + c^{2} - 16c (0.9686) \amp\amp \blert{\text{Write the quadratic equation in standard form.}}\\
0 \amp = c^{2}-15.497c + 55 \amp\amp \blert{\text{Apply the quadratic formula.}}
\end{align*}
\begin{align*}
c \amp = \dfrac{15.497 \pm \sqrt{(-15.497)^{2} - 4(1)(55)}}{2(1)} \amp\amp \blert{\text{Simplify.}}\\
\amp = \dfrac{15.497 \pm 4.490}{2} = 5.503~ \text{ or }~ 9.994
\end{align*}
Because there are two positive solutions for side \(c\text{,}\) either \(c = 5.503\) or \(c = 9.994\text{,}\) there are two triangles with the given properties. We apply the Law of Cosines again to find angle \(C\) in each triangle.
For the triangle with \(c = 5.503\text{,}\) we have
\begin{align*}
c^{2} \amp = a^{2} + b^{2} - 2ab \cos (C) \amp\amp \blert{\text{Substitute the known values.}}\\
5.503^{2} \amp = 8^{2} + 3^{2} - 2(8)(3) \cos (C) \amp\amp \blert{\text{Solve for} \cos (C).}\\
\cos (C) \amp = \dfrac{5.503^{2} - 64 - 9}{-48} = 0.889876\\
C \amp = \cos^{-1} 0.889876) = 27.1\degree
\end{align*}
and \(A = 180\degree - (14.4\degree + 27.1\degree) = 138.5\degree\text{.}\)
For the triangle with \(c = 9.994\text{,}\) we have
\begin{align*}
c^{2} \amp = a^{2} + b^{2} - 2ab \cos (C) \amp\amp \blert{\text{Substitute the known values.}}\\
9.994^{2} \amp = 8^{2} + 3^{2} - 2(8)(3) \cos (C) \amp\amp \blert{\text{Solve for} \cos (C).}\\
\cos (C) \amp = \dfrac{9.994^{2} - 64 - 9}{-48} = -0.560027\\
C \amp = \cos^{-1} (-0.560027) = 124.1\degree
\end{align*}
and \(A = 180\degree - (14.4\degree + 124.1\degree) = 41.5\degree\text{.}\) Both triangles are shown below.
Checkpoint 3.47.
Use the Law of Cosines to find all triangles \(ABC\) with \(A = 48\degree,~ a = 10\text{,}\) and \(b = 15\text{.}\)