Mathovore, everything you need to succeed in math: Common Core lessons, worksheets, tests and quizzes
Skip to content

Law of Cosines

Law of Cosines – definition and example, Geometry math glossary – Mathovore

Key takeaway: The law of cosines finds the side across from a known angle using the other two sides, and it extends the Pythagorean theorem to triangles that have no right angle.

Grade 10 – GeometryG-SRT.D.10Trigonometry

Definition of Law of Cosines

Definition

The law of cosines is the Pythagorean theorem with a correction. Square the two sides that enclose a corner, add them, and then subtract a term built from the cosine of that corner. The result is the square of the side facing the corner.

Reach for it when two sides and the corner between them are known, or when all three sides are known and an angle is wanted. For a square corner the cosine is 0 and the correction disappears. For a wide corner the cosine is negative, so the subtraction turns into an addition and the third side grows.

Formula and notation

The law of cosines, with sides \(p\) and \(q\) enclosing corner \(R\) and \(r\) facing it, reads:

\[ r^2 = p^2 + q^2 – 2pq\cos R \]

Solved for the corner: \(\cos R = \frac{p^2 + q^2 – r^2}{2pq}\). Rotate the letters for the other sides.

CBA117°8 mi13 mir ≈ 18.1r² = 8² + 13² – 2(8)(13)cos 117°r² ≈ 327.4
The wide 117-degree corner pushes the far side beyond what the two shorter sides would suggest.

Key facts

  • The angle used must sit between the two sides that are multiplied.
  • Square each side before subtracting the cosine term.
  • Wide corners have negative cosines, which lengthen the opposite side.
  • It works for SAS to find a side and for SSS to find an angle.

Law of Cosines example

Problem

Two trails leave a campsite \(C\) and spread apart by \(117^{\circ}\). One runs 8 mi to a lake and the other 13 mi to a tower. How far apart are the lake and tower? Use \(\cos 117^{\circ} \approx -0.4540\).

  1. The \(117^{\circ}\) corner sits between the two known trails, so the lake-to-tower distance \(r\) faces it.

  2. Plug in: \(r^2 = 8^2 + 13^2 – 2(8)(13)(-0.4540) = 64 + 169 + 94.4\).

  3. Add and root: \(r^2 \approx 327.4\), so \(r \approx 18.1\) mi.

The lake and tower are about 18.1 mi apart.

Common mistake

Watch out

Pablo reads the minus in the formula as final and computes \(64 + 169 – 94.4 = 138.6\), so \(r \approx 11.8\) mi.

Why it is wrong

The law of cosines needs care with signs: the cosine of \(117^{\circ}\) is negative, so subtracting \(2pq\cos R\) means subtracting a negative number, which adds 94.4. A trail pair that spreads wider than a right angle must produce a distance longer than the hypotenuse \(\sqrt{8^2 + 13^2} \approx 15.3\) mi.

Related terms and lessons

Browse the glossary: A–Z list · Geometry vocabulary · Trigonometry

Rate this page