Law of Cosines

High School

Definition

Also known as the cosine rule. The law of cosines relates the cosine of an interior angle in a triangle to its sides. It helps us find aspects to a triangle such as its third side when we know two sides and the angle between them, or we can even find the angles inside a triangle if we have all three sides of the triangle.

Worked examples

\(c^2 = a^2 + b^2 - 2ab\cos C\)
The law of cosines formula: side \(c\) is opposite angle \(C\), and \(a\), \(b\) are the other two sides.
\(a = 5\), \(b = 7\), \(C = 60^\circ \)→\( c^2 = 25 + 49 - 2(5)(7)\cos 60^\circ = 74 - 35 = 39 \)→\( c = \sqrt{39}\)
Finding the third side when two sides and the included angle are known.
\(a = 8\), \(b = 6\), \(c = 10 \)→\( \cos C = \frac{a^2 + b^2 - c^2}{2ab} = \frac{64 + 36 - 100}{96} = 0 \)→\( C = 90^\circ\)
Finding an angle when all three sides are known by rearranging the formula.

Common mistakes

  • \(c^2 = a^2 + b^2 + 2ab\cos C\)\(c^2 = a^2 + b^2 - 2ab\cos C\) The sign before \(2ab\cos C\) is negative, not positive.
  • Using the angle not between the two known sidesUse the angle \(C\) that is between sides \(a\) and \(b\) to find side \(c\) The angle must be opposite the side you are finding.
  • \(\cos C = \frac{c^2 - a^2 - b^2}{2ab}\)\(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\) When solving for the angle, rearrange carefully: move \(c^2\) to the right side with a negative sign.

Where you'll use it next

You'll apply the law of cosines when solving oblique triangles in trigonometry, physics problems involving forces and vectors, navigation and surveying, and later in calculus-based mechanics and engineering.

Found in 2 StudyPug lessons

Law of Cosines

Grade 11 Math

The rule that relates the three sides of any triangle to one of its angles, for solving oblique triangles.

11th Grade11th
Applications of the Sine Rule and Cosine Rule

Grade 11 Math

See how the sine rule and cosine rule solve triangles and real-life problems, from surveying distances to navigation, with clear worked steps.

11th Grade11th

See also

Reviewed by Pat Cheng, M.Ed. — StudyPug Curriculum Lead · Last updated June 6, 2026

Ready to master this concept?