The Law of Cosines
The Law of Cosines is a generalization of the Pythagorean theorem that works for all triangles, not just right triangles. It relates the lengths of the sides of a triangle to the cosine of one of its angles.
Law of Cosines Formulas
Find Side c
Given sides a, b and included angle C.
c = sqrt(a^2 + b^2 - 2ab*cos(C))
Find Side a
Given sides b, c and included angle A.
a = sqrt(b^2 + c^2 - 2bc*cos(A))
Find Side b
Given sides a, c and included angle B.
b = sqrt(a^2 + c^2 - 2ac*cos(B))
Special Case: Right Triangle
When C = 90 degrees, cos(C) = 0, and the formula reduces to:
c = sqrt(a^2 + b^2) (Pythagorean theorem)
When to Use the Law of Cosines
- SAS (Side-Angle-Side): You know two sides and the angle between them, and need the third side.
- SSS (Side-Side-Side): You know all three sides and need to find an angle (rearranged form).
- The Law of Cosines is particularly useful in navigation, surveying, and physics for resolving vector problems.
Relationship to the Pythagorean Theorem
The Pythagorean theorem is a special case of the Law of Cosines. When the included angle C is exactly 90 degrees, cos(90) = 0, so the term -2ab*cos(C) vanishes, leaving c^2 = a^2 + b^2.