##### The law of Sines and Cosines

The law of sines and cosines helps us solving  triangles.
In trigonometry the law of sines and cosines is an equation relating the lengths of the sides to any triangle with the sines of the angles.

TIP! Firstly you must read Trigonometry

## Law of Sines

In any triangle the ration between any side lengths with the sinuses of the angle in front of the side is a constant value and is equal with the diameter of the circle drawn outside of the triangle.

$\displaystyle \frac{a}{\sin A}=\frac{b}{\sin B}=\frac{c}{\sin C}=D$

We can use the Law of Sine when we know two sides and one of their opposite angle or two angles and one of their opposite sides of the triangle.

We can write the law also in the form:

$\displaystyle \frac{\sin A}{a}=\frac{\sin B}{b}=\frac{\sin C}{c}$

Example 1: We are given two angles $\displaystyle \widehat{B}={{60}^{\circ }}$ and  $\displaystyle \widehat{C}={{45}^{\circ }}$ also the side opposite the angle B, b = 18. Find the side opposite the angle C.

Solution: Since we are given one angle and the side in front of the angle and another angle and we need to find the side in front of this angle we can use the sine law.

$\displaystyle \frac{b}{\sin B}=\frac{c}{\sin C}$

$\displaystyle \frac{18}{\sin {{60}^{\circ }}}=\frac{c}{\sin {{45}^{\circ }}}$

c = $\displaystyle \frac{18\cdot \sin {{45}^{{}^\circ }}}{\sin {{60}^{{}^\circ }}}$

$\displaystyle c=\frac{18\cdot \frac{\sqrt{2}}{2}}{\frac{\sqrt{3}}{2}}$

c = $\displaystyle 18\cdot \frac{\sqrt{2}}{2}\cdot \frac{2}{\sqrt{3}}$

c = $\displaystyle 18\cdot \frac{\sqrt{2}}{\sqrt{3}}$

$\displaystyle c=18\frac{\sqrt{2}\cdot \sqrt{3}}{3}$

c = $\displaystyle 6\sqrt{6}$

## Law of Cosines

In any triangle the square of any side is equal to the sum of the square of the other two sides minus twice the product of those two sides and the cosines between them.

c² = a² + b² – 2ab⋅cosC

We can write the law also in the form:
a² = b² + c² – 2bc⋅cosA
b² = a² + c² – 2ac⋅cosB

We can use the law of cosine when we know two sides and the angle between those two sides but we can also use it to find the angle between two sides when we know all the sides.

Also when we want to find the angles:

cosC = $\displaystyle \frac{{{a}^{2}}+{{b}^{2}}-{{c}^{2}}}{2ab}$

cosA = $\displaystyle \frac{{{b}^{2}}+{{c}^{2}}-{{a}^{2}}}{2bc}$

cosB = $\displaystyle \frac{{{a}^{2}}+{{c}^{2}}-{{b}^{2}}}{2ac}$

Example 2: We are given the a = 5 cm, b=12 cm and C = 60°. Find the c.

Solution: Since we are given two side lengths and the angle between them we can use the cosine law to find the side that is missing.

c² = a² + b² – 2ab⋅cos60°

$\displaystyle {{c}^{2}}={{\left( 5 \right)}^{2}}+{{\left( 12 \right)}^{2}}-2\cdot 5\cdot 12\cdot \cos {{60}^{\circ }}$

$\displaystyle {{c}^{2}}=25+144-120\cdot \frac{1}{2}$

c² = 169 – 60

c² = 109

So, $\displaystyle c=\sqrt{109}$

Example 3: John is standing on a hill on a 15m distance from the helicopter. The ship watches the helicopter on a 60° angle and with a distance of 10 meters. Find how far is John from the ship?

Solution: Based on the figure above to find how far is John from the ship we can use the Cosine Law:

$\displaystyle {{c}^{2}}={{a}^{2}}+{{b}^{2}}-2ab\cdot cosC$

x² = 15² + 10² – 2 ⋅ 15 ⋅ 10 ⋅ cos60°

x² = 225 + 100 – 300 ⋅ $\displaystyle \frac{1}{2}$

x² = 325 – 150

x² = 175

x = $\displaystyle \sqrt{{175}}$

x $\displaystyle \approx 13.2$

John is approximately 13.2 m from the ship