To find the cosine of an angle in a triangle, the lengths of the sides are known, we can use the theorem of the cosine ofs. According to this theorem, the squared length of an arbitrary side of a triangle equals the sum of the squares of its two other sides without twice the product of the lengths of these sides into the cosine of the angle between them:

and?=b?+c?-2*b*c*cos?, where:

a, b, C be the sidelengths of a triangle (or rather their lengths),

? – the angle opposite the side a (its value).

From these equalities easily is cos?:

cos?=( b?+c?-huh? )/(2*b*c)

Example 1.

There is a triangle with sides a, b, C equal 3, 4, 5 mm respectively.

Find the cosine of the angle between the long sides.


According to the problem conditions we have:




We denote the opposite side and the angle across the? then, according to the formula derived above, we have:

cos?=(b?+c?-huh? )/(2*b*c)=(4?+5?-3?)/(2*4*5)=(16+25-9)/40=32/40=0,8

The answer of 0.8.
If the triangle is rectangular, then to find the cosine ofa angle is enough to know only the lengths of any two sides of (the cosine of a right angle is equal to 0).

Suppose you have a rectangular triangle with sides a, b, C, where C is the hypotenuse.

Consider all the options:

Example 2.

Find cos?, if you know the lengths of the sides a and b (sides of triangle)

We use advanced Pythagorean theorem:



cos?=(b?+c?-huh? )/(2*b*c)=(b?+b?+huh?-huh?)/(2*b*v(b?+a?))=(2*b?)/(2*b*v(b?+a?))=b/v(b?+huh?)

To check the correctness of the formula, substitute in the values from example 1, i.e.



Doing elementary calculations, we get:

Similarly, is the cosine of the rectangular triangle in other cases:

Example 3.

Known a and C (hypotenuse and opposite side), find cos?



cos?=(b?+c?-huh? )/(2*b*c)=(C?-a?+with?-huh?)/(2*s*v (? -a?))=(2*s?-2*a?)/(2*s*v (? -a?))=v (? -huh?)/C.

Substituting the values a=3 and C=5 from the first example, we get:

Example 4.

Famous b and C (the hypotenuse and adjacent side).

Find cos?

Producing the same (shown in examples 2 and 3 of the transition), we obtain that in this case the cosine in the triangle is calculated by a simple formula:


The simplicity of obtained formula is explained simple: in fact, adjacent to the corner ? side is the projection of the hypotenuse, so its length is equal to the length of the hypotenuse multiplied by cos?.

Substituting the values b=4 and C=5 from the first example, will get:


So all our formulas are correct.