# Triangle

For alternative meanings, such as the musical instrument, see triangle (disambiguation).

A triangle is one of the basic shapes of geometry: a two-dimensional figure with three vertices and three sides which are straight line segments.

## Types of triangles

Triangles can be classified according to the relative lengths of their sides:

• In an equilateral triangle all sides are of equal length. An equilateral triangle is also equiangular, i.e. all its internal angles are equal—namely, 60°; it is a regular polygon
• In an isosceles triangle two sides are of equal length. An isosceles triangle also has two equal internal angles.
• In a scalene triangle all sides have different lengths. The internal angles in a scalene triangle are all different.
 Equilateral triangle Isosceles triangle Scalene triangle Equilateral Isosceles Scalene

Triangles can also be classified according to the size of their largest internal angle, described below using degrees of arc.

• A right triangle (or right-angled triangle) has one 90° internal angle (a right angle). The side opposite to the right angle is the hypotenuse; it is the longest side in the right triangle. The other two sides are the legs of the triangle.
• An obtuse triangle has one internal angle larger than 90° (an obtuse angle).
• An acute triangle has internal angles that are all smaller than 90° (three acute angles).
 Right triangle Obtuse triangle Acute triangle Right Obtuse Acute

## Basic facts

Elementary facts about triangles were presented by Euclid in books 1-4 of his Elements around 300 BCE.

A triangle is a polygon and a 2-simplex (see polytope).

Two triangles are said to be similar if and only if the angles of one are equal to the corresponding angles of the other. In this case, the lengths of their corresponding sides are proportional. This occurs for example when two triangles share an angle and the sides opposite to that angle are parallel.

Using right triangles and the concept of similarity, the trigonometric functions sine and cosine can be defined. These are functions of an angle which are investigated in trigonometry.

In the remainder we will consider a triangle with vertices A, B and C, angles α, β and γ and sides a, b and c. The side a is opposite to the vertex A and angle α and analogously for the other sides.

File:Triangle.Labels.png
A triangle with vertices, sides and angles labelled

In Euclidean geometry, the sum of the angles α + β + γ is equal to two right angles (180° or π radians). This allows determination of the third angle of any triangle as soon as two angles are known.

Error creating thumbnail: Unable to save thumbnail to destination
The Pythagorean theorem

A central theorem is the Pythagorean theorem stating that in any right triangle, the area of the square on the hypotenuse is equal to the sum of the areas of the squares on the other two sides. If vertex C is the right angle, we can write this as

$\displaystyle c^2 = a^2 + b^2 \,$

This means that knowing the lengths of two sides of a right triangle is enough to calculate the length of the third—something unique to right triangles. The Pythagorean theorem can be generalized to the law of cosines:

$\displaystyle c^2 = a^2 + b^2 - 2ab \cos\gamma \,$

which is valid for all triangles, even if γ is not a right angle. The law of cosines can be used to compute the side lengths and angles of a triangle as soon as all three sides or two sides and an enclosed angle are known.

The law of sines states

$\displaystyle \frac{\sin\alpha}a=\frac{\sin\beta}b=\frac{\sin\gamma}c=\frac1d$

where d is the diameter of the circumcircle (the circle which passes through all three points of the triangle). The law of sines can be used to compute the side lengths for a triangle as soon as two angles and one side are known. If two sides and an unenclosed angle is known, the law of sines may also be used; however, in this case there may be zero, one or two solutions.

There are two special right triangles that appear commonly in geometry. The so-called "45-45-90 triangle" has angles with those angle measures and the ratio of its sides is :$\displaystyle 1:1:\sqrt{2}$ . The "30-60-90 triangle" has sides in the ratio of $\displaystyle 1:\sqrt{3}:2$ .

## Points, lines and circles associated with a triangle

There are hundreds of different constructions that find a special point inside a triangle, satisfying some unique property: see the references section for a catalogue of them. Often they are constructed by finding three lines associated in a symmetrical way with the three sides (or vertices) and then proving that the three lines meet in a single point: an important tool for proving the existence of these is Ceva's theorem, which gives a criterion for determining when three such lines are concurrent. Similarly, lines associated with a triangle are often constructed by proving that three symmetrically constructed points are collinear: here Menelaus' theorem gives a useful general criterion. In this section just a few of the most commonly-encountered constructions are explained.

File:Triangle.Circumcenter.png
The circumcenter is the centre of a circle passing through the three vertices of the triangle.

A perpendicular bisector of a triangle is a straight line passing through the midpoint of a side and being perpendicular to it, i.e. forming a right angle with it. The three perpendicular bisectors meet in a single point, the triangle's circumcenter; this point is the center of the circumcircle, the circle passing through all three vertices. The diameter of this circle can be found from the law of sines stated above.

Thales' theorem states that if the circumcenter is located on one side of the triangle, then the opposite angle is a right one. More is true: if the circumcenter is located inside the triangle, then the triangle is acute; if the circumcenter is located outside the triangle, then the triangle is obtuse.

File:Triangle.Orthocenter.png
The intersection of the altitudes is the orthocenter.

An altitude of a triangle is a straight line through a vertex and perpendicular to (i.e. forming a right angle with) the opposite side. This opposite side is called the base of the altitude, and the point where the altitude intersects the base (or its extension) is called the foot of the altitude. The length of the altitude is the distance between the base and the vertex. The three altitudes intersect in a single point, called the orthocenter of the triangle. The orthocenter lies inside the triangle if and only if the triangle is not obtuse. The three vertices together with the orthocenter are said to form an orthocentric system.

