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 ReviewDot 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 |ab|² = |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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Making 10 as an Addition StrategyAddition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts Through 10Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineOpposites and Additive InversesAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewLaw of Cosines

Longest path: 75 steps · 304 total prerequisite topics

Prerequisites (1)

Leads To (1)