Law of Cosines

This article is about Trigonometric law which is a Cosine law. Here you will the definition, formula and solved questions which are based on Cosine’s law. Keep reading the article below.

Law of Cosines Definition

Law of Cosines, also known as Cosine Rule or Cosine Formula, basically relates the length of the triangle to the cosines of one its angles, in Trigonometry.

Law of Cosines

Law of Cosine Formula

As per the law of cosines formula, to find the length of sides of triangle say \(\Delta\)ABC, we can write as;

\(a^{2}\)=\(b^{2}\)+\(c^{2}\)-2bc cos(x)

\(b^{2}\)=\(a^{2}\)+\(c^{2}\)-2ac cos(y)

\(c^{2}\)=\(a^{2}\)+\(b^{2}\)-2bc cos(z)

And if we want to find the angles of \(\Delta\)ABC, then the cosine rule is applied 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

Proof of Law of Cosines

Now let us learn the law of cosines proof here;

In the right triangle BCD, by the definition of cosine:

cos C=\(\frac{CD}{a}\)


CD=a cos C

Subtracting above equation from side b, we get

DA=b−acosC ……(1)

In the triangle BCD, according to Sine definition

sin C=\(\frac{BD}{a}\)


BD=asinC ……(2)

In the triangle ADB, if we apply the Pythagorean Theorem, then


Substituting for BD and DA from equations (1) and (2)

\(c^{2}\)=\((a sin C)^{2}\) + \((b-acosC)^{2}\)

By Cross Multiplication we get:

\(c^{2}\)= \(a^{2}\) \(sin^{2}C\) + \(b^{2}\)-2abcosC+ \(a^{2}\) \(cos^{2}C\)

Rearranging the above equation:

\(c^{2}\)= \(a^{2}\) \(sin^{2}C\)+\(a^{2}\) \(cos^{2}C\)+\(b^{2}\)-2ab cosC

Taking out \(a^{2}\) as a common factor, we get;

\(c^{2}\)= \(a^{2}\)(\(sin^{2}C\)+\(cos^{2}C\))+\(b^{2}\)-2ab cosC

Now from the above equation, you know that,

\(sin^{2}\Theta\) + \(cos^{2}\Theta\)=1


\(c^{2}\)=\(a^{2}\)+\(b^{2}\)-2ab cosC

Hence, the Cosine rule proved.

Cosine Law Problems and Solutions:

Let us understand the concept by solving one of the law of cosines problems;

Problem: A triangle ABC has sides a=10cm, b=7cm and c=5cm. Now, find its angle ‘x’.

Solution: Consider the below triangle as triangle ABC, where,




By using cosines law or the law of cosines,

\(a^{2}\)=\(b^{2}\)+\(c^{2}\)-2bc cos(x)



Substituting the value of the sides of the triangle, a,b and c, we get



cos(x)= -0.37 (Answer)

Try to solve more problems based on cosines formula by changing the values of sides a, b & c and cross-check law of cosines calculator available in BYJU’S.

Learn more about the Maths Trigonometry topic by downloading BYJU’S – The learning App.

Practise This Question

What are the factors of the term 5xy ?