Geometry · Grades 10, 11
The Law of Cosines
Quick answer
When two sides and the angle between them are known, or all three sides, the Law of Sines cannot start, because no side comes with its opposite angle. The Law of Cosines handles both: c² = a² + b² − 2ab cos C. It is the Pythagorean theorem plus a correction that vanishes at a right angle, shrinks the third side for an acute angle and stretches it for an obtuse one.
What you'll learn
- Prove the Law of Cosines using coordinates
- Find the third side from two sides and the included angle
- Find an angle from three sides, and choose between the two laws
When the Law of Sines cannot start
The Law of Sines needs a side together with the angle across from it. Two common situations never supply that pair:
- SAS — two sides and the angle between them
- SSS — all three sides
For both, there is a second law:
Here is the angle between sides and , and is the side across from it. The same pattern holds for any angle: , and so on.
The Pythagorean theorem, corrected
Look at the formula next to . It is the Pythagorean theorem with one extra term, , and that term depends only on the angle.
| Angle | Effect on | |
|---|---|---|
| no correction: | ||
| acute | positive | subtracts, so is shorter |
| obtuse | negative | adds, so is longer |
That matches what a hinge does. Close the angle between two fixed sides and the far ends move together. Open it and they spread apart.
Why the correction is 2ab cos C
Put the triangle on coordinates. Place at the origin and on the positive -axis, so . Point is units from the origin at angle , so by the unit circle definition it sits at
Now is the distance from to . By the distance formula:
Group the two terms containing :
The Pythagorean identity says the bracket is exactly :
Nothing in the argument needed to be acute. For an obtuse angle, lands to the left of the -axis, is negative, and every step goes through the same.
SAS: finding the third side
Two sides and meet at . Find .
Multiply before subtracting. That product is one term.
SSS: finding an angle
Rearrange the law to isolate the cosine:
A triangle has sides , and . Find the angle opposite the side of length .
Unlike sine, cosine never leaves two choices. It is positive for acute angles and negative for obtuse ones, so each value belongs to exactly one angle between and .
Which law to use
| Known | Start with |
|---|---|
| two angles and a side (AAS, ASA) | Law of Sines |
| two sides and a non-included angle (SSA) | Law of Sines, checking for two triangles |
| two sides and the included angle (SAS) | Law of Cosines |
| three sides (SSS) | Law of Cosines |
After the Law of Cosines supplies one missing piece, either law can finish the triangle.
Worked examples
Common mistakes
Practice problems
-
Find when , and .
Answer
Full solution
, so .
-
A triangle has sides , and . Find the angle opposite the side of length .
Answer
About
Full solution
, so .
-
Find when , and .
Answer
About
Full solution
, so .
-
A triangle has sides , and . Find its largest angle.
Answer
About
Full solution
The largest angle is across from : , so .
-
Two hikers leave a trailhead on paths apart. One walks miles and the other miles. How far apart are they?
Answer
About miles
Full solution
, so miles.
-
For each set of given parts, name the law to start with: (a) , , ; (b) , , ; (c) , , ; (d) , , .
Answer
(a) Sines. (b) Cosines. (c) Cosines. (d) Sines, checking for two triangles.
Full solution
(a) Two angles give the third, and then every side has its opposite angle.
(b) Two sides and the included angle: SAS.
(c) Three sides: SSS.
(d) Side comes with its opposite angle , but this is SSA, which can give two triangles.
-
Explain why an obtuse angle makes larger than .
Answer
For an obtuse angle , so is positive and adds to .
Full solution
and are positive lengths, so the sign of is the opposite of the sign of .
An obtuse angle has a negative cosine, which makes the correction positive. The side across from an obtuse angle is longer than the hypotenuse of a right triangle with the same two legs.
-
Can a triangle have sides , and ? Use the Law of Cosines to decide.
Answer
No.
Full solution
The angle across from would need .
No angle has a cosine below , so no such triangle exists. This is the triangle inequality in another form: is less than .
-
Use the coordinate proof to explain where the term in comes from.
Answer
From , which the Pythagorean identity collapses to .
Full solution
Expanding the distance from to produces from the horizontal part and from the vertical part.
Together they are .
-
With , and , Theo computes and gets . Find his error.
Hint
Which operation comes first in ?
Answer
He subtracted before multiplying. The correct value is .
Full solution
In , the cosine multiplies only . So is computed first, then subtracted from .
, so .
A sanity check catches Theo’s answer. With a angle between sides of and , the third side cannot be as short as — the ends of the two sides are much farther apart than that.
Frequently asked questions
What is the Law of Cosines?
c² = a² + b² − 2ab cos C, where C is the angle between sides a and b and c is the side opposite it.
When do I use the Law of Cosines instead of the Law of Sines?
When you know two sides and the angle between them (SAS), or all three sides (SSS). In both cases no side is paired with its opposite angle.
How is it related to the Pythagorean theorem?
When C is 90°, cos C = 0 and the correction term disappears, leaving c² = a² + b².
How do I find an angle from three sides?
Rearrange to cos C = (a² + b² − c²)/(2ab), then take the inverse cosine. The answer is unambiguous, because cosine separates acute from obtuse angles.
Why is there no ambiguous case with cosine?
Cosine is positive for acute angles and negative for obtuse ones, so each value between −1 and 1 belongs to exactly one angle between 0° and 180°.
Standards alignment
This lesson covers the following Common Core State Standards for Mathematics.
- CCSS.MATH.CONTENT.HSG.SRT.D.10Similarity, Right Triangles, and Trigonometry(+) Prove the Laws of Sines and Cosines and use them to solve problems.
- CCSS.MATH.CONTENT.HSG.SRT.D.11Similarity, Right Triangles, and Trigonometry(+) Understand and apply the Law of Sines and the Law of Cosines to find unknown measurements in right and non-right triangles (e.g., surveying problems, resultant forces).