File:Triangle.Incircle.png
The intersection of the angle bisectors finds the center of the incircle.

An angle bisector of a triangle is a straight line through a vertex which cuts the corresponding angle in half. The three angle bisectors intersect in a single point, the center of the triangle's incircle. The incircle is the circle which lies inside the triangle and touches all three sides. There are three other important circles, the excircles; they lie outside the triangle and touch one side as well as the extensions of the other two. The centers of the in- and excircles form an orthocentric system.

File:Triangle.Centroid.png
The centroid is the center of gravity.

A median of a triangle is a straight line through a vertex and the midpoint of the opposite side, and divides the triangle into two equal areas. The three medians intersect in a single point, the triangle's centroid. This is also the triangle's center of gravity: if the triangle were made out of wood, say, you could balance it on its centroid, or on any line through the centroid. The centroid cuts every median in the ratio 2:1, i.e. the distance between a vertex and the centroid is twice as large as the distance between the centroid and the midpoint of the opposite side.

File:Triangle.NinePointCircle.png
Nine point circle demonstrates a symmetry where six points lie on the same circle.

The midpoints of the three sides and the feet of the three altitudes all lie on a single circle, the triangle's nine point circle. The remaining three points for which it is named are the midpoints of the portion of altitude between the vertices and the orthocenter. The radius of the nine point circle is half that of the circumcircle. It touches the incircle (at the Feuerbach point) and the three excircles.

File:Triangle.EulerLine.png
Euler's line is a straight line through the centroid (yellow), orthocenter (blue), circumcenter (green) and center of the nine point circle (red).

The centroid (yellow), orthocenter (blue), circumcenter (green) and center of the nine point circle (red point) all lie on a single line, known as Euler's line (red line). The center of the nine point circle lies at the midpoint between the orthocenter and the circumcenter, and the distance between the centroid and the circumcenter is half that between the centroid and the orthocenter.

The center of the incircle is not in general located on Euler's line.

If one reflects a median at the angle bisector that passes through the same vertex, one obtains a symmedian. The three symmedians intersect in a single point, the symmedian point of the triangle.

## Computing the area of a triangle

Calculating the area of a triangle is an elementary problem encountered often in many different situations. Various approaches exist, depending on what is known about the triangle. What follows is a selection of frequently used formulae for the area of a triangle.

### Using geometry

The area S of a triangle is S = ½bh, where b is the length of any side of the triangle (the base) and h (the altitude) is the perpendicular distance between the base and the vertex not on the base. This can be shown with the following geometric construction.

File:Triangle.GeometryArea.png
The triangle is first transformed into a parallelogram with twice the area of the triangle, then into a rectangle.

To find the area of a given triangle (green), first make an exact copy of the triangle (blue), rotate it 180°, and join it to the given triangle along one side to obtain a parallelogram. Cut off a part and join it at the other side of the parallelogram to form a rectangle. Because the area of the rectangle is bh, the area of the given triangle must be ½bh.

File:Triangle.VectorArea.png
The area of the parallelogram is the magnitude of the cross product of the two vectors.

### Using vectors

The area of a parallelogram can also be calculated by the use of vectors. If AB and AC are vectors pointing from A to B and from A to C, respectively, the area of parallelogram ABDC is |AB × AC|, the magnitude of the cross product of vectors AB and AC. |AB × AC| is also equal to |h × AC|, where h represents the altitude h as a vector.

The area of triangle ABC is half of this, or S = ½|AB × AC|.

File:Triangle.TrigArea.png
Applying trigonometry to find the altitude h.

### Using trigonometry

The altitude of a triangle can be found through an application of trigonometry. Using the labelling as in the image on the left, the altitude is h = a sin γ. Substituting this in the formula S = ½bh derived above, the area of the triangle can be expressed as S = ½ab sin γ.

It is of course no coincidence that the area of a parallelogram is ab sin γ.

### Using coordinates

If vertex A is located at the origin (0, 0) of a Cartesian coordinate system and the coordinates of the other two vertices are given by B = (x1y1) and C = (x2y2), then the area S can be computed as 1/2 times the absolute value of the determinant

$\displaystyle \begin{vmatrix}x_1 & x_2 \\ y_1 & y_2 \end{vmatrix}$

or S = ½ |x1y2 − x2y1|.

### Using Heron's formula

Yet another way to compute S is Heron's formula:

$\displaystyle S = \sqrt{s(s-a)(s-b)(s-c)}$

where s = ½ (a + b + c) is the semiperimeter, or one half of the triangle's perimeter.

### Using the side lengths and a numerically stable formula

Heron's formula is numerically unstable for triangles with a very small angle. A stable alternative involves arranging the lengths of the sides so that: abc  and computing

$\displaystyle S = 1/4\sqrt{(a+(b+c)) (c-(a-b)) (c+(a-b)) (a+(b-c))}$

The brackets in the above formula are required in order to prevent numerical instability in the evaluation.

## Non-planar triangles

If any four of a triangle's elements (vertices, and/or elements of its sides) are plane to each other, the triangle is called plane. Geometers also study non-planar triangles in noneuclidean geometries, such as spherical triangles in spherical geometry and hyperbolic triangles in hyperbolic geometry.