Lesson 9.7 · Right Triangles and Trigonometry
The law of cosines
The law of sines needs a side paired with its opposite angle. But what if you know two sides and the angle between them (SAS), or all three sides (SSS)? Then there's no complete pair, and you need a different tool: the law of cosines, which is the Pythagorean theorem upgraded to work for every triangle.
The formula
The law of cosines
In any triangle ,
The same pattern works for each side:
The pattern to remember: the side on the left and the angle at the end are opposite each other, and the other two sides appear everywhere else.
Why it works
Put the triangle on a coordinate plane with at the origin and side along the positive -axis, so . Point is a distance from the origin, at angle above the axis. By the definitions of sine and cosine, its coordinates are .
Now is the distance from to . Use the distance formula (which is itself the Pythagorean theorem):
The last step uses from the sine and cosine lesson. (Here is shorthand for .)
Connection to the Pythagorean theorem
If , then and the formula becomes : the Pythagorean theorem is the special case. The term is the correction for a triangle that isn't right.
- If is acute, , so you subtract, and .
- If is obtuse, (your calculator will show a negative number), so you add, and .
That's exactly the acute/obtuse test from the first lesson of this unit, now with a reason behind it.
SAS: finding the third side
Worked example: Two sides and the included angle
In triangle , , and . Find to the nearest tenth.
Worked example: Two ships
Two ships leave the same port. One sails miles on a straight course, and the other sails miles on a course that makes a angle with the first. How far apart are the ships?
Because is obtuse, its cosine is negative, and the ships end up farther apart than the Pythagorean theorem would suggest ().
SSS: finding an angle
Solve the formula for the cosine:
Then use . Unlike , the inverse cosine gives angles all the way from to , so a negative cosine correctly gives an obtuse angle. There's no ambiguous case.
Worked example: All three sides
A triangle has sides , and . Find the largest angle, to the nearest tenth of a degree.
The largest angle is opposite the longest side, so find .
The negative cosine told us right away that the triangle is obtuse.
Tip
When solving an SSS triangle completely, find the largest angle first with the law of cosines. The other two angles are then guaranteed to be acute, so you can safely finish with the law of sines (or the law of cosines again) without worrying about the ambiguous case.
Common mistake
Evaluate in the right order. In , multiply first, then subtract. A common mistake is to compute and then multiply by . If your calculator allows it, type the whole expression at once.
Which law should I use?
| You know | Use first |
|---|---|
| a right triangle | trig ratios and the Pythagorean theorem |
| AAS or ASA | law of sines |
| SSA | law of sines (check the ambiguous case) |
| SAS | law of cosines |
| SSS | law of cosines |
Practice
In triangle , , and . Find .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
In triangle , , and . Find to the nearest tenth.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A triangle has sides , and . Find the measure of its largest angle, in degrees.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A triangle has sides , and . Find its smallest angle, to the nearest tenth of a degree.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
In triangle , you know , and . Which tool should you use to find ?
A parallelogram has sides and , and one of its angles measures . Find the length of the diagonal that lies opposite the angle.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A golf hole is yards from the tee. A golfer hits a drive yards, but off the straight line to the hole. How far is the ball from the hole, to the nearest tenth of a yard?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A triangle has sides , and . Find the angle opposite the side of length , to the nearest tenth of a degree.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.