Law of Cosines
Generalizes the Pythagorean theorem to all triangles.
Variables
- C
- Angle between sides a and b
Explanation
When , and it reduces to . Use it for SSS and SAS triangles.
Example
: , .
How to use it
- Two sides and the included angle (SAS): find the third side with .
- Three sides (SSS): rearrange to find an angle, .
Another worked example (SSS)
A triangle has sides , and . Find the largest angle, which is because it's opposite the longest side.
So . A negative cosine always means an obtuse angle.
Real-world example
Two hikers leave camp along paths apart. One walks 4 km and the other 6 km. How far apart are they?
Why it works
Drop a perpendicular from one vertex to the opposite side, splitting the triangle into two right triangles. Applying the Pythagorean theorem to each and eliminating the shared height leaves the correction. When , and you get back .
Law of cosines or law of sines?
Use cosines for SAS and SSS. Use sines when you know a side and its opposite angle. After finding one angle with cosines, switching to sines is quicker, but the law of cosines never has an ambiguous case, so it's safer for the largest angle.
Common mistakes
- Using an angle that isn't between the two known sides.
- Calculating . Only the term is multiplied by .
- Calculator in radians mode.
Where it's used
- Navigation: distance between two ships that sailed from the same port on different headings.
- Sport: the distance from home plate to a fielder, or a golf ball's offline distance.
- Engineering: finding lengths in linkages, robot arms and frames.
- Physics: adding two forces or velocities at an angle to find the resultant's size.
Key takeaways
- Use it for SAS and SSS triangles.
- Only the term is multiplied by .
- A negative cosine means an obtuse angle.
Try it: Triangle Calculator
Solve any triangle from SSS, SAS or ASA: all sides, angles, area, perimeter and type using the laws of sines and cosines.
Practice problems
Try each one first, then open the answer to check your work.
1., , . Find .
Show answer
10.
2., , . Find .
Show answer
, .
3.Sides 5, 6, 7. Find the largest angle.
Show answer
, .
4.Sides 3, 3, 3. Find any angle.
Show answer
, so .
5., , . Find .
Show answer
10. The triangle is equilateral.
Key terms
- SAS
- Two sides and the included angle are known.
- SSS
- All three sides are known.
- Included angle
- The angle between two known sides.
- Obtuse angle
- An angle greater than .
- Inverse cosine
- , which finds an angle from its cosine.