Geometry • Trigonometry in General Triangles

Applying the Laws of Sines and Cosines to Find Unknown Measurements

Unlock the power to solve any triangle—even when there's no right angle in sight.

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.

~150 CE
Ptolemy's Theorem
The Greek-Egyptian mathematician Claudius Ptolemy developed relationships between chords and arcs of circles in his astronomical handbook, the Almagest. His chord tables were essentially early versions of sine tables and laid the groundwork for relating triangle angles to their sides.
~10th–11th Century
Islamic Golden Age
Persian and Arab mathematicians such as Abū al-Wafā' al-Būzjānī and al-Bīrūnī refined sine and cosine functions and applied them to surveying and astronomy. Al-Bīrūnī famously used trigonometry to estimate Earth's radius from a mountaintop—a stunning real-world application of triangle relationships.
13th Century
Nasīr al-Dīn al-Tūsī
Al-Tūsī wrote one of the first treatises that separated trigonometry from astronomy, giving the Law of Sines its own clear statement for both planar and spherical triangles. This was a turning point: triangle-solving became a discipline in its own right.
16th–17th Century
European Formalization
European mathematicians like François Viète developed modern algebraic notation that made it easier to express trigonometric laws symbolically. The Law of Cosines in its current algebraic form was solidified during this era, generalizing the Pythagorean theorem to all triangles.
Today
GPS, Engineering & Beyond
These laws are now embedded in GPS algorithms, structural engineering software, navigation systems, and video game physics engines. Every time your phone calculates a route or an architect designs a roof, the Laws of Sines and Cosines are working behind the scenes.

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.

1

Opposite Side–Angle Pairing

Every side in a triangle is paired with the angle directly across from it. A larger angle always faces a longer side, and a smaller angle faces a shorter side.
2

Angle Sum Property

The three interior angles of any triangle always add up to 180°. If you know two angles, you can always find the third by subtraction.
3

The Law of Sines

In any triangle, the ratio of a side's length to the sine of its opposite angle is constant. This lets you set up proportions to find unknown sides or angles.
4

The Law of Cosines

This law relates all three sides to one of the angles, generalizing the Pythagorean theorem. It works when you have side-angle-side (SAS) or side-side-side (SSS) information.
Key Takeaway
Think of the Law of Sines and the Law of Cosines as two different tools in a toolbox. The Law of Sines is like a pair of proportional scales—great when you can match a side with its opposite angle. The Law of Cosines is more like a Swiss Army knife—it handles the trickier situations where you know two sides and the angle between them (SAS), or all three sides but no angles (SSS). Knowing which tool to grab is half the battle.

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.

Labeled general triangle showing vertices A, B, C and their opposite sides a, b, c with colored angle arcs.

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.

Law of Sines
a / sin(A) = b / sin(B) = c / sin(C)
The ratio of any side to the sine of its opposite angle is the same for all three side–angle pairs.

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).

Law of Cosines
c² = a² + b² − 2ab × cos(C)
Relates two sides, the angle between them, and the side opposite that angle. Can be rearranged for any pair.

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:

Law of Cosines — Angle Form
cos(C) = (a² + b² − c²) / (2ab)
Isolate the cosine to find the angle when all three sides are known (SSS).
Key Takeaway
Here's a quick decision rule: If you have a complete side–angle pair, start with the Law of Sines. If you don't—for example, you know two sides and the included angle, or all three sides—reach for the Law of Cosines. It's like choosing between a wrench and a screwdriver: both fasten things, but each fits a different bolt.

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.

Flowchart showing how to decide between Law of Sines and Law of Cosines based on the given triangle information.

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.

