# Right triangle

A right triangle or right-angled triangle, sometimes called an orthogonal triangle or rectangular triangle, is a triangle in which two sides are perpendicular, forming a right angle (1⁄4 turn or 90 degrees).
The side opposite to the right angle is called the hypotenuse (side $c$ in the figure). The sides adjacent to the right angle are called legs (or catheti, singular: cathetus). Side $a$ may be identified as the side adjacent to angle $B$ and opposite (or opposed to) angle $A,$ while side $b$ is the side adjacent to angle $A$ and opposite angle $B.$
Every right triangle is half of a rectangle which has been divided along its diagonal. When the rectangle is a square, its right-triangular half is isosceles, with two congruent sides and two congruent angles. When the rectangle is not a square, its right-triangular half is scalene.
Every triangle whose base is the diameter of a circle and whose apex lies on the circle is a right triangle, with the right angle at the apex and the hypotenuse as the base; conversely, the circumcircle of any right triangle has the hypotenuse as its diameter. This is Thales' theorem.
The legs and hypotenuse of a right triangle satisfy the Pythagorean theorem: the sum of the areas of the squares on two legs is the area of the square on the hypotenuse, $a^{2}+b^{2}=c^{2}.$ If the lengths of all three sides of a right triangle are integers, the triangle is called a Pythagorean triangle and its side lengths are collectively known as a Pythagorean triple.
The relations between the sides and angles of a right triangle provides one way of defining and understanding trigonometry, the study of the metrical relationships between lengths and angles.

## Principal properties
### Sides

The three sides of a right triangle are related by the Pythagorean theorem, which in modern algebraic notation can be written
    $a^{2}+b^{2}=c^{2},$
where $c$ is the length of the hypotenuse (side opposite the right angle), and $a$ and $b$ are the lengths of the legs (remaining two sides). Pythagorean triples are integer values of $a,b,c$ satisfying this equation. This theorem was proven in antiquity, and is proposition I.47 in Euclid's Elements: "In right-angled triangles the square on the side subtending the right angle is equal to the squares on the sides containing the right angle."

### Area

As with any triangle, the area is equal to one half the base multiplied by the corresponding height. In a right triangle, if one leg is taken as the base then the other is height, so the area of a right triangle is one half the product of the two legs. As a formula the area $T$ is
    $T={\tfrac {1}{2}}ab$
where $a$ and $b$ are the legs of the triangle.
If the incircle is tangent to the hypotenuse $AB$ at point $P,$ then letting the semi-perimeter be $s={\tfrac {1}{2}}(a+b+c),$ we have $|PA|=s-a$ and $|PB|=s-b,$ and the area is given by
    $T=|PA|\cdot |PB|=(s-a)(s-b).$
This formula only applies to right triangles.

### Altitudes

If an altitude is drawn from the vertex, with the right angle to the hypotenuse, then the triangle is divided into two smaller triangles; these are both similar to the original, and therefore similar to each other. From this:
* The altitude to the hypotenuse is the geometric mean (mean proportional) of the two segments of the hypotenuse.$^{:243}$
* Each leg of the triangle is the mean proportional of the hypotenuse and the segment of the hypotenuse that is adjacent to the leg.
In equations,
    $f^{2}=de,$ (this is sometimes known as the right triangle altitude theorem)
    $b^{2}=ce,$
    $a^{2}=cd$
where $a,b,c,d,e,f$ are as shown in the diagram. Thus
    $f={\frac {ab}{c}}.$
Moreover, the altitude to the hypotenuse is related to the legs of the right triangle by
    ${\frac {1}{a^{2}}}+{\frac {1}{b^{2}}}={\frac {1}{f^{2}}}.$
For solutions of this equation in integer values of $a,b,c,f,$ see here.
The altitude from either leg coincides with the other leg. Since these intersect at the right-angled vertex, the right triangle's orthocenter—the intersection of its three altitudes—coincides with the right-angled vertex.

### Inradius and circumradius

The radius of the incircle of a right triangle with legs $a$ and $b$ and hypotenuse $c$ is
    $r={\frac {a+b-c}{2}}={\frac {ab}{a+b+c}}.$
The radius of the circumcircle is half the length of the hypotenuse,
    $R={\frac {c}{2}}.$
