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

Mastering the Law of Cosines: Applications and Techniques

Grade 11 Math

Discover when and how to apply the Law of Cosines in trigonometry. Learn to solve complex triangle problems, understand its real-world applications, and enhance your problem-solving skills.

11th Grade11th
Application of the sine rule and cosine rule

Grade 11 Math

What's the purpose of learning the Law of Sines and the Law of Cosines? To solve real-life problems! In this section on applications of the two laws, we will apply our trigonometry knowledge to tackle distance problems.

11th Grade11th

See also

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

Ready to master this concept?