Law of Cosines
Law of Cosines
Law of Cosines is a topic in Triangle Trigonometry in the Texas Essential Knowledge and Skills (Precalculus, §111.42). It is aligned to Standard P.4(H), which requires students to apply the Law of Cosines.
The Law of Cosines \(c^2=a^2+b^2-2ab\cos C\) solves a triangle given two sides and the included angle (SAS) or all three sides (SSS).
Theory
The Law of Cosines handles the triangle cases the Law of Sines cannot start:
where \(C\) is the angle included between sides \(a\) and \(b\), opposite side \(c\). Use it for:
- SAS — two sides and the included angle \(\Rightarrow\) find the third side.
- SSS — all three sides \(\Rightarrow\) find any angle.
The three symmetric forms, and the angle version:
How to use the Law of Cosines
- SAS: put the known angle as \(C\), the two sides as \(a,b\), and solve for \(c\).
- SSS: use the rearranged form to find \(\cos C\), then \(\cos^{-1}\).
- Finish the triangle, if needed, with the Law of Sines.
- Tip: find the largest angle (opposite the longest side) first to avoid ambiguity.
Apply the Law of Cosines with the included angle \(C\).
| \(c^2\) | \(=\) | \(a^2+b^2-2ab\cos C\) |
| \(=\) | \(49+100-2(7)(10)\cos 60^\circ\) | |
| \(=\) | \(149-140\cdot\dfrac12=79\) | |
| \(c\) | \(=\) | \(\sqrt{79}\approx 8.9\) |
Rearrange the Law of Cosines to solve for \(\cos C\).
| \(\cos C\) | \(=\) | \(\dfrac{a^2+b^2-c^2}{2ab}=\dfrac{25+36-49}{60}\) |
| \(=\) | \(\dfrac{12}{60}=0.2\) | |
| \(C\) | \(=\) | \(\cos^{-1}(0.2)\approx 78.5^\circ\) |
SAS with the \(70^\circ\) angle between the two distances.
| \(d^2\) | \(=\) | \(12^2+9^2-2(12)(9)\cos 70^\circ\) |
| \(=\) | \(225-216\cos 70^\circ\approx 151.1\) | |
| \(d\) | \(\approx\) | \(12.3\ \text{mi}\) |
The largest angle is opposite the longest side \(8\); call it \(C\).
| \(\cos C\) | \(=\) | \(\dfrac{4^2+5^2-8^2}{2(4)(5)}=\dfrac{-23}{40}\) |
| \(C\) | \(=\) | \(\cos^{-1}(-0.575)\approx 125.1^\circ\) |
A negative cosine correctly signals an obtuse angle.
Common pitfalls
Frequently asked questions
What is the Law of Cosines?
\(c^2=a^2+b^2-2ab\cos C\), relating all three sides of a triangle to one angle. It works in any triangle.
When do you use the Law of Cosines instead of the Law of Sines?
For SAS (two sides and the included angle) or SSS (all three sides), where the Law of Sines has no angle-opposite-side pair to start from.
How is it related to the Pythagorean theorem?
It is the general version. When the included angle is \(90^\circ\), \(\cos 90^\circ=0\) and it becomes \(c^2=a^2+b^2\).
How do you find an angle with the Law of Cosines?
Rearrange to \(\cos C=\dfrac{a^2+b^2-c^2}{2ab}\), then take the inverse cosine.