Triangle

A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry. A triangle with vertices A, B, and C is denoted $$\triangle ABC$$.

In Euclidean geometry, any three points, when non-collinear, determine a unique triangle and simultaneously, a unique plane (i.e. a two-dimensional Euclidean space). In other words, there is only one plane that contains that triangle, and every triangle is contained in some plane. If the entire geometry is only the Euclidean plane, there is only one plane and all triangles are contained in it; however, in higher-dimensional Euclidean spaces, this is no longer true. This article is about triangles in Euclidean geometry, and in particular, the Euclidean plane, except where otherwise noted.

Types of triangle
The terminology for categorizing triangles is more than two thousand years old, having been defined on the very first page of Euclid's Elements. The names used for modern classification are either a direct transliteration of Euclid's Greek or their Latin translations."Greek: τῶν δὲ τριπλεύρων σχημάτων ἰσόπλευρον μὲν τρίγωνόν ἐστι τὸ τὰς τρεῖς ἴσας ἔχον πλευράς, ἰσοσκελὲς δὲ τὸ τὰς δύο μόνας ἴσας ἔχον πλευράς, σκαληνὸν δὲ τὸ τὰς τρεῖς ἀνίσους ἔχον πλευράς, lit.  'Of trilateral figures, an isopleuron [equilateral] triangle is that which has its three sides equal, an isosceles that which has two of its sides alone equal, and a scalene that which has its three sides unequal.'"

Hatch marks, also called tick marks, are used in diagrams of triangles and other geometric figures to identify sides of equal lengths. A side can be marked with a pattern of "ticks", short line segments in the form of tally marks; two sides have equal lengths if they are both marked with the same pattern. In a triangle, the pattern is usually no more than 3 ticks. An equilateral triangle has the same pattern on all 3 sides, an isosceles triangle has the same pattern on just 2 sides, and a scalene triangle has different patterns on all sides since no sides are equal.
 * An equilateral triangle (Greek: ἰσόπλευρον, romanized: isópleuron, lit.  'equal sides') has three sides of the same length. An equilateral triangle is also a regular polygon with all angles measuring 60°.
 * An isosceles triangle (Greek: ἰσοσκελὲς, romanized: isoskelés, lit.  'equal legs') has two sides of equal length. An isosceles triangle also has two angles of the same measure, namely the angles opposite to the two sides of the same length. This fact is the content of the isosceles triangle theorem, which was known by Euclid. Some mathematicians define an isosceles triangle to have exactly two equal sides, whereas others define an isosceles triangle as one with at least two equal sides. The latter definition would make all equilateral triangles isosceles triangles. The 45–45–90 right triangle, which appears in the tetrakis square tiling, is isosceles.
 * A scalene triangle (Greek: σκαληνὸν, romanized: skalinón, lit.  'unequal') has all its sides of different lengths. Equivalently, it has all angles of different measure.

Similarly, patterns of 1, 2, or 3 concentric arcs inside the angles are used to indicate equal angles: an equilateral triangle has the same pattern on all 3 angles, an isosceles triangle has the same pattern on just 2 angles, and a scalene triangle has different patterns on all angles, since no angles are equal.

Area
Calculating the area T of a triangle is an elementary problem encountered often in many different situations. The best known and simplest formula is:
 * $$T=\tfrac12 bh,$$

where b is the length of the base of the triangle, and h is the height or altitude of the triangle. The term "base" denotes any side, and "height" denotes the length of a perpendicular from the vertex opposite the base onto the line containing the base. In 499 CE Aryabhata, used this illustrated method in the Aryabhatiya (section 2.6).

Although simple, this formula is only useful if the height can be readily found, which is not always the case. For example, the surveyor of a triangular field might find it relatively easy to measure the length of each side, but relatively difficult to construct a 'height'. Various methods may be used in practice, depending on what is known about the triangle. The following is a selection of frequently used formulae for the area of a triangle.

Using trigonometry
The height of a triangle can be found through the application of trigonometry.

Knowing SAS: Using the labels in the image on the right, the altitude is. Substituting this in the formula $$T=\tfrac12 bh$$ derived above, the area of the triangle can be expressed as:
 * $$T = \tfrac12 ab\sin \gamma = \tfrac12 bc\sin \alpha = \tfrac12 ca\sin \beta$$

(where α is the interior angle at A, β is the interior angle at B, $$\gamma$$ is the interior angle at C and c is the line AB).

Furthermore, since sin α = sin (π − α) = sin (β + $$\gamma$$), and similarly for the other two angles:
 * $$T = \tfrac12 ab\sin (\alpha+\beta) = \tfrac12 bc\sin (\beta+\gamma) = \tfrac12 ca\sin (\gamma+\alpha).$$

Knowing AAS:
 * $$T = \frac {b^{2}(\sin \alpha)(\sin (\alpha + \beta))}{2\sin \beta},$$

