# Law of cosines

(Difference between revisions)
Jump to: navigation, search
 Revision as of 14:40, 26 May 2011 (edit) (New page: The law of cosines is a formula that helps in triangulation when two or three side lengths of a triangle are known. The formula relates all three side lengths of a triangle to the cosine o...)← Previous diff Revision as of 15:40, 26 May 2011 (edit) (undo)Next diff → Line 5: Line 5: When to use it: SAS, SSS. When to use it: SAS, SSS. + + ==Proof== + Let $\vartriangle ABC$ be oriented so that $C$ is at the origin, and $B$ is at the point$(a,0)$. + + [[Image:Law_of_cosines_proof.jpg]] + + ===Distance Formula=== + + $distance = \sqrt {(x_{2}-x_{1})^{2} + (y_{2}-y_{1})^{2}}$ + + $c$ is the distance from $A$ to $B$. + + Substituting the appropriate points into the distance formula gives us + + $c = \sqrt {(a-b \cos C)^{2} + (0-b \sin C)^{2}}$ + + Squaring the inner terms, we have + + $c = \sqrt {(a^{2}-2ab \cos C+b^{2} \cos^{2} C) + (b^{2} \sin^{2} C)}$ + + Since $\cos^{2} C + \sin^{2} C = 1$, + + $c = \sqrt {(a^{2}+b^{2}-2ab \cos C+b^{2}}$ + + Square both sides for + + $c^{2} = (a^{2}+b^{2}-2ab \cos C+b^{2}$

## Revision as of 15:40, 26 May 2011

The law of cosines is a formula that helps in triangulation when two or three side lengths of a triangle are known. The formula relates all three side lengths of a triangle to the cosine of a particular angle.

$c^{2} = a^{2} + b^{2} - 2ab \cos C$

When to use it: SAS, SSS.

## Proof

Let $\vartriangle ABC$ be oriented so that $C$ is at the origin, and $B$ is at the point$(a,0)$.

### Distance Formula

$distance = \sqrt {(x_{2}-x_{1})^{2} + (y_{2}-y_{1})^{2}}$

$c$ is the distance from $A$ to $B$.

Substituting the appropriate points into the distance formula gives us

$c = \sqrt {(a-b \cos C)^{2} + (0-b \sin C)^{2}}$

Squaring the inner terms, we have

$c = \sqrt {(a^{2}-2ab \cos C+b^{2} \cos^{2} C) + (b^{2} \sin^{2} C)}$

Since $\cos^{2} C + \sin^{2} C = 1$,

$c = \sqrt {(a^{2}+b^{2}-2ab \cos C+b^{2}}$

Square both sides for

$c^{2} = (a^{2}+b^{2}-2ab \cos C+b^{2}$