Thus the sum of the circumradius and the inradius is half the sum of the legs:
    $R+r={\frac {a+b}{2}}.$
One of the legs can be expressed in terms of the inradius and the other leg as
    $a={\frac {2r(b-r)}{b-2r}}.$

## Characterizations

A triangle $\triangle ABC$ with sides $a\leq b<c$, semiperimeter s=1/2 (a+b+c){\textstyle s={\tfrac {1}{2}}(a+b+c)}, area $T,$ altitude $h_{c}$ opposite the longest side, circumradius $R,$ inradius $r,$ exradii $r_{a},r_{b},r_{c}$ tangent to $a,b,c$ respectively, and medians $m_{a},m_{b},m_{c}$ is a right triangle if and only if any one of the statements in the following six categories is true. Each of them is thus also a property of any right triangle.

### Sides and semiperimeter

* $a^{2}+b^{2}=c^{2}\quad ({\text{Pythagorean theorem}})$
* $(s-a)(s-b)=s(s-c)$
* $s=2R+r.$
* $a^{2}+b^{2}+c^{2}=8R^{2}.$

### Angles

* $A$ and $B$ are complementary.
* $\cos {A}\cos {B}\cos {C}=0.$
* $\sin ^{2}{A}+\sin ^{2}{B}+\sin ^{2}{C}=2.$
* $\cos ^{2}{A}+\cos ^{2}{B}+\cos ^{2}{C}=1.$
* $\sin {2A}=\sin {2B}=2\sin {A}\sin {B}.$

### Area

* $T={\frac {ab}{2}}$
* $T=r_{a}r_{b}=rr_{c}$
* $T=r(2R+r)$
* $T={\frac {(2s-c)^{2}-c^{2}}{4}}=s(s-c)$
* $T=|PA|\cdot |PB|,$ where $P$ is the tangency point of the incircle at the longest side $AB.$

### Inradius and exradii

* $r=s-c=(a+b-c)/2$
* $r_{a}=s-b=(a-b+c)/2$
* $r_{b}=s-a=(-a+b+c)/2$
* $r_{c}=s=(a+b+c)/2$
* $r_{a}+r_{b}+r_{c}+r=a+b+c$
* $r_{a}^{2}+r_{b}^{2}+r_{c}^{2}+r^{2}=a^{2}+b^{2}+c^{2}$
* $r={\frac {r_{a}r_{b}}{r_{c}}}.$

### Altitude and medians

* $h_{c}={\frac {ab}{c}}$
* $m_{a}^{2}+m_{b}^{2}+m_{c}^{2}=6R^{2}.$$^{:Prob.954,p.26}$
* The length of one median is equal to the circumradius.
* The shortest altitude (the one from the vertex with the biggest angle) is the geometric mean of the line segments it divides the opposite (longest) side into. This is the right triangle altitude theorem.

### Circumcircle and incircle

