# Area of a triangle

In geometry, calculating the area of a triangle is an elementary problem encountered often in many different situations. The best known and simplest formula is $T=bh/2,$ 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. Euclid proved that the area of a triangle is half that of a parallelogram with the same base and height in his book Elements in 300 BCE. 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 land 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. Other frequently used formulas for the area of a triangle use trigonometry, side lengths (Heron's formula), vectors, coordinates, line integrals, Pick's theorem, or other properties.

## History

Heron of Alexandria found what is known as Heron's formula for the area of a triangle in terms of its sides, and a proof can be found in his book, Metrica, written around 60 CE. It has been suggested that Archimedes knew the formula over two centuries earlier, and since Metrica is a collection of the mathematical knowledge available in the ancient world, it is possible that the formula predates the reference given in that work. In 300 BCE Greek mathematician Euclid proved that the area of a triangle is half that of a parallelogram with the same base and height in his book Elements of Geometry.
In 499 Aryabhata, a great mathematician-astronomer from the classical age of Indian mathematics and Indian astronomy, expressed the area of a triangle as one-half the base times the height in the Aryabhatiya.
A formula equivalent to Heron's was discovered by the Chinese independently of the Greeks. It was published in 1247 in Shushu Jiuzhang ("Mathematical Treatise in Nine Sections"), written by Qin Jiushao.

## Using trigonometry

The area $T$ of a triangle can be found through the application of trigonometry.

### Knowing SAS (side-angle-side)

Using the labels in the image on the right, the height or altitude is h = a sin $\gamma$. Substituting this in the area formula $T={\tfrac {1}{2}}bh$ derived above, the area of the triangle can be expressed as:
    $T={\tfrac {1}{2}}ab\sin \gamma ={\tfrac {1}{2}}bc\sin \alpha ={\tfrac {1}{2}}ca\sin \beta$
Where: a is the line BC, b is the line AC, c is the line AB;
and: α is the interior angle at A, β is the interior angle at B, $\gamma$ is the interior angle at C.
Furthermore, since sin α = sin (π − α) = sin (β + $\gamma$), and similarly for the other two angles:
    $T={\tfrac {1}{2}}ab\sin(\alpha +\beta )={\tfrac {1}{2}}bc\sin(\beta +\gamma )={\tfrac {1}{2}}ca\sin(\gamma +\alpha )$

### Knowing AAS (angle-angle-side)

    $T={\frac {b^{2}(\sin \alpha )(\sin(\alpha +\beta ))}{2\sin \beta }},$
and analogously if the known side is a or c.

### Knowing ASA (angle-side-angle)

    $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.

## Using side lengths (Heron's formula)

A triangle's shape is uniquely determined by the lengths of the sides, so its metrical properties, including area, can be described in terms of those lengths. By Heron's formula,
    $T={\sqrt {s(s-a)(s-b)(s-c)}}$
where s=1/2 (a+b+c){\textstyle s={\tfrac {1}{2}}(a+b+c)} is the semiperimeter, or half of the triangle's perimeter.
Three other equivalent ways of writing Heron's formula are
    ${\begin{aligned}T&={\tfrac {1}{4}}{\sqrt {(a^{2}+b^{2}+c^{2})^{2}-2(a^{4}+b^{4}+c^{4})}}\\[5mu]&={\tfrac {1}{4}}{\sqrt {2(a^{2}b^{2}+a^{2}c^{2}+b^{2}c^{2})-(a^{4}+b^{4}+c^{4})}}\\[5mu]&={\tfrac {1}{4}}{\sqrt {(a+b-c)(a-b+c)(-a+b+c)(a+b+c)}}.\end{aligned}}$

### 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 m$_a$, m$_b$, and m$_c$ and their semi-sum (m$_a$ + m$_b$ + m$_c$)/2 as σ, we have
    $T={\tfrac {4}{3}}{\sqrt {\sigma (\sigma -m_{a})(\sigma -m_{b})(\sigma -m_{c})}}.$
Next, denoting the altitudes from sides a, b, and c respectively as h$_a$, h$_b$, and h$_c$, 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 S = [(sin α) + (sin β) + (sin γ)]/2, 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 vectors

The area of triangle ABC is half of the area of a parallelogram:
    $T={\tfrac {1}{2}}{\bigl \|}(\mathbf {b} -\mathbf {a} )\wedge (\mathbf {c} -\mathbf {a} ){\bigr \|}={\tfrac {1}{2}}{\bigl \|}\mathbf {a} \wedge \mathbf {b} +\mathbf {b} \wedge \mathbf {c} +\mathbf {c} \wedge \mathbf {a} {\bigr \|},$
where ⁠$\mathbf {a}$⁠, ⁠$\mathbf {b}$⁠, and ⁠$\mathbf {c}$⁠ are vectors to the triangle's vertices from any arbitrary origin point, so that ⁠$\mathbf {b} -\mathbf {a}$⁠ and ⁠$\mathbf {c} -\mathbf {a}$⁠ are the translation vectors from vertex ⁠$A$⁠ to each of the others, and ⁠$\wedge$⁠ is the wedge product. If vertex ⁠$A$⁠ is taken to be the origin, this simplifies to ${\tfrac {1}{2}}\|\mathbf {b} \wedge \mathbf {c} \|$.
The oriented relative area of a parallelogram in any affine space, a type of bivector, is defined as ⁠$\mathbf {u} \wedge \mathbf {v}$⁠ where ⁠$\mathbf {u}$⁠ and ⁠$\mathbf {v}$⁠ are translation vectors from one vertex of the parallelogram to each of the two adjacent vertices. In Euclidean space, the magnitude of this bivector is a well-defined scalar number representing the area of the parallelogram. (For vectors in three-dimensional space, the bivector-valued wedge product has the same magnitude as the vector-valued cross product, but unlike the cross product, which is only defined in three-dimensional Euclidean space, the wedge product is well-defined in an affine space of any dimension.)
The area of triangle ABC can also be expressed in terms of dot products. Taking vertex ⁠$A$⁠ to be the origin and calling translation vectors to the other vertices ⁠$\mathbf {b}$⁠ and ⁠$\mathbf {c}$⁠,
    $T={\tfrac {1}{2}}{\sqrt {\mathbf {b} ^{2}\mathbf {c} ^{2}-(\mathbf {b} \cdot \mathbf {c} )^{2}}},$
where for any Euclidean vector $\mathbf {v} ^{2}=\|\mathbf {v} \|^{2}=\mathbf {v} \cdot \mathbf {v}$. This area formula can be derived from the previous one using the elementary vector identity $\mathbf {u} ^{2}\mathbf {v} ^{2}=(\mathbf {u} \cdot \mathbf {v} )^{2}+\|\mathbf {u} \wedge \mathbf {v} \|^{2}$.
In two-dimensional Euclidean space, for a vector ⁠$\mathbf {b}$⁠ with coordinates ⁠$(x_{B},y_{B})$⁠ and vector ⁠$\mathbf {c}$⁠ with coordinates ⁠$(x_{C},y_{C})$⁠, the magnitude of the wedge product is
    $\|\mathbf {b} \wedge \mathbf {c} \|=|x_{B}y_{C}-x_{C}y_{B}|.$
(See the following section.)

## 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 = (x$_B$, y$_B$) and C = (x$_C$, y$_C$), then the area can be computed as 1⁄2 times the absolute value of the determinant
    $T={\tfrac {1}{2}}\left|\det {\begin{pmatrix}x_{B}&x_{C}\\y_{B}&y_{C}\end{pmatrix}}\right|={\tfrac {1}{2}}|x_{B}y_{C}-x_{C}y_{B}|.$
For three general vertices, the equation is:
    $T={\tfrac {1}{2}}\left|\det {\begin{pmatrix}x_{A}&x_{B}&x_{C}\\y_{A}&y_{B}&y_{C}\\1&1&1\end{pmatrix}}\right|={\tfrac {1}{2}}{\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={\tfrac {1}{2}}{\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 a = x$_A$ + y$_A$i, b = x$_B$ + y$_B$i, and c = x$_C$ + y$_C$i, 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 A = (x$_A$, y$_A$, z$_A$), B = (x$_B$, y$_B$, z$_B$) and C = (x$_C$, y$_C$, z$_C$) 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={\tfrac {1}{2}}{\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 (x$_i$,y$_i$) and (x$_{i+1}$,y$_{i+1}$) is given by the base times the mean height, namely (x$_{i+1}$ − x$_i$)(y$_i$ + y$_{i+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. x$_{i+1}$ − x$_i$ 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 (r$_i$,θ$_i$) and (r$_{i+1}$,θ$_{i+1}$) of a polygon is given directly by r$_i$r$_{i+1}$sin(θ$_{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 (x = 0) is immaterial for line integration in cartesian coordinates, so is the choice of zero heading (θ = 0) immaterial here.

## 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+{\tfrac {1}{2}}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$^{:Lemma2}$
    $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={\tfrac {1}{2}}D^{2}(\sin \alpha )(\sin \beta )(\sin \gamma )$
and
    $T={\frac {abc}{2D}}={\frac {abc}{4R}}$
for circumdiameter D; and
    $T={\tfrac {1}{4}}(\tan \alpha )(b^{2}+c^{2}-a^{2})$
for angle α ≠ 90°.
The area can also be expressed as
    $T={\sqrt {rr_{a}r_{b}r_{c}}}.$
In 1885, Baker gave a collection of over a hundred distinct area formulas for the triangle. These include:
    $T={\tfrac {1}{2}}{\sqrt[{3}]{abch_{a}h_{b}h_{c}}},$
    $T={\tfrac {1}{2}}{\sqrt {abh_{a}h_{b}}},$
    $T={\frac {a+b}{2(h_{a}^{-1}+h_{b}^{-1})}},$
    $T={\frac {Rh_{b}h_{c}}{a}}$
for circumradius (radius of the circumcircle) R, and
    $T={\frac {h_{a}h_{b}}{2\sin \gamma }}.$

## Upper bound on the area

The area T of any triangle with perimeter p satisfies
    $T\leq {\tfrac {p^{2}}{12{\sqrt {3}}}},$
with equality holding if and only if the triangle is equilateral.$^{:657}$
Other upper bounds on the area T are given by$^{:p.290}$
    $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.