In geometry, a hypotenuse is the side of a right triangle that is opposite to the right angle. [1] It is always the longest side of the triangle. The other two sides of a right triangle are called legs or catheti. [2] [3]
The length of the hypotenuse can be found using the Pythagorean theorem, which states that the square of the length of the hypotenuse equals the sum of the squares of the lengths of the other two sides. As an algebraic formula, this can be written as , where is the length of one leg, is the length of the other leg, and is the length of the hypotenuse. [4] For example, if the two legs of a right triangle have lengths 3 and 4, respectively, then the hypotenuse has length 5, because . [2]
The English word hypotenuse is derived from the Greek word hypoteinousa (ὑποτείνουσα), which means "stretching under". It refers to how the hypotenuse "stretches under" the right angle. [5] [6]
Plato used the word in the 4th century BCE. [7] It was loaned into Latin as hypotenusa and later into French as hypoténuse. [8] It first appeared in English in the 1570s. [5]
The Pythagorean theorem states that the square of the length of the hypotenuse () is equal to the sum of the squares of the lengths of the other two sides ( and ). This can be written as the equation . To calculate the length of the hypotenuse, the equation can be rearranged to solve for by taking the square root of both sides, yielding . This is sometimes known as Pythagorean addition. [9] For example, if the two legs of a right triangle have lengths 3 and 4, respectively, then the hypotenuse has length 5, because . [2]
The Pythagorean theorem is a special case of the law of cosines, a more general theorem relating the lengths of sides in any triangle. It states that where is the angle between sides and . [10] When is radians or 90°, then and the formula reduces to the usual Pythagorean theorem.
The sine and cosine functions (sin and cos) describe the relationship of the hypotenuse to the lengths and angles of the other two sides. These, along with tangent (tan), are the most common trigonometric functions. [2]
The trig functions are usually described in terms of one of the acute angles of a right triangle (), the leg that is adjacent to that angle, and the leg that is opposite that angle. The sine of the acute angle gives the ratio of the opposite leg to the hypotenuse, while the cosine of the angle gives the ratio of the adjacent leg to the hypotenuse. This can be written as the equations:
The definitions of the sine, cosine and tangent functions are often remembered using the mnemonic "SOH-CAH-TOA", where "SOH" stands for "sine = opposite / hypotenuse", "CAH" stands for "cosine = adjacent / hypotenuse", and "TOA" stands for "tangent = opposite / adjacent". [2]
Many programming languages support a version of the ISO C standard function hypot(x, y), which calculates the hypotenuse of a right triangle using the Pythagorean theorem. [11] [12] [13] The function is designed not to fail where the straightforward calculation might overflow or underflow. It can often be more accurate and slower than the straightforward calculation. [9]
Some languages have extended the definition to higher dimensions. For example, C++17 supports std::hypot(x, y, z) which gives the length of the diagonal of a rectangular cuboid with edge lengths x, y, and z. [14] Python 3.8 includes a version of math.hypot which can handle an arbitrary number of arguments. [15]
...Also a right-angled triangle has one angle a right angle, the side opposite this angle being called the hypotenuse;...