* The triangle can be inscribed in a semicircle, with one side coinciding with the entirety of the diameter (Thales' theorem).
* The circumcenter is the midpoint of the longest side.
* The longest side is a diameter of the circumcircle $(c=2R).$
* The circumcircle is tangent to the nine-point circle.
* The orthocenter lies on the circumcircle.
* The distance between the incenter and the orthocenter is equal to ${\sqrt {2}}r$.

## Trigonometric ratios

The trigonometric functions for acute angles can be defined as ratios of the sides of a right triangle. For a given angle, a right triangle may be constructed with this angle, and the sides labeled opposite, adjacent and hypotenuse with reference to this angle according to the definitions above. These ratios of the sides do not depend on the particular right triangle chosen, but only on the given angle, since all triangles constructed this way are similar. If, for a given angle α, the opposite side, adjacent side and hypotenuse are labeled $O,$ $A,$ and $H,$ respectively, then the trigonometric functions are
    $\sin \alpha ={\frac {O}{H}},\,\cos \alpha ={\frac {A}{H}},\,\tan \alpha ={\frac {O}{A}},\,\sec \alpha ={\frac {H}{A}},\,\cot \alpha ={\frac {A}{O}},\,\csc \alpha ={\frac {H}{O}}.$
For the expression of hyperbolic functions as ratio of the sides of a right triangle, see the hyperbolic triangle of a hyperbolic sector.

## Special right triangles

The values of the trigonometric functions can be evaluated exactly for certain angles using right triangles with special angles. These include the 30-60-90 triangle which can be used to evaluate the trigonometric functions for any multiple of ${\tfrac {1}{6}}\pi ,$ and the isosceles right triangle or 45-45-90 triangle which can be used to evaluate the trigonometric functions for any multiple of ${\tfrac {1}{4}}\pi .$

### Kepler triangle

Let $H,$ $G,$ and $A$ be the harmonic mean, the geometric mean, and the arithmetic mean of two positive numbers $a$ and $b$ with $a>b.$ If a right triangle has legs $H$ and $G$ and hypotenuse $A,$ then
    ${\frac {A}{H}}={\frac {A^{2}}{G^{2}}}={\frac {G^{2}}{H^{2}}}=\phi ,\qquad {\frac {a}{b}}=\phi ^{3},$
where $\phi ={\tfrac {1}{2}}{\bigl1+{\sqrt {5}}{\bigr )}$ is the golden ratio. Since the sides of this right triangle are in geometric progression, this is the Kepler triangle.

## Thales' theorem

Thales' theorem states that if $BC$ is the diameter of a circle and $A$ is any other point on the circle, then $\triangle ABC$ is a right triangle with a right angle at $A.$ The converse states that the hypotenuse of a right triangle is the diameter of its circumcircle. As a corollary, the circumcircle has its center at the midpoint of the diameter, so the median through the right-angled vertex is a radius, and the circumradius is half the length of the hypotenuse.

## Medians

The following formulas hold for the medians of a right triangle:
    $m_{a}^{2}+m_{b}^{2}=5m_{c}^{2}={\frac {5}{4}}c^{2}.$
The median on the hypotenuse of a right triangle divides the triangle into two isosceles triangles, because the median equals one-half the hypotenuse.
The medians $m_{a}$ and $m_{b}$ from the legs satisfy$^{:p.136,#3110}$
    $4c^{4}+9a^{2}b^{2}=16m_{a}^{2}m_{b}^{2}.$

## Euler line

In a right triangle, the Euler line contains the median on the hypotenuse—that is, it goes through both the right-angled vertex and the midpoint of the side opposite that vertex. This is because the right triangle's orthocenter, the intersection of its altitudes, falls on the right-angled vertex while its circumcenter, the intersection of its perpendicular bisectors of sides, falls on the midpoint of the hypotenuse.

## Inequalities

In any right triangle the diameter of the incircle is less than half the hypotenuse, and more strongly it is less than or equal to the hypotenuse times $({\sqrt {2}}-1).$$^{:p.281}$
In a right triangle with legs $a,b$ and hypotenuse $c,$
    $c\geq {\frac {\sqrt {2}}{2}}(a+b)$
with equality only in the isosceles case.$^{:p.282,p.358}$
If the altitude from the hypotenuse is denoted $h_{c},$ then
    $h_{c}\leq {\frac {\sqrt {2}}{4}}(a+b)$
with equality only in the isosceles case.$^{:p.282}$

## Other properties

If segments of lengths $p$ and $q$ emanating from vertex $C$ trisect the hypotenuse into segments of length ${\tfrac {1}{3}}c,$ then$^{:pp.216–217}$
    $p^{2}+q^{2}=5\left({\frac {c}{3}}\right)^{2}.$
The right triangle is the only triangle having two, rather than one or three, distinct inscribed squares.
Given any two positive numbers $h$ and $k$ with $h>k.$ Let $h$ and $k$ be the sides of the two inscribed squares in a right triangle with hypotenuse $c.$ Then
    ${\frac {1}{c^{2}}}+{\frac {1}{h^{2}}}={\frac {1}{k^{2}}}.$
These sides and the incircle radius $r$ are related by a similar formula:
    ${\frac {1}{r}}=-{\frac {1}{c}}+{\frac {1}{h}}+{\frac {1}{k}}.$
The perimeter of a right triangle equals the sum of the radii of the incircle and the three excircles:
    $a+b+c=r+r_{a}+r_{b}+r_{c}.$