The Pythagorean theorem solves any right-angled triangle. The two laws on this page solve the ones that are not right-angled. Together they cover essentially every triangle problem you can encounter at school, and the question is always the same: given some sides and angles, find the rest.
The convention for the rest of this article: a triangle has vertices $A$, $B$, $C$, and the side opposite each vertex is labelled with the matching lower-case letter. So $a$ is the side opposite vertex $A$.
The two laws
Law of sines
$$\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}.$$
The ratio of a side to the sine of the angle opposite it is the same for all three pairs. The law of sines is the right tool when you know either two angles and any side (ASA / AAS) or two sides and a non-included angle (SSA — the awkward case discussed below).
Law of cosines
$$c^2 = a^2 + b^2 - 2ab\cos C.$$
This is the Pythagorean theorem with a correction term. When $C = 90^\circ$, $\cos C = 0$ and the correction disappears, leaving $c^2 = a^2 + b^2$ — the Pythagorean theorem. The law of cosines is the right tool when you know two sides and the included angle (SAS), or all three sides (SSS).
Choosing the right law: the four configurations
For each kind of information you start with, there is a clearly correct choice of law. Memorise this table once and the rest is mechanical.
- ASA / AAS — two angles and a side. Use the law of sines: the third angle comes from $A + B + C = 180^\circ$, then use the sine ratio to find the other sides.
- SAS — two sides and the angle between them. Use the law of cosines to find the third side; then either law to find the other two angles.
- SSS — all three sides. Use the law of cosines, rearranged for an angle: $\cos C = (a^2 + b^2 - c^2)/(2ab)$.
- SSA — two sides and a non-included angle. Use the law of sines, but read the next section first.
The ambiguous case (SSA)
SSA is the configuration where things go wrong. Given sides $a$ and $b$ and angle $A$, the law of sines gives
$$\sin B = \frac{b \sin A}{a}.$$
This equation can have zero solutions, one solution, or two solutions for $B$ in $(0^\circ, 180^\circ)$, depending on the numbers:
- If $\sin B > 1$: no triangle exists with the given measurements.
- If $\sin B = 1$: exactly one triangle, right-angled at $B$.
- If $\sin B < 1$ and $a < b$: two possible triangles (one with $B$ acute, one with $B = 180^\circ - B_{\text{acute}}$).
- If $\sin B < 1$ and $a \ge b$: exactly one triangle.
The two-solution case is what gives SSA its nickname — the ambiguous case. Always check whether a second triangle is possible before reporting your answer.
The mistakes I see most often
1. Calculator in the wrong angle mode
Almost every wrong answer in trigonometry comes from a calculator set to radians when you wanted degrees, or vice versa. Check the mode indicator before you start each problem; on most calculators it is labelled DEG, RAD, or GRAD in the top corner of the display.
2. Forgetting the second SSA solution
If you compute $B = 30^\circ$ from $\sin B = 0.5$, the equation also has the solution $B = 150^\circ$. Whether the second one gives a valid triangle depends on whether $A + 150^\circ < 180^\circ$. Always check.
3. Using the wrong side opposite the angle
$\tfrac{a}{\sin A} = \tfrac{b}{\sin B}$ matches each side with the angle opposite it, not adjacent to it. Mismatching is the single most common arithmetic error in law-of-sines problems.
4. Sign of the cosine when the angle is obtuse
If you find $\cos C < 0$, then $C$ is obtuse (between $90^\circ$ and $180^\circ$). Some students reject the negative answer thinking they have made a sign error; they have not.
Where this comes up later
Vector arithmetic, force diagrams in mechanics, surveying, navigation, and any problem in three dimensions that has been reduced to a planar triangle. The cosine law in particular is the bridge between basic geometry and the dot product in linear algebra: $\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos\theta$ is essentially the law of cosines rearranged.
References
- Stewart, J., Redlin, L., Watson, S. Algebra and Trigonometry, Cengage, ch. 6.4–6.5.
- Wikipedia: Law of sines, Law of cosines, Solution of triangles.
- Khan Academy: Trigonometry with general triangles.