Law of Cosines

Law of Cosines

How to solve the law of cosines problems: formula, proof, examples, and their solutions.

Formula

a^2 = b^2 + c^2 - 2bc cos A. a, b, c: Sides of a triangle. A: Angle opposite to side a.

a2 = b2 + c2 - 2bc cos A

a, b, c: Sides of a triangle
A: Angle opposite to side a

Proof

Law of Cosines: Proof of the Formula

Set A(0, 0) and B(c, 0).

Think C as the point on the circle
whose radius is b.
Then C(b cos A, b sin A).

Point on a circle (using sine and cosine)

BC = a
= [distance between C(b cos A, b sin A) and B(c, 0)]

Distance formula

Square of a difference

Pythagorean identities

Example 1

Find the value of x. Sides: 5, 8, x. Angle opposite to side x: 60 degrees.

The law of cosines is used when
[2 sides, 1 angle] → [other side].
([Given] → [Find])

Sides: x, 5, 8
Angle opposite to side x: 60º

x2 = 52 + 82 - 2⋅5⋅8 cos 60º

Draw a 30-60-90 triangle.

Cosine: CAH.
So cos 60º = 1/2.

So x = 25 + 64 - 2⋅5⋅8⋅(1/2).

Example 2

Find the value of theta. Sides: 5, 6, 4. Angle opposite to side 6: theta.

The law of cosines is also used when
[3 sides] → [1 angle].
([Given] → [Find])

Sides: 5, 6, 4
Angle opposite to side 6: θ

62 = 52 + 42 - 2⋅5⋅4 cos θ

cos θ = 1/8

So θ = arccos (1/8).

arccos (1/8) ≈ 1.445 rad
≈ 82.82º

Solving arccosine functions