The **Cosine Rule** says that the square of the length of any side of a given triangle is equal to the sum of the squares of the length of the other sides minus twice the product of the other two sides multiplied by the cosine of angle included between them. Suppose, a, b and c are the lengths of the side of a triangle ABC, then;

a^{2} = b^{2} + c^{2} – 2bc cos∠x

b^{2} = a^{2} + c^{2} – 2ac cos∠y

c^{2} = a^{2} + b^{2} – 2ab cos ∠z

where ∠x, ∠y and ∠z are the angles between the sides of the triangle.

In Trigonometry, the **law of cosines** is also known as **Cosine Formula or Cosine Rule.** These rules relate with the lengths of the sides of a triangle with any of its angle being a cosine angle. With the help of this rule we can calculate the length of the side of a triangle or can find the measure of the angle between the sides.

As per the diagram, Cosine rules to find the length of the sides a, b & c of the triangle ABC is given by;

- a
^{2}= b^{2}+ c^{2}– 2bc cos x - b
^{2}= a^{2}+ c^{2}– 2ac cos y - c
^{2}= a^{2}+ b^{2}– 2ab cos z

Similarly, to find the angles x, y and z, these formulae can be re-written as :

- cos x = (b
^{2}+ c^{2}-a^{2})/2bc - cos y = (a
^{2}+ c^{2}-b^{2})/2ac - cos z = (a
^{2}+ b^{2}– c^{2})/2ab

**Also, read**:

- Cosine Function
- Inverse Cosine

The law of cosine states that for any given triangle say ABC, with sides a, b and c, we have;

c^{2} = a^{2} + b^{2} – 2ab cos C

Now let us proof this law.

Suppose a triangle ABC is given to us here. From the vertex of angle B we draw a perpendicular touching the side AC at point D. This is the height of the triangle denoted by h.

Now in triangle BCD, as per the trigonometry ratio, we know;

cos C = CD/a [cos θ = Base/Hypotenuse]

or we can write;

CD = a cos C ………… (1)

Subtracting equation 1 from side b on both the sides, we get;

b – CD = b – a cos C

or

DA = b – a cos C

Again, in triangle BCD, as per the trigonometry ratio, we know;

sin C = BD/a [sin θ = Perpendicular/Hypotenuse]

or we can write;

BD = a sin C ……….(2)

Now using Pythagoras theorem in triangle ADB, we get;

c^{2} = BD^{2} + DA^{2} [Hypotenuse^{2} = Perpendicular^{2} + Base^{2} ]

Substituting the value of DA and BD from equation 1 and 2, we get;

c^{2} = (a sin C)^{2} + (b – a cos C)^{2}

c^{2} = a^{2} sin^{2}C + b^{2} – 2ab cos C + a^{2} cos^{2} C

c^{2} = a^{2} (sin^{2}C + cos^{2} C) + b^{2} – 2ab cos C

By trigonometric identities, we know;

sin^{2}θ+ cos^{2}θ = 1

Therefore,

c^{2} = a^{2} + b^{2} – 2ab cos C

Hence, proved.

Find the length of x in the following figure.

**Solution: **By applying the **Cosine rule**, we get:

x^{2} = 22^{2} +28^{2} – 2 x 22 x 28 cos 97

x^{2} = 1418.143

x = √ 1418.143