The laws of sines and cosines
The law of sines and the law of cosines carry trigonometry into any triangle — including one with no right angle. See which to pick for the data you are given, why the law of cosines generalises Pythagoras, and when there are two solutions.
Before you start
This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:
- Sine, cosine and tangentSine, cosine and tangent are three ratios of the sides of a right triangle. See why they depend on the angle alone, where the exact values for 30°, 45° and 60° come from, and how to find a side you cannot measure.
- AnglesAngles are measured in degrees: acute below 90°, right exactly 90°, obtuse above it. Meet the kinds of angle, complementary and supplementary pairs, the alternate and corresponding angles at two parallel lines, and the two sum rules — 180° in a triangle and (n − 2) · 180° in a polygon.
- The unit circleThe unit circle carries the sine and the cosine from a triangle onto the whole circle. See how the coordinates of a point become the values of the functions, what signs they take in the four quadrants, and what a negative angle or one past a full turn means.
Where this is used
Real situations where you count exactly the way this lesson teaches:
- Fencing a plotTwo sides of a plot run 12 m and 9 m and meet at 115°. The law of cosines closes the corner: √(12² + 9² − 2 · 12 · 9 · cos 115°) = √(225 + 91.3) = 17.8 m. The cosine of an obtuse angle is negative, so the subtraction turns into an addition — 2.8 m more fencing than the 15 m a square corner would have needed.
- Field surveyingYou do not measure a river with a tape. A surveyor lays out a 50 m baseline along the bank and, from its two ends, reads the angles to a tree on the far side: 78° and 65°. The third angle is 180° − 78° − 65° = 37°, and the law of sines gives the distance from the 78° end to the tree: 50 · sin 65° / sin 37° = 75.3 m. That is not yet the width — the width is the tree’s distance from the baseline, 75.3 · sin 78° = 73.6 m. One baseline and two angles also settle the height of a chimney or a ship’s distance off the quay.
- Valuing a plotA triangular plot has two sides of 42 m and 35 m meeting at 68°. Its area is ½ · 42 · 35 · sin 68° = 735 · 0.927 = 681 m² — without walking the ground and without measuring a height that could not be staked out through undergrowth anyway. At 180 zł a square metre that values the plot at 122,600 zł, and the difference between 68° and a carelessly read 65° is already 27 m², close to 5,000 zł.
- HikingYou follow a path for 3 km, turn through 120° and walk 2 km more. The start lies √(3² + 2² − 2 · 3 · 2 · cos 60°) = √7 ≈ 2.6 km away in a straight line, though your legs covered 5 km. Mind the angle: the sum takes 60°, because a turn is measured off your heading while the law of cosines wants the angle between the legs — 120° would say 4.4 km and argue for a different way home.
All formulas
The law of sines
a side and the angle opposite it — always as a pair
A side from the law of sines
the proportion solved for the unknown side
The law of cosines
α is the angle between the sides b and c
An angle from three sides
the law of cosines solved for the angle
The angle sum
the third angle always follows from the other two
Area of a triangle
two sides and the angle BETWEEN them — no height needed
Sine, cosine and tangent were defined in a right triangle. Most triangles, in exercises and in the field, have no right angle — and yet a missing side and a missing angle can still be computed. Two theorems do the job.
Labelling
The convention is simple: a lowercase letter is the side opposite the angle carrying the matching Greek letter. On top of that, the angle sum is always available:
so two known angles hand you the third for free.
The law of sines
A side and the sine of the angle opposite it are proportional: a longer side lies opposite a larger angle. The common ratio even has a geometric meaning — it equals , where is the radius of the circle through the three vertices.
Use the law when the data contains a complete pair: a side together with the angle opposite it.
The law of cosines
Here is the angle enclosed between the sides and . Use the law when there is no complete side–angle pair: two sides and the angle between them, or all three sides.
Look at how the formula is built: the first two terms are the Pythagorean theorem, and the third is a correction. For we have , so the correction disappears:
The Pythagorean theorem is therefore a special case of the law of cosines. For an acute angle the cosine is positive and the correction shrinks ; for an obtuse angle the cosine is negative, minus times minus makes plus, and the opposite side grows longer — exactly what the picture suggests.
The area from two sides and the angle
The very data the law of cosines needs — two sides and the angle between them — is also enough to find the area, and without working out the third side first.
The starting point is the school formula , where is the altitude onto side . The trouble is that in a general triangle nobody hands you an altitude. But it can be computed.
The altitude, the side and part of side form a right triangle. In it is the hypotenuse and the leg opposite the angle , so straight from the definition of the sine:
Substituting into the area formula:
The letters can be permuted — all that matters is that the angle sits between the two sides being multiplied:
Two checks. For we get and what remains is , half the product of the legs ✓. And since , a triangle with between the same two sides has the same area as one with — the formula needs no separate obtuse case, unlike the law of cosines.
Choosing the law
| given | law |
|---|---|
| two angles and a side | sines (third angle from the sum) |
| two sides and an angle opposite one of them | sines (careful: two solutions are possible) |
| two sides and the angle between them | cosines |
| three sides | cosines (solved for the angle) |
| two sides and the angle between them, but the area is wanted | the formula |
The rule in one sentence: a complete side–opposite-angle pair → sines; no such pair → cosines. And when the question is about area rather than a side, the sine formula settles it outright.
The ambiguous case
Data of the form "two sides and the angle opposite the shorter one" can be ambiguous. The reason is in the function itself: , so one value of the sine belongs to two angles — one acute, one obtuse.
Take , and . The law of sines gives
and that sine belongs to both and . Both are admissible, because in both cases the angle sum stays below — so two different triangles fit the data. You only discard the one where would exceed .
A calculator will not point this out: the inverse function returns the acute angle only. The second solution has to be added by hand.
The calculator: DEG mode
Both laws are computed with angles in degrees, so the calculator has to sit in DEG mode. The quick test: must give . If it gives , the calculator is working in radians and every result will be wrong even though the algebra is right.
Exercises
Law-of-cosines questions have a whole-number answer — type it together with its unit, e.g. 7 cm. In law-of-sines questions the unit is given in brackets, so type the bare number rounded to 0.1. Area questions follow the same rule: when no unit appears in the prompt, write it into the answer (e.g. 12 cm²); when it is given in brackets, type the bare number rounded to 0.1.
Practice
Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.
Common mistakes
- Pairing a side with the wrong angle — in the law of sines a side always goes with the angle opposite it.
- Using the law of cosines with an angle that is not between the given sides — in the formula is the angle enclosed by and .
- Computing as — only the sides and are squared.
- Forgetting the square root — is not the answer yet; the answer is .
- Missing the second solution in the SSA case — the sine cannot tell an acute angle from an obtuse one.
- Computing the area from an angle that is not between the given sides — in the angle has to be enclosed by and ; any other angle gives a meaningless result.
- Losing the half in the area formula — is the area of the parallelogram on those sides, and a triangle is half of it.
- A calculator left in RAD mode — right formulas, wrong numbers.
Formula card
Topic: The laws of sines and cosines
The law of sines
a side and the angle opposite it — always as a pair
A side from the law of sines
the proportion solved for the unknown side
The law of cosines
α is the angle between the sides b and c
An angle from three sides
the law of cosines solved for the angle
The angle sum
the third angle always follows from the other two
Area of a triangle
two sides and the angle BETWEEN them — no height needed
