# Law of Cosines Formula

If the two sides and angles of the triangle are given, then the unknown side and angles can be calculated using the cosine law. Law of cosine is another formula used to find out the unknown side of the triangle.

The Law of Cosine Formula is,

$\large a^2=b^2+c^2-2(bc)+Cos\;A$
$\large b^2=a^2+c^2-2(ac)+Cos\;B$
$\large c^2=a^2+b^2-2(ab)+Cos\;C$

The cosine law can be derived out of Pythagoras Theorem.

The Pythagorean theorem can be derived from the cosine law. In the case of a right triangle the angle, θ = 90°. So, the value of cos θ becomes 0 and thus the law of cosines reduces to $c^2=a^2+b^2$

## Law of Cosines Problem

Some solved problem on the law of cosines are given below:

### Solved Examples

Question 1: Given the sides of the triangle b = 7 cm; c = 9 cm and the angle A = 45o. Calculate the unknown sides and angles ?
Solution:

Given,
b = 7 cm
c = 8 cm
A = 45o

The law of cosines formula is,
a2 = b2 + c2 – 2bc cos A
a2 = (7 cm)2 + (8 cm)2 – 2(7 cm)(8 cm) cos 45
a2 = 49 cm2 + 64 cm2 – (112 cm2 $\times$ 0.707)
a2 = 49 cm2 + 64 cm2 – 79.18 cm2
a2 = 33.11
a = 5.75 cm

b2 = a2 + c2 – 2ac cos B
(7 cm)2 = (6.397 cm)2 + (8 cm)2 – 2(6.397 cm)(9 cm) cos B
49 cm2 = 40.918 cm2 + 64 cm2 – (115.146 cm2 $\times$ cos B)
115.146 cm2 $\times$ cos B = 40.918 cm2 + 64 cm2 – 49 cm2
115.146 cm2 $\times$ cos B = 55.91 cm2

cos B = $\frac{55.91 cm^{2}}{115.146 cm^{2}}$

cos B = 0.48
B = 88o

c2 = a2 + b2 – 2ab cos C
(8 cm)2 = (6.397 cm)2 + (7 cm)2 – 2(6.397 cm)(7 cm) cos B
64 cm2 = 40.918 cm2 + 49 cm2 – (89.558 cm2 $\times$ cos B)
89.558 cm2 $\times$ cos B = 40.918 cm2 + 49 cm2 – 64 cm2
89.558 cm2 $\times$ cos B = 8.918 cm2

cos B = $\frac{8.918 cm^{2}}{89.558 cm^{2}}$

cos B = 0.28
B = 96.10o