# Law of Cosines Calculator

## Solve triangles using the law of cosines

The calculator will solve the given triangle using the law of cosines (wherever possible), with steps shown.

Related calculator: Law of Sines Calculator

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Solve the triangle, if $a = 7$, $b = 14$, $C = 60^0$.

### Solution

According to the law of cosines: $c^{2} = a^{2} + b^{2} - 2 a b \cos{\left(C \right)}$.

In our case, $c^{2} = 7^{2} + 14^{2} - \left(2\right)\cdot \left(7\right)\cdot \left(14\right)\cdot \left(\cos{\left(60^0 \right)}\right) = 147$.

Thus, $c = 7 \sqrt{3}$.

According to the law of cosines: $a^{2} = b^{2} + c^{2} - 2 b c \cos{\left(A \right)}$.

In our case, $7^{2} = 14^{2} + \left(7 \sqrt{3}\right)^{2} - \left(2\right)\cdot \left(14\right)\cdot \left(7 \sqrt{3}\right)\cdot \left(\cos{\left(A \right)}\right)$.

Thus, $\cos{\left(A \right)} = \frac{\sqrt{3}}{2}$.

Hence, $A = 30^0$.

The third angle is $B = 180^0 - \left(A + C\right)$.

In our case, $B = 180^0 - \left(30^0 + 60^0\right) = 90^0$.

The area is $S = \frac{1}{2} a b \sin{\left(C \right)} = \left(\frac{1}{2}\right)\cdot \left(7\right)\cdot \left(14\right)\cdot \left(\sin{\left(60^0 \right)}\right) = \frac{49 \sqrt{3}}{2}.$

The perimeter is $P = a + b + c = 7 + 14 + 7 \sqrt{3} = 7 \left(\sqrt{3} + 3\right)$.

$a = 7$A

$b = 14$A

$c = 7 \sqrt{3}\approx 12.124355652982141$A

$A = 30^0$A

$B = 90^0$A

$C = 60^0$A

Area: $S = \frac{49 \sqrt{3}}{2}\approx 42.435244785437494$A.

Perimeter: $P = 7 \left(\sqrt{3} + 3\right)\approx 33.124355652982141$A.