Solving Triangle ABC (SAS → Law of Cosines then Law of Sines)
1
Step 1 — Find side c using the Law of CosinesWe know sides a and b and the angle C between them. Plug into the formula:
c² = a² + b² − 2ab × cos(C)
c² = 8² + 11² − 2(8)(11) × cos(37°)
c² = 64 + 121 − 176 × 0.7986
c² = 185 − 140.55
c² = 44.45
c = √44.45 ≈ 6.67
Side c is approximately 6.67 units.
2
Step 2 — Find angle A using the Law of SinesNow we have a complete pair (c = 6.67, C = 37°), so we can switch to the Law of Sines:
a / sin(A) = c / sin(C)
8 / sin(A) = 6.67 / sin(37°)
sin(A) = 8 × sin(37°) / 6.67
sin(A) = 8 × 0.6018 / 6.67
sin(A) = 4.8145 / 6.67
sin(A) ≈ 0.7218
A = sin⁻¹(0.7218) ≈ 46.2°
Angle A is approximately 46.2°. (Since a < b, we expect A < B, so we take the acute solution.)
3
Step 3 — Find angle B using the angle sumThe three angles must add to 180°:
B = 180° − A − C
B = 180° − 46.2° − 37°
B ≈ 96.8°
Angle B is approximately 96.8°. This makes sense—it's the largest angle, facing the longest side (b = 11).
4
Step 4 — VerifyLet's double-check with the Law of Sines: does b / sin(B) equal the same constant?
b / sin(B) = 11 / sin(96.8°) = 11 / 0.9930 ≈ 11.08
c / sin(C) = 6.67 / sin(37°) = 6.67 / 0.6018 ≈ 11.08 ✓
Both ratios match (≈ 11.08), confirming our solution. The fully solved triangle has: a = 8, b = 11, c ≈ 6.67, A ≈ 46.2°, B ≈ 96.8°, C = 37°.

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.

FeatureLaw of SinesLaw of Cosines
Best forAAS, ASA, SSA casesSAS, SSS cases
Formula complexitySimple proportion — easy to solveQuadratic-style — more algebra
Requires a complete pair?Yes (one side + its opposite angle)No — works with the included angle
Ambiguous case riskYes — SSA can give 0, 1, or 2 solutionsNo — always gives a unique answer
Finding angles from sidesNeeds at least one known angle firstCan find angles from sides alone (SSS)
Relationship to Pythagorean theoremNot directly relatedGeneralizes 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.

Key Takeaway
The Law of Sines is faster and simpler, but it has a blind spot: the ambiguous case. The Law of Cosines takes more computation, but it's rock-solid—it always gives exactly one answer. Think of it like two navigation apps: one gives you a quick route but sometimes gets confused at forks in the road, while the other takes a moment longer but never leads you astray. In practice, experienced problem-solvers use both in sequence.

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 LessonWhere It Leads
Law of Sines for flat trianglesSpherical Law of Sines — used in navigation and astronomy for triangles drawn on the surface of a sphere (like Earth)
Law of Cosines for finding distancesVector 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 triangleTriangulation — 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.

PROBLEM 1CONCEPTUAL
You know two angles of a triangle (A = 50° and B = 65°) and the side between them (c = 12). Is this an AAS, ASA, SAS, or SSS situation? Which law should you start with, and what's your very first step?
PROBLEM 2BASIC CALCULATION
In triangle PQR, angle P = 42°, angle Q = 73°, and side p = 9 (opposite angle P). Find the length of side q (opposite angle Q). Round to one decimal place.
PROBLEM 3INTERMEDIATE
In triangle DEF, you know d = 14, e = 10, and F = 48°. Find the length of side f and the measure of angle D. Round to one decimal place.
PROBLEM 4APPLIED / REAL-WORLD
Two rangers at stations A and B, which are 15 km apart, both spot a forest fire at point F. Ranger A measures the angle FAB = 54°, and Ranger B measures the angle FBA = 68°. How far is the fire from station A? Round to one decimal place.
PROBLEM 5CHALLENGE / SYNTHESIS
A triangle has sides a = 7, b = 5, and c = 9. Find all three angles of this triangle, rounding each to one decimal place. Then use your results to verify that the angles sum to approximately 180°. (Hint: start with the Law of Cosines to find the largest angle, which is opposite the longest side.)

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.

Varsity Tutors • Geometry (Common Core) • Applying the Laws of Sines and Cosines to Find Unknown Measurements