and analogously if the known side is a or c.

Knowing ASA:
 * $$T = \frac{a^{2}}{2(\cot \beta + \cot \gamma)} = \frac{a^{2} (\sin \beta)(\sin \gamma)}{2\sin(\beta + \gamma)},$$

and analogously if the known side is b or c.

Heron's formula
The shape of the triangle is determined by the lengths of the sides. Therefore, the area can also be derived from the lengths of the sides. By Heron's formula:
 * $$T = \sqrt{s(s-a)(s-b)(s-c)}$$

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

Three other equivalent ways of writing Heron's formula are
 * $$T = \tfrac14 \sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)}$$
 * $$T = \tfrac14 \sqrt{2(a^2b^2+a^2c^2+b^2c^2)-(a^4+b^4+c^4)}$$
 * $$T = \tfrac14 \sqrt{(a+b-c) (a-b+c) (-a+b+c) (a+b+c)}.$$

Using vectors
The area of a parallelogram embedded in a three-dimensional Euclidean space can be calculated using vectors. Let vectors AB and AC point respectively from A to B and from A to C. The area of parallelogram ABDC is then
 * $$|\mathbf{AB}\times\mathbf{AC}|,$$

which is the magnitude of the cross product of vectors AB and AC. The area of triangle ABC is half of this,
 * $$\tfrac12|\mathbf{AB}\times\mathbf{AC}|.$$

The area of triangle ABC can also be expressed in terms of dot products as follows:
 * $$\tfrac12 \sqrt{(\mathbf{AB} \cdot \mathbf{AB})(\mathbf{AC} \cdot \mathbf{AC}) -(\mathbf{AB} \cdot \mathbf{AC})^2} =\tfrac12 \sqrt{ |\mathbf{AB}|^2 |\mathbf{AC}|^2 -(\mathbf{AB} \cdot \mathbf{AC})^2}.\,$$

In two-dimensional Euclidean space, expressing vector AB as a free vector in Cartesian space equal to (x1,y1) and AC as (x2,y2), this can be rewritten as:
 * $$\tfrac12|x_1 y_2 - x_2 y_1|.$$

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 and, then the area can be computed as $1/2$ times the absolute value of the determinant
 * $$T = \tfrac12\left|\det\begin{pmatrix}x_B & x_C \\ y_B & y_C \end{pmatrix}\right| = \tfrac12 |x_B y_C - x_C y_B|.$$

For three general vertices, the equation is:
 * $$T = \tfrac12 \left| \det\begin{pmatrix}x_A & x_B & x_C \\ y_A & y_B & y_C \\ 1 & 1 & 1\end{pmatrix} \right| = \tfrac12 \big| x_A y_B - x_A y_C + x_B y_C - x_B y_A + x_C y_A - x_C y_B \big|,$$

which can be written as
 * $$T = \tfrac12 \big| (x_A - x_C) (y_B - y_A) - (x_A - x_B) (y_C - y_A) \big|.$$

If the points are labeled sequentially in the counterclockwise direction, the above determinant expressions are positive and the absolute value signs can be omitted. The above formula is known as the shoelace formula or the surveyor's formula.

If we locate the vertices in the complex plane and denote them in counterclockwise sequence as, , and , and denote their complex conjugates as $$\bar a$$, $$\bar b$$, and $$\bar c$$, then the formula
 * $$T=\frac{i}{4}\begin{vmatrix}a & \bar a & 1 \\ b & \bar b & 1 \\ c & \bar c & 1 \end{vmatrix}$$

is equivalent to the shoelace formula.

In three dimensions, the area of a general triangle, and ) is the Pythagorean sum of the areas of the respective projections on the three principal planes (i.e. x = 0, y = 0 and z = 0):
 * $$T = \tfrac12 \sqrt{\begin{vmatrix} x_A & x_B & x_C \\ y_A & y_B & y_C \\ 1 & 1 & 1 \end{vmatrix}^2 +

\begin{vmatrix} y_A & y_B & y_C \\ z_A & z_B & z_C \\ 1 & 1 & 1 \end{vmatrix}^2 + \begin{vmatrix} z_A & z_B & z_C \\ x_A & x_B & x_C \\ 1 & 1 & 1 \end{vmatrix}^2 }.$$

Using line integrals
The area within any closed curve, such as a triangle, is given by the line integral around the curve of the algebraic or signed distance of a point on the curve from an arbitrary oriented straight line L. Points to the right of L as oriented are taken to be at negative distance from L, while the weight for the integral is taken to be the component of arc length parallel to L rather than arc length itself.

This method is well suited to computation of the area of an arbitrary polygon. Taking L to be the x-axis, the line integral between consecutive vertices (xi,yi) and (xi+1,yi+1) is given by the base times the mean height, namely (xi+1 − xi)(yi + yi+1)/2. The sign of the area is an overall indicator of the direction of traversal, with negative area indicating counterclockwise traversal. The area of a triangle then falls out as the case of a polygon with three sides.

