Law of Cosines Calculator

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.

Your Input

Solve the triangle, if $$$a = 7$$$, $$$b = 8$$$, $$$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} + 8^{2} - \left(2\right)\cdot \left(7\right)\cdot \left(8\right)\cdot \left(\cos{\left(60^0 \right)}\right) = 57$$$.

Thus, $$$c = \sqrt{57}$$$.

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

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

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

Hence, $$$A = \left(\frac{180 \operatorname{acos}{\left(\frac{3 \sqrt{57}}{38} \right)}}{\pi}\right)^0$$$.

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

In our case, $$$B = 180^0 - \left(\left(\frac{180 \operatorname{acos}{\left(\frac{3 \sqrt{57}}{38} \right)}}{\pi}\right)^0 + 60^0\right) = \left(\frac{- \pi \left(\frac{180 \operatorname{acos}{\left(\frac{3 \sqrt{57}}{38} \right)}}{\pi} + 60\right) + 180 \pi}{\pi}\right)^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(8\right)\cdot \left(\sin{\left(60^0 \right)}\right) = 14 \sqrt{3}$$$.

The perimeter is $$$P = a + b + c = 7 + 8 + \sqrt{57} = \sqrt{57} + 15$$$.

Answer

$$$a = 7$$$A

$$$b = 8$$$A

$$$c = \sqrt{57}\approx 7.54983443527075$$$A

$$$A = \left(\frac{180 \operatorname{acos}{\left(\frac{3 \sqrt{57}}{38} \right)}}{\pi}\right)^0\approx 53.413224446370538^0$$$A

$$$B = \left(\frac{- \pi \left(\frac{180 \operatorname{acos}{\left(\frac{3 \sqrt{57}}{38} \right)}}{\pi} + 60\right) + 180 \pi}{\pi}\right)^0\approx 66.586775553629462^0$$$A

$$$C = 60^0$$$A

Area: $$$S = 14 \sqrt{3}\approx 24.248711305964282$$$A.

Perimeter: $$$P = \sqrt{57} + 15\approx 22.54983443527075$$$A.