Resources For Teachers For Tutors For Students & Parents Pricing
Geometry Right triangles and trigonometry

Law of Cosines

20 practice questions 2 video lessons Theory + worked examples

The Law of Cosines

Common Core Geometry • Standard G-SRT.10 • Right Triangles & Trigonometry

The Law of Cosines is a topic in Right Triangles & Trigonometry in the Common Core State Standards. It is aligned to Standard G-SRT.10, which requires students to prove the Law of Cosines and use it to solve problems involving general triangles.

The Law of Cosines \(c^2=a^2+b^2-2ab\cos C\) solves a triangle given two sides and the included angle (SAS) or all three sides (SSS).

Common Core Geometry › Right Triangles & Trigonometry › The Law of Cosines  —  Standard G-SRT.10

Practice 20 questions
Practice questions

Every question with a fully worked solution.

Start practising
Watch 2 video(s)
  • Law of Cosines, Finding Angles & Sides, SSS & SAS Triangles - Trigonometry Watch
  • Law of Cosines Watch
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The Law of Cosines relates all three sides of a triangle to one angle:

\[c^2=a^2+b^2-2ab\cos C,\]

where \(C\) is the angle included between sides \(a\) and \(b\). Use it for:

  • SAS — two sides and the included angle \(\Rightarrow\) the third side;
  • SSS — all three sides \(\Rightarrow\) any angle.
It generalizes the Pythagorean theorem: when \(C=90^\circ\), \(\cos C=0\) and it becomes \(c^2=a^2+b^2\).
Law of Cosines The Law of Cosines relates all three sides to one angle, generalizing the Pythagorean theorem. c a b C included angle C between a and b
The included angle \(C\) sits between \(a\) and \(b\), opposite \(c\).
Law of Cosines Law of Cosines Law of Cosines c² = a² + b² − 2ab cos C use for SAS and SSS C = 90° gives the Pythagorean theorem
The Law of Cosines and when to use it.

The two forms:

\[c^2=a^2+b^2-2ab\cos C,\qquad \cos C=\dfrac{a^2+b^2-c^2}{2ab}\]
c squared equals a squared plus b squared minus 2 a b cosine C; rearrange for cosine C to find an angle
A negative \(\cos C\) means an obtuse angle — the formula handles it automatically.

How to use the Law of Cosines

  1. SAS: put the known angle as \(C\), its opposite side as \(c\), and solve for \(c\).
  2. SSS: use the rearranged form for \(\cos C\), then \(\cos^{-1}\).
  3. Finish the triangle with the Law of Sines if needed.
Example 1 — SAS: find the third side
Sides \(a=7\), \(b=10\) meet at \(C=60^\circ\). Find side \(c\).
Solution

Apply the Law of Cosines.

\(c^2\)\(=\)\(7^2+10^2-2(7)(10)\cos 60^\circ\)
\(=\)\(149-140(0.5)=79\)
\(c\)\(=\)\(\sqrt{79}\approx 8.9\)
side c is about 8.9
Example 2 — SSS: find an angle
A triangle has sides \(5,6,7\). Find the angle \(C\) opposite the side \(7\).
Solution

Rearrange for \(\cos C\).

\(\cos C\)\(=\)\(\dfrac{5^2+6^2-7^2}{2(5)(6)}=\dfrac{12}{60}=0.2\)
\(C\)\(=\)\(\cos^{-1}(0.2)\approx 78.5^\circ\)
angle C is about 78.5 degrees
Example 3 — A real distance
Two paths leave a point at \(70^\circ\); a hiker walks \(12\) and \(9\) miles along them. How far apart are the endpoints?
Solution

SAS with the \(70^\circ\) angle between the two distances.

\(d^2\)\(=\)\(12^2+9^2-2(12)(9)\cos 70^\circ\approx 151.1\)
\(d\)\(\approx\)\(12.3\ \text{mi}\)
the endpoints are about 12.3 miles apart
Example 4 — When to use it
Which triangle cases need the Law of Cosines?
Solution
SAS (two sides and the included angle) and SSS (all three sides) — where the Law of Sines has no starting pair.
SAS and SSS cases

Common pitfalls

The included angle pairs with the opposite side. \(\cos C\) goes with side \(c\).
Compute \(2ab\cos C\) as one term before subtracting.
Use it for SAS/SSS, not when you already have an angle-opposite-side pair (that's the Law of Sines).

Frequently asked questions

What is the Law of Cosines?

\(c^2=a^2+b^2-2ab\cos C\), relating all three sides of a triangle to one angle.

When do you use the Law of Cosines?

For SAS (two sides and the included angle) or SSS (all three sides).

How does it relate to the Pythagorean theorem?

When the included angle is \(90^\circ\), the cosine term is zero and it becomes \(c^2=a^2+b^2\).

How do you find an angle with the Law of Cosines?

Rearrange to \(\cos C=\dfrac{a^2+b^2-c^2}{2ab}\) and take the inverse cosine.