# Law of Cosines

The **Law of Cosines** is a theorem which relates the side-lengths and angles of a triangle. For a triangle with edges of length , and opposite angles of measure , and , respectively, the Law of Cosines states:

In the case that one of the angles has measure (is a right angle), the corresponding statement reduces to the Pythagorean Theorem.

## Proofs

### Acute Triangle

Let , , and be the side lengths, is the angle measure opposite side , is the distance from angle to side , and and are the lengths that is split into by .

We use the Pythagorean theorem:

We are trying to get on the LHS, because then the RHS would be .

We use the addition rule for cosines and get:

We multiply by -2ab and get:

Now remember our equation?

We replace the by and get:

We can use the same argument on the other sides.

### Right Triangle

Since , , so the expression reduces to the Pythagorean Theorem. You can find several proofs of the Pythagorean Theorem here.

### Obtuse Triangle

The argument for an obtuse triangle is the same as the proof for an acute triangle.