While the line integral method has in common with other coordinate-based methods the arbitrary choice of a coordinate system, unlike the others it makes no arbitrary choice of vertex of the triangle as origin or of side as base. Furthermore, the choice of coordinate system defined by L commits to only two degrees of freedom rather than the usual three, since the weight is a local distance (e.g. xi+1 − xi in the above) whence the method does not require choosing an axis normal to L.

When working in polar coordinates it is not necessary to convert to Cartesian coordinates to use line integration, since the line integral between consecutive vertices (ri,θi) and (ri+1,θi+1) of a polygon is given directly by riri+1sin(θi+1 − θi)/2. This is valid for all values of θ, with some decrease in numerical accuracy when |θ| is many orders of magnitude greater than π. With this formulation negative area indicates clockwise traversal, which should be kept in mind when mixing polar and cartesian coordinates. Just as the choice of y-axis is immaterial for line integration in cartesian coordinates, so is the choice of zero heading  immaterial here.

Formulas resembling Heron's formula
Three formulas have the same structure as Heron's formula but are expressed in terms of different variables. First, denoting the medians from sides a, b, and c respectively as ma, mb, and mc and their semi-sum (ma + mb + mc)/2 as σ, we have
 * $$T = \tfrac43 \sqrt{\sigma (\sigma - m_a)(\sigma - m_b)(\sigma - m_c)}.$$

Next, denoting the altitudes from sides a, b, and c respectively as ha, hb, and hc, and denoting the semi-sum of the reciprocals of the altitudes as $$H = (h_a^{-1} + h_b^{-1} + h_c^{-1})/2$$ we have
 * $$T^{-1} = 4 \sqrt{H(H-h_a^{-1})(H-h_b^{-1})(H-h_c^{-1})}.$$

And denoting the semi-sum of the angles' sines as, we have
 * $$T = D^{2} \sqrt{S(S-\sin \alpha)(S-\sin \beta)(S-\sin \gamma)}$$

where D is the diameter of the circumcircle: $$D=\tfrac{a}{\sin \alpha} = \tfrac{b}{\sin \beta} = \tfrac{c}{\sin \gamma}.$$

Using Pick's theorem
See Pick's theorem for a technique for finding the area of any arbitrary lattice polygon (one drawn on a grid with vertically and horizontally adjacent lattice points at equal distances, and with vertices on lattice points).

The theorem states:
 * $$T = I + \tfrac12 B - 1$$

where $$I$$ is the number of internal lattice points and B is the number of lattice points lying on the border of the polygon.

Other area formulas
Numerous other area formulas exist, such as
 * $$T = r \cdot s,$$

where r is the inradius, and s is the semiperimeter (in fact, this formula holds for all tangential polygons), and


 * $$T=r_a(s-a)=r_b(s-b)=r_c(s-c)$$

where $$r_a, \, r_b,\, r_c$$ are the radii of the excircles tangent to sides a, b, c respectively.

We also have


 * $$T = \tfrac12 D^{2}(\sin \alpha)(\sin \beta)(\sin \gamma)$$

and
 * $$T = \frac{abc}{2D} = \frac{abc}{4R}$$

for circumdiameter D; and
 * $$T = \tfrac14(\tan \alpha)(b^{2}+c^{2}-a^{2})$$

for angle α ≠ 90°.

The area can also be expressed as
 * $$T = \sqrt{rr_ar_br_c}.$$

In 1885, Baker gave a collection of over a hundred distinct area formulas for the triangle. These include:
 * $$T = \tfrac12\sqrt[3]{abch_ah_bh_c},$$
 * $$T = \tfrac12 \sqrt{abh_ah_b},$$
 * $$T = \frac{a+b}{2(h_a^{-1} + h_b^{-1})},$$
 * $$T = \frac{Rh_bh_c}{a}$$

for circumradius (radius of the circumcircle) R, and
 * $$T = \frac{h_ah_b}{2 \sin \gamma}.$$

Upper bound on the area
The area T of any triangle with perimeter p satisfies


 * $$T\le \tfrac{p^2}{12\sqrt{3}},$$

with equality holding if and only if the triangle is equilateral.

Other upper bounds on the area T are given by


 * $$4\sqrt{3}T \leq a^2+b^2+c^2$$

and


 * $$4\sqrt{3}T \leq \frac{9abc}{a+b+c}, $$

both again holding if and only if the triangle is equilateral.

Bisecting the area
There are infinitely many lines that bisect the area of a triangle. Three of them are the medians, which are the only area bisectors that go through the centroid. Three other area bisectors are parallel to the triangle's sides.

Any line through a triangle that splits both the triangle's area and its perimeter in half goes through the triangle's incenter. There can be one, two, or three of these for any given triangle.