Law of cosines


The law of cosines relates the cosine of an angle to the opposite side of an arbitrary triangle and the length of the triangle’s sides.
The law of cosines generalizes the Pythagorean theorem, which holds only for right triangles: if the angle A is a right angle (of measure 90° or π/2 radians), then cosA = 0, and thus the law of cosines reduces to the Pythagorean theorem for the right triangle.

Related formulas


aTriangle's side opposite to the triangle's angle A (dimensionless)
bTriangle's side (dimensionless)
cTriangle's side (dimensionless)
AAngle opposite to the triangle's side a (dimensionless)