# Law of Cosines

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

## Formula

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

## Proof

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

## Example 1

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º*x*^{2} = 5^{2} + 8^{2} - 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

The law of cosines is also used when

[3 sides] → [1 angle].

([Given] → [Find])

Sides: 5, 6, 4

Angle opposite to side 6: *θ*

6^{2} = 5^{2} + 4^{2} - 2⋅5⋅4 cos *θ*

cos *θ* = 1/8

So *θ* = arccos (1/8).

arccos (1/8) ≈ 1.445 rad

≈ 82.82º

Solving arccosine functions