page_title: Pythagorean theorem
section_title: Law of cosines
hierarchical_section_title: Pythagorean theorem / Generalizations / Law of cosines
context_page_description: In mathematics, the Pythagorean theorem, also known as Pythagoras' theorem, is a fundamental relation in Euclidean geometry among the three sides of a right triangle. It states that the area of the square whose side is the hypotenuse is equal to the sum of the areas of the squares on the other two sides. This theorem can be written as an equation relating the lengths of the sides a, b and c, often called the "Pythagorean equation":
  where c represents the length of the hypotenuse and a and b the lengths of the triangle's other two sides. The theorem, whose history is the subject of much debate, is named for the ancient Greek thinker Pythagoras.
  The theorem has been given numerous proofs – possibly the most for any mathematical theorem. They are very diverse, including both geometric proofs and algebraic proofs, with some dating back thousands of years. The theorem can be generalized in various ways, including higher-dimensional spaces, to spaces that are not Euclidean, to objects that are not right triangles, and indeed, to objects that are not triangles at all, but n-dimensional solids.
context_section_description: The Pythagorean theorem is a special case of the more general theorem relating the lengths of sides in any triangle, the law of cosines:
  where  is the angle between sides  and .
  When  is  radians or 90°, then , and the formula reduces to the usual Pythagorean theorem.
caption: The separation s of two points (r1, θ1) and (r2, θ2) in polar coordinates is given by the law of cosines. Interior angle Δθ = θ1−θ2.