The Law of Cosines, also called the Cosine Rule or the Cosine Law, states that the square of a side of a triangle is equal to the sum of the squares of the other two sides minus twice their product times the cosine of their included angle.

If a, b, and c are the lengths of the sides of a triangle, and A, B, and C are the measures of the angles opposite these sides, then
c2 = a2 + b2 β 2ab cos(90)
c2 = a2 + b2 since cos(90) = 0
The Cosine Rule is a generalization of the Pythagorean theorem so that the formula works for any triangle.
Which angle is in the formula for b2?
Angle B. It is the angle opposite side b, and it sits between the other two sides, a and c.
We use the Law of Cosines to solve an oblique triangle or any triangle that is not a right triangle. When solving an oblique triangle, you are trying to find the lengths of the three sides and the measures of the three angles of the oblique triangle.
If two sides and the included angle (SAS) of an oblique triangle are known, then none of the three ratios in the Law of Sines is known. Therefore you must first use the law of cosines to find the third side or the side opposite the given angle. Follow the three steps below to solve an oblique triangle.
If three sides (SSS) are known, solving the triangle means finding the three angles. Follow the following three steps to solve the oblique triangle.
The angle in the formula must be the angle between the two sides you use, which is also the angle opposite the side you are finding. For a2, use b, c and angle A, never angle B or C.
You know all three sides of a triangle: 4, 6 and 9. Which angle should you find first?
The angle opposite the side of length 9. In an SSS triangle, start with the largest angle, which is opposite the longest side.

The lengths of the sides of the triangle are 7, 8, and 13. The measures of the angles of the triangle are 27.81, 32.19, and 120 degrees.
Example #2: Solve a triangle ABC if a = 9, b = 12, and c = 10.
There are no missing sides. We just need to find the missing angles. Since the angle opposite the longest side is angle B, use b2 = a2 + c2 β 2ac cos(B) to find cos(B).
b2 = a2 + c2 β 2ac cos(B)
122 = 92 + 102 β 2(9)(10) cos(B)
144 = 81 + 100 β 2(90) cos(B)
144 = 181 β 180 cos(B)
144 β 181 = β180 cos(B)
β37 = β180 cos(B)
Divide both sides by β180
cos(B) = β37 / β180 = 0.2056
B = arccos(0.2056)
B = 78.14 degrees
Use the Law of Sines to find angle A
sin(A) / a = sin(B) / b
sin(A) / 9 = sin(78.14) / 12
sin(A) / 9 = 0.97865 / 12
sin(A) / 9 = 0.081554
Multiply both sides by 9
sin(A) = 0.081554(9)
sin(A) = 0.734
A = arcsin(0.734)
A = 47.22 degrees
Angle C = 180 β 78.14 β 47.22
Angle C = 54.64
In a triangle, b = 3, c = 5 and A = 120 degrees. Find a.
a = 7. a2 = 9 + 25 β 2(3)(5)(β0.5) = 34 + 15 = 49, so a = β49 = 7.
To prove the Law of Cosines, put a triangle ABC in a rectangular coordinate system as shown in the figure below. Notice that the vertex A is placed at the origin and side c lies along the positive x-axis.

Use the distance formula and the points (x,y) and (c,0) to find the length of a.
a = β(x β c)2 + (y β 0)2
a = β(x β c)2 + y2
Square both sides of the equation
a2 = (x β c)2 + y2
Now, we need to find x and y and replace them in a2 = (x β c)2 + y2
Using the triangle, write expressions for sin A and cos A and then solve for x and y.
sin(A) = y / b, so y = b sin(A)
cos(A) = x / b, so x = b cos(A)
a2 = (b cos A β c)2 + (b sin A)2
a2 = b2 cos2 A β 2bc cos A + c2 + b2 sin2 A
Rearrange terms
a2 = b2 cos2 A + b2 sin2 A + c2 β 2bc cos A
a2 = b2(cos2 A + sin2 A) + c2 β 2bc cos A
a2 = b2(1) + c2 β 2bc cos A since cos2 A + sin2 A = 1
a2 = b2 + c2 β 2bc cos A.
The proof can also be done with a triangle that has an obtuse angle. The result will still be the same.
Now check what you learned. Every answer is explained, and each time you play you get new questions.
Quiz Complete!