A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Law of Cosines

College Depth 74 in the knowledge graph ☐ I know this ☆ Set as goal
1topic build on this
304prerequisites beneath it
See this on the map →
Trigonometric Ratios Review→→Dot Product
trigonometry triangles law-of-cosines

Core Idea

The Law of Cosines states that c2 = a2 + b2 - 2ab*cos(C), generalizing the Pythagorean theorem to non-right triangles (when C = 90, the formula reduces to c2 = a2 + b2). It is used when you know two sides and the included angle (SAS) or all three sides (SSS). Combined with the Law of Sines, it allows you to solve any triangle.

How It's Best Learned

Derive using coordinate geometry or the distance formula. Practice SAS cases (find the third side) and SSS cases (find an angle). Compare with the Pythagorean theorem to build intuition about the correction term -2ab*cos(C).

Common Misconceptions

Explainer

The Law of Cosines is a generalization of the Pythagorean theorem you've relied on for right triangles. The Pythagorean theorem says c² = a² + b² when angle C is exactly 90°. But most triangles don't have a right angle. The Law of Cosines corrects for the deviation: c² = a² + b² − 2ab·cos(C), where C is the angle opposite side c and between sides a and b. When C = 90°, cos(90°) = 0, so the correction term vanishes and you're back to the Pythagorean theorem. The law works for any angle in any triangle.

The intuition for the correction term comes from how the angle C pushes the opposite side c longer or shorter. When C is acute (less than 90°), cos(C) is positive, so −2ab·cos(C) is negative — the correction shrinks c² below a² + b². Think of it this way: a narrow angle brings two sides close together, making the opposite side shorter than the Pythagorean guess. When C is obtuse (greater than 90°), cos(C) is negative, so −2ab·cos(C) becomes positive — the correction stretches c² above a² + b². An obtuse angle splays the sides apart, making the opposite side longer than the right-angle case would suggest. This is why the formula makes geometric sense even when you can't visualize it directly.

You use the Law of Cosines in two situations based on what information you have. In the SAS case (two sides and the included angle), you know a, b, and C, and you compute c directly. In the SSS case (all three sides), you know a, b, and c, and you solve for the angle: cos(C) = (a² + b² − c²) / (2ab). Rearranging to find angles from sides is exactly backward from finding sides from angles — just divide through by 2ab and apply arccosine. When you need to find a remaining angle after using SAS to find the third side, you can either apply the Law of Cosines again or switch to the Law of Sines, whichever is more convenient.

The connection to the dot product you'll encounter later is not coincidental. The dot product of two vectors a and b is defined as |a||b|cos(θ), where θ is the angle between them. The Law of Cosines is essentially the statement that |a − b|² = |a|² + |b|² − 2a·b. In other words, the Law of Cosines is the dot product identity written in terms of side lengths and angles. This connection reveals why cosine appears naturally in triangle geometry — it measures the geometric projection of one side onto another.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Making 10 as an Addition Strategy → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts Through 10 → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Law of Cosines

Longest path: 75 steps · 304 total prerequisite topics

Prerequisites (1)

Leads To (1)