The Law of Cosines Advanced. This lesson goes beyond core Geometry. You can skip it.
Progress can't be saved in this browser, so this lesson's status can't be set.
Watch the video explainer
Learning goals
- Derive the Law of Cosines from a signed projection and the Pythagorean theorem
- Explain how the included angle changes the square of the opposite side
- Use two sides and their included angle to find the third side
- Recover and check the angles of a triangle from its three sides
- Choose a triangle law from the given sides and angles
Measure the separation with a projection
In a nondegenerate triangle , use for the length of , for , and for . Each lowercase letter names the side opposite the corresponding angle. The included angle between two sides is the angle at their shared endpoint. Sides and meet at .
Put at the origin and at . Compare two placements of at the same distance from .
In the acute placement, is at . The horizontal distance from to is units, and the vertical distance is units. The Pythagorean theorem gives .
In the obtuse placement, is at . Its horizontal coordinate is negative. The same subtraction now gives a larger horizontal distance.
Expanding the square shows what changed. In both placements, the squares of the horizontal and vertical coordinates of add to , the square of . The changing part is the product of , the base length , and the signed horizontal coordinate.
The Law of Cosines from a signed projection#
Now put at and at . Rotate and, if necessary, reflect the triangle so lies above the horizontal axis. As in Triangle Area with Sine Advanced. This lesson goes beyond core Geometry. You can skip it., scaling the unit semicircle by the length gives the signed projection, the horizontal coordinate of .
The horizontal and vertical distances between and are and . Squaring the horizontal distance gives , even when the perpendicular foot is beyond . If the foot coincides with , the horizontal distance is zero and the same squared-distance equation gives .
The Pythagorean theorem gives for . This relation also holds when , since then . Substitute this sum and the expression for .
The numerical placements used the same expansion. The sign and size of can change without changing any of its steps. This equation is the Law of Cosines. Relabel the triangle to use it with any side and its opposite angle.
Check your understanding
Set and put on the positive horizontal axis. Side has length and angle is . What is the horizontal coordinate of ?
The horizontal coordinate is the length times the cosine of the angle at .
The foot lies to the left of .
Find a third side from SAS
Two sides and their included angle form SAS data. The cosine equation uses those three measurements to give the square of the remaining side. Take the positive square root because a side has positive length. Use degree mode on your calculator and round only the final measurements.
- Acute included angle. Cosine is positive, so the correction reduces the sum of the two side squares.
- Obtuse included angle. Cosine is negative, so the correction increases that sum.
- Right included angle. Cosine is zero, so the equation becomes the Pythagorean theorem.
Worked example 1 An acute opening
Problem. Two rods of lengths cm and cm meet at a hinge opened to . Find the exact distance between the free ends.
Solution. The free ends are opposite the included angle. Since , the correction subtracts from the sum of the squares.
Check your understanding
Two fixed sides meet at an acute angle. The hinge opens to an obtuse angle while the side lengths stay fixed. How does the square of the distance between the free ends change?
Positive cosine makes the correction negative at the acute opening. Negative cosine makes the correction positive at the obtuse opening.
Worked example 2 Two sightings from a dock
Problem. From one dock, the straight distances to two buoys are m and m. The angle between the sight lines is . Treat all three points as lying in one horizontal plane. Find the straight distance between the buoys to the nearest meter.
Solution. The measured angle is between the two known sides, and lies across from it.
The result fits between the difference of the measured lengths, m, and their sum, m.
Worked example 3 The right-angle boundary
Problem. Two straight paths of lengths m and m start at the same point and meet there at . Use the cosine equation to find the exact distance between their far ends. Explain why the Pythagorean theorem gives the same result.
Solution. The correction vanishes because . The paths are the two legs, so the unknown side is the hypotenuse.
Check your understanding
In triangle , the lengths of and are 16 and 23. The angle at is . What is to the nearest tenth?
The cosine correction adds to the sum of the squares because the included angle is obtuse.
Find angles from SSS
With SSS data, all three sides are given. First check that the two shorter positive lengths add to more than the longest. This one comparison guarantees the triangle inequalities for positive lengths. Then isolate the cosine of the angle across from the side chosen on the left of the original equation.
As the ray from turns through the upper unit semicircle from to , the horizontal coordinate decreases from to . Every value strictly between and occurs at exactly one interior angle. In degree mode the inverse cosine, written or , returns that angle. An input of or would produce a straight or zero angle, so the triangle would be degenerate.
If you need every angle, use the cosine equation for the largest angle and then for one of the others. Subtract both from to find the third. Starting opposite the longest side lets you see whether any angle is obtuse.
Worked example 4 Recover all three angles
Problem. In triangle , the side lengths are , , and units for , , and , respectively. Find the measures of , , and to the nearest tenth of a degree, and check the results against the sides.
Solution. The two shorter sides add to units, more than . The largest angle is , across from the longest side.
Use the sides touching in the denominator and subtract the square of the side opposite in the numerator.
Subtract the unrounded values to obtain .
The displayed angles add to . Their order from smallest to largest is , , , which matches the order , , of the opposite sides. The negative cosine computed for also agrees with its obtuse measure.
Check your understanding
The lengths of , , and are , , and . Which expression gives in degrees?
Angle faces the side of length . Subtract its square in the numerator and use the two sides meeting at in the denominator.
Then apply inverse cosine.
Choose a law from the measurements
Start by pairing each known side with the angle across from it. The Law of Sines Advanced. This lesson goes beyond core Geometry. You can skip it. can use a known opposite pair as a ratio. The cosine equation can start from measurements that give no such pair.
| Given data | First move |
|---|---|
| Two sides and their included angle (SAS) | Use the cosine law to find the third side. |
| Three sides (SSS) | Use the cosine law to find an angle. |
| Two angles and a side (ASA or AAS) | Use the angle sum if needed to complete an opposite pair. Then use the sine law. |
| Two sides and an angle opposite a known side (SSA) | Use the sine law and check the possible supplementary angles and remaining angle. |
Once you have a new measurement, look at the updated data. For example, after finding the third side from SAS, all three sides are available, so the SSS procedure finds the remaining angles.
Worked example 5 Choose a law for two angles and a side
Problem. A survey triangle has angle measures at and at . Side measures m. Choose the first triangle law that can find , explain the choice, and calculate to the nearest tenth of a meter.
Solution. Only one side is given. The angle sum completes the opposite pair for side .
Use the Law of Sines with opposite and opposite .
Check your understanding
A triangle has sides and known. Angle is also known. Which first move matches the measurements?
The included angle between and is . The known angle faces , so the sine law can start with that pair. Check any candidate for against the angle sum.