Where Did These Laws Come From?
Long before anyone had a calculator, astronomers and surveyors needed to measure things they couldn't reach—the distance to a star, the width of a river, or the height of a mountain. The key insight was that if you know enough about a triangle's sides and angles, you can figure out everything else. The Law of Sines and the Law of Cosines grew from this practical need, evolving over many centuries across different civilizations.
The question that drove all these thinkers is the same one we'll answer today: If you know some measurements of a triangle, how do you find the rest? For right triangles, SOH-CAH-TOA does the job. But most triangles in the real world aren't right triangles—and that's where the Law of Sines and the Law of Cosines step in.
Core Principles & Definitions
Before diving into formulas, let's establish the ideas that make everything click. In any triangle, we label the three angles with capital letters (A, B, C) and the side opposite each angle with the matching lowercase letter (a, b, c). So side a is across from angle A, side b is across from angle B, and so on. This convention is important because both laws link each side to its opposite angle.
Opposite Side–Angle Pairing
Angle Sum Property
The Law of Sines
The Law of Cosines
Visual Explanation — Anatomy of a General Triangle
The diagram below shows a general (non-right) triangle with all its parts labeled. Notice how each side sits directly opposite its corresponding angle. The colored arcs mark the angles, and the colored side segments show the side–angle pairings that both laws rely on.
In this diagram, side a (in cyan) is opposite angle A at the top, side b (in violet) is opposite angle B at the bottom-left, and side c (in pink) is opposite angle C at the bottom-right. No matter how the triangle is shaped—tall and thin, short and wide, or anything in between—these opposite-pair relationships stay the same. Both the Law of Sines and the Law of Cosines are built on these pairings.
The Formulas — Law of Sines & Law of Cosines
Now let's see the actual equations you'll use. Both laws apply to any triangle—acute, obtuse, or right. When the triangle happens to be a right triangle, these formulas simplify into the familiar Pythagorean theorem and basic trig ratios, so they're really the "parent" formulas from which those simpler tools descend.
The Law of Sines sets up a proportion. If you know one complete side–angle pair (say, side a and angle A) plus one additional piece (another side or angle), you can solve for the missing part. This law works best for AAS (angle-angle-side), ASA (angle-side-angle), and SSA (side-side-angle) configurations—though SSA requires extra caution because of the ambiguous case (more on that in Section 5).
Notice that the Law of Cosines looks like the Pythagorean theorem with an extra term: −2ab × cos(C). When angle C is exactly 90°, cos(90°) = 0, and the formula collapses to c² = a² + b²—the Pythagorean theorem! So the Law of Cosines is really a generalization. It handles SAS (side-angle-side) and SSS (side-side-side) situations where the Law of Sines alone can't help.
You can also rearrange the Law of Cosines to solve for an unknown angle when you know all three sides:
When to Use Which Law — A Decision Guide
The trickiest part of solving triangles isn't the algebra—it's deciding which law to apply. The information you're given (your "knowns") determines the path. Let's classify every possible starting scenario.
Let's walk through each scenario briefly. In an AAS case, you know two angles and a side not between them—find the third angle using the 180° rule, then use the Law of Sines to get the unknown sides. ASA is similar: you know two angles and the side between them, so again find the third angle first. In the SSA case (two sides and an angle opposite one of them), the Law of Sines works, but be careful—there might be two valid triangles, one valid triangle, or no triangle at all. This is called the ambiguous case because sine can give two different angle solutions between 0° and 180°.
For SAS (two sides and the included angle), you can't form a complete pair, so the Law of Cosines is the way to go. Once you find the third side, you can switch to the Law of Sines for the remaining angles. Finally, in the SSS case (all three sides known), use the rearranged Law of Cosines to find one angle, then proceed with the Law of Sines or the Law of Cosines again for the others.
Worked Example — Solving a Triangle Step by Step
Let's solve a complete triangle using both laws. Suppose you're given triangle ABC with a = 8, b = 11, and C = 37°. This is an SAS situation (two sides and the included angle), so we'll start with the Law of Cosines.
c² = a² + b² − 2ab × cos(C)c² = 8² + 11² − 2(8)(11) × cos(37°)c² = 64 + 121 − 176 × 0.7986c² = 185 − 140.55c² = 44.45c = √44.45 ≈ 6.67a / sin(A) = c / sin(C)8 / sin(A) = 6.67 / sin(37°)sin(A) = 8 × sin(37°) / 6.67sin(A) = 8 × 0.6018 / 6.67sin(A) = 4.8145 / 6.67sin(A) ≈ 0.7218A = sin⁻¹(0.7218) ≈ 46.2°B = 180° − A − CB = 180° − 46.2° − 37°B ≈ 96.8°b / sin(B) = 11 / sin(96.8°) = 11 / 0.9930 ≈ 11.08c / sin(C) = 6.67 / sin(37°) = 6.67 / 0.6018 ≈ 11.08 ✓Strengths, Limitations & Comparison
Both laws are powerful, but they have different strengths. The table below compares them side by side so you can see at a glance which is better in each situation.
| Feature | Law of Sines | Law of Cosines |
|---|---|---|
| Best for | AAS, ASA, SSA cases | SAS, SSS cases |
| Formula complexity | Simple proportion — easy to solve | Quadratic-style — more algebra |
| Requires a complete pair? | Yes (one side + its opposite angle) | No — works with the included angle |
| Ambiguous case risk | Yes — SSA can give 0, 1, or 2 solutions | No — always gives a unique answer |
| Finding angles from sides | Needs at least one known angle first | Can find angles from sides alone (SSS) |
| Relationship to Pythagorean theorem | Not directly related | Generalizes it (reduces to a² + b² = c² when C = 90°) |
A common strategy is to combine both laws in a single problem: use the Law of Cosines to find a missing side, which then gives you a complete pair, and then switch to the simpler Law of Sines for the remaining unknowns. This hybrid approach is exactly what we did in the worked example above.
Connection to Advanced Theory
The Laws of Sines and Cosines are not just classroom tools—they're stepping stones to deeper mathematics. As you move forward, you'll encounter several powerful extensions of these ideas.
| This Lesson | Where It Leads |
|---|---|
| Law of Sines for flat triangles | Spherical Law of Sines — used in navigation and astronomy for triangles drawn on the surface of a sphere (like Earth) |
| Law of Cosines for finding distances | Vector dot product — in physics and linear algebra, the cosine formula generalizes to finding the angle between two vectors: cos(θ) = (u · v) / (|u| × |v|) |
| Solving one triangle | Triangulation — engineers and surveyors chain multiple triangle solutions together to map large areas. This is how GPS satellites determine your position. |
| Ambiguous case (SSA) | Inverse trig function analysis — in precalculus and calculus, you'll study why sin⁻¹ has restricted domains and how that connects to the two-solution problem you see here |
There's also a beautiful formula called Heron's Formula that calculates a triangle's area from its three sides alone (no angles needed). It's closely related to the Law of Cosines and gives you another way to extract information from SSS data. If you continue into precalculus, you'll also see the area formula Area = ½ab × sin(C), which connects directly to the Law of Sines. These formulas form an interconnected web: master one, and the others become much easier to learn.
Practice Problems
Try these five problems, which increase in difficulty. Work through each one on paper before revealing the answer. Remember: identify your knowns, decide which law to use, then solve step by step.
Lesson Summary
In this lesson, you learned to solve any triangle—not just right triangles—by applying two fundamental tools. The Law of Sines (a / sin A = b / sin B = c / sin C) works whenever you have a complete side–angle pair, making it ideal for AAS, ASA, and (with caution) SSA configurations. The Law of Cosines (c² = a² + b² − 2ab cos C) is the go-to formula when you lack a complete pair, handling SAS and SSS cases with no ambiguity. It also generalizes the Pythagorean theorem, reducing to it when the included angle is 90°.
The problem-solving strategy is straightforward: identify what you know, determine whether you have a complete side–angle pair, pick the appropriate law, solve for the first unknown, and then use either law (or the 180° angle sum) to find the rest. Always verify your results by checking that the angles sum to 180° and that the largest angle faces the longest side. These two laws, developed over centuries by mathematicians from Ptolemy to al-Tūsī to Viète, remain essential tools in navigation, surveying, engineering, and every branch of science that involves triangles.