Area of a triangle
The area of a triangle is the measure of the two-dimensional region bounded by its three sides in the Euclidean plane. It represents a fundamental quantity in geometry, quantifying the space enclosed by the triangle's vertices and edges. The most basic formula for the area A of a triangle is A = \frac{1}{2} b h, where b is the length of one side chosen as the base and h is the perpendicular height from the opposite vertex to the line containing that base.[1] This formula holds for any triangle, regardless of its type (acute, obtuse, or right-angled), as long as the height is measured perpendicularly.[2] Several alternative formulas exist for computing the area when different elements of the triangle are known, enabling calculations without directly measuring a height. For instance, if two sides a and b and the included angle C are given, the area is A = \frac{1}{2} a b \sin C, which derives from the geometry of the height as h = a \sin C relative to base b.[3] When only the three side lengths a, b, and c are available, Heron's formula applies: A = \sqrt{s(s - a)(s - b)(s - c)}, where s = \frac{a + b + c}{2} is the semiperimeter; this formula, attributed to Heron of Alexandria, is particularly useful for triangles without specified angles or heights.[4] These methods highlight the versatility of area calculations in coordinate geometry, trigonometry, and vector analysis, where the area can also be expressed as half the magnitude of the cross product of two sides represented as vectors.[5] The concept of triangle area extends beyond basic computation to underpin broader mathematical structures and applications. Triangles serve as the simplest polygons, allowing the derivation of area formulas for quadrilaterals, polygons, and even curved regions by decomposition or integration; for example, any polygon can be triangulated to sum its component triangle areas.[6] In advanced contexts, such as calculus and physics, triangle areas facilitate computations in integration, force diagrams, and spatial modeling, while their invariance under congruence preserves area as a key invariant in geometric transformations.Fundamental Formulas
Base and Height
The area of a triangle is given by the formula A = \frac{1}{2} \times b \times h, where b is the length of the base (any chosen side) and h is the height, defined as the perpendicular distance from the opposite vertex to the line containing the base.[7] This formula holds regardless of the triangle's orientation, as the height can be measured externally if the triangle is obtuse.[8] One intuitive derivation arises from comparing the triangle to a parallelogram. By reflecting the triangle over one of its sides, two congruent triangles form a parallelogram with the same base b and height h; since the parallelogram's area is b \times h, the triangle's area is half of that, or \frac{1}{2} b h.[9][8] Alternatively, using rectangular coordinates, place the base along the x-axis from (0,0) to (b,0) and the third vertex at (x,h); the area is then half the absolute value of the determinant formed by the coordinates, which simplifies to \frac{1}{2} b h.[10] For a right triangle with legs of lengths a and b, the area is simply \frac{1}{2} a b, as the legs serve directly as base and height.[7] In an obtuse triangle, the height to the chosen base may fall outside the triangle, extending beyond one endpoint, yet the formula remains applicable by using the perpendicular distance.[8] Diagrams illustrating the altitude to various bases—such as an acute triangle with internal height or an obtuse one with external height—clarify these measurements visually.[6] The resulting area is expressed in square units, consistent with the units of base and height (e.g., square meters if both are in meters), ensuring dimensional homogeneity.[11] This base-height approach provides the foundational geometric intuition for area, extendable to trigonometric forms when heights are not directly perpendicular.[12]Equivalent Geometric Forms
The area of a triangle can be expressed in terms of the lengths of its three medians m_a, m_b, and m_c, which connect each vertex to the midpoint of the opposite side. The formula is A = \frac{4}{3} \sqrt{s_m (s_m - m_a)(s_m - m_b)(s_m - m_c)}, where s_m = \frac{m_a + m_b + m_c}{2} is the semiperimeter of the medians.[13] This provides a symmetric alternative to the base-height formula, relying solely on internal segment lengths that intersect at the centroid. A brief derivation using vector geometry proceeds as follows. Let the position vectors of the vertices be \mathbf{A}, \mathbf{B}, and \mathbf{C}, with the centroid \mathbf{G} = \frac{\mathbf{A} + \mathbf{B} + \mathbf{C}}{3}. The median from \mathbf{A} to the midpoint of BC has length m_a = \frac{3}{2} |\mathbf{A} - \mathbf{G}|, and similarly for the others. The vectors from the centroid to the vertices satisfy \mathbf{GA} + \mathbf{GB} + \mathbf{GC} = \mathbf{0}. The area A is three times the area of the triangle formed by \mathbf{G}, \mathbf{B}, and \mathbf{C}, given by \frac{3}{2} |\mathbf{GB} \times \mathbf{GC}|. Expressing the side lengths in terms of the medians via a = \frac{2}{3} \sqrt{2m_b^2 + 2m_c^2 - m_a^2} (and cyclic permutations), derived from the vector differences, and substituting into the vector cross-product area formula yields the median-based expression after simplification.[13] For example, consider a scalene triangle with medians m_a = 13, m_b = 14, m_c = 15. Then s_m = 21, and A = \frac{4}{3} \sqrt{21(21-13)(21-14)(21-15)} = \frac{4}{3} \sqrt{21 \times 8 \times 7 \times 6} = \frac{4}{3} \times 84 = 112. This computes the area without direct measurement of sides or heights.[13] Another equivalent form involves the inradius r, the radius of the incircle tangent to all three sides, and the semiperimeter s = \frac{a + b + c}{2}: A = r s. This follows from dividing the triangle into three smaller triangles from the incenter (the intersection of the angle bisectors) to each side. Each smaller triangle has height r and bases a, b, c, so the total area is \frac{1}{2} r a + \frac{1}{2} r b + \frac{1}{2} r c = r s.[14] The medians intersect at the centroid, which divides the triangle into three smaller triangles of equal area, each with area \frac{A}{3}. In an equilateral triangle with side length a, the centroid coincides with other centers, and the area simplifies to A = \frac{\sqrt{3}}{4} a^2. This can be generalized using barycentric coordinates, where the centroid has coordinates (1,1,1), and the area ratios are determined by the coordinate sums relative to the vertices.[15] The altitudes h_a, h_b, h_c (perpendicular distances from vertices to opposite sides) also yield an equivalent relation. Since A = \frac{1}{2} a h_a = \frac{1}{2} b h_b = \frac{1}{2} c h_c, it follows that h_a = \frac{2A}{a}, and thus the product is h_a h_b h_c = \frac{8 A^3}{a b c}. This connects the altitudes directly to the area and side lengths.Trigonometric Formulas
Side-Angle-Side (SAS)
The side-angle-side (SAS) configuration for a triangle specifies two sides, denoted as a and b, and the included angle C between them. The area A of such a triangle is given by the formula A = \frac{1}{2} a b \sin C, where \sin C is the sine of the included angle.[16] This formula arises directly from the standard base-height approach to triangle area, adapted using trigonometry.[17] To derive this, consider side a as the base. Drop a perpendicular from the opposite vertex to this base, forming height h. In the right triangle created by this altitude, h = b \sin C, since \sin C is the ratio of the opposite side to the hypotenuse in that right triangle. Substituting into the base-height formula A = \frac{1}{2} a h yields A = \frac{1}{2} a (b \sin C) = \frac{1}{2} a b \sin C. This derivation holds regardless of whether angle C is acute or obtuse, as the height is always taken positively.[17][3] Unlike the ambiguous side-side-angle (SSA) case, the SAS configuration uniquely determines the triangle up to congruence, ensuring a single possible area value without multiple solutions. This follows from the SAS congruence postulate, which states that two triangles with two corresponding sides and the included angle equal are congruent.[18][19] For example, in an isosceles triangle with equal sides a = b = 5 units and vertex angle C = 60^\circ, the area is \frac{1}{2} \times 5 \times 5 \times \sin 60^\circ = \frac{25}{2} \times \frac{\sqrt{3}}{2} \approx 10.825 square units. The same computation in radians uses C = \frac{\pi}{3} radians, where \sin\left(\frac{\pi}{3}\right) = \frac{\sqrt{3}}{2}, yielding the identical result. These examples assume standard units like meters for sides, producing area in square meters; computational tools often require specifying degrees or radians for the angle input to evaluate \sin C accurately.[16] Since triangle angles range from $0^\circ to less than $180^\circ, \sin C is always non-negative in this context, so the absolute value |\sin C| is unnecessary for ensuring a positive area, though it emphasizes the formula's robustness. Precision in computation depends on the accuracy of angle measurement and sine evaluation, typically to several decimal places in practical applications.[3] This SAS formula found early application in surveying, where trigonometric calculations of triangle areas facilitated mapping large terrains; for instance, it supported the Great Trigonometrical Survey of India starting in 1802, enabling precise area determinations over vast regions using measured sides and angles from triangulation networks.[20]Angle-Side-Angle (ASA) and Angle-Angle-Side (AAS)
In the Angle-Side-Angle (ASA) case, two angles and the included side of a triangle are known, which uniquely determines the triangle up to congruence.[21] To compute the area, first determine the third angle using the fact that the sum of angles in a triangle is 180 degrees; for angles A and B with included side c (between vertices with angles A and B), the third angle is C = 180^\circ - A - B.[22] Next, apply the law of sines to find one of the adjacent sides, such as side a opposite angle A: \frac{a}{\sin A} = \frac{c}{\sin C}, so a = c \frac{\sin A}{\sin C}.[23] With sides a and c now known and the included angle B between them, the area is given by the SAS formula: \frac{1}{2} a c \sin B. Substituting the expression for a yields the direct ASA formula \frac{1}{2} c^2 \frac{\sin A \sin B}{\sin C}.[21] This direct formula can be derived more elegantly by combining the law of sines with the general area expression involving the circumradius R. From the law of sines, a = 2R \sin A, b = 2R \sin B, and c = 2R \sin C.[23] The area K of any triangle is also \frac{abc}{4R}.[22] Substituting the expressions for the sides gives K = \frac{(2R \sin A)(2R \sin B)(2R \sin C)}{4R} = 2 R^2 \sin A \sin B \sin C. Since c = 2R \sin C, solve for R = \frac{c}{2 \sin C} and substitute: K = 2 \left( \frac{c}{2 \sin C} \right)^2 \sin A \sin B \sin C = \frac{c^2 \sin A \sin B \sin C}{2 \sin^2 C} = \frac{1}{2} c^2 \frac{\sin A \sin B}{\sin C}, confirming the formula.[21] An equivalent form is K = \frac{c^2}{2 (\cot A + \cot B)}, which follows from trigonometric identities since \cot A + \cot B = \frac{\sin C}{\sin A \sin B}.[21] This ASA configuration often arises in problems involving angle bisectors, where the bisector divides an angle into two equal parts, allowing the resulting smaller triangles to be analyzed using ASA to compute their areas. For example, if a triangle has angles A = 80^\circ, B = 60^\circ, and included side c = 10, then C = 40^\circ, and the area is \frac{1}{2} (10)^2 \frac{\sin 80^\circ \sin 60^\circ}{\sin 40^\circ} \approx 66.3.[21] In the Angle-Angle-Side (AAS) case, two angles and a non-included side (opposite one of the angles) are known, which also uniquely determines the triangle. The computation proceeds similarly: find the third angle C = 180^\circ - A - B, then use the law of sines to determine another side, such as side a opposite A when side b (opposite B) is given: \frac{a}{\sin A} = \frac{b}{\sin B}, so a = b \frac{\sin A}{\sin B}.[23] The sides a and b enclose angle C, so the area is \frac{1}{2} a b \sin C via the SAS formula. Substituting for a gives the direct AAS formula \frac{1}{2} b^2 \frac{\sin A \sin C}{\sin B}. Unlike the SSA case, AAS always yields a unique triangle with no ambiguity. The AAS formula derives analogously from the circumradius approach. Using K = \frac{abc}{4R} and the law of sines substitutions, K = 2 R^2 \sin A \sin B \sin C. With b = 2R \sin B, R = \frac{b}{2 \sin B}, substitution yields K = 2 \left( \frac{b}{2 \sin B} \right)^2 \sin A \sin C \sin B = \frac{b^2 \sin A \sin C \sin B}{2 \sin^2 B} = \frac{1}{2} b^2 \frac{\sin A \sin C}{\sin B}. For illustration, consider angles A = 50^\circ, B = 70^\circ, and side b = 8 opposite B; then C = 60^\circ, and the area is \frac{1}{2} (8)^2 \frac{\sin 50^\circ \sin 60^\circ}{\sin 70^\circ} \approx 22.6. In practice, ensure angle units are consistent (degrees or radians) across trigonometric functions to avoid errors, and prefer the direct formulas over intermediate side computations when possible for numerical stability, as they reduce rounding accumulation.[22]Formulas from Side Lengths
Heron's Formula
Heron's formula provides the area of a triangle solely in terms of its three side lengths a, b, and c. Named after Hero of Alexandria, who described it in his work Metrica around 60 CE, the formula states that the area A is given by A = \sqrt{s(s - a)(s - b)(s - c)}, where s = \frac{a + b + c}{2} is the semiperimeter.[24] This expression enables computation of the area without requiring heights, angles, or coordinates, making it valuable when only side lengths are known. One common derivation begins with the law of cosines to express an angle in terms of the sides, followed by the side-angle-side (SAS) area formula. Applying the law of cosines, \cos C = \frac{a^2 + b^2 - c^2}{2ab}, and substituting into the SAS formula A = \frac{1}{2}ab \sin C yields \sin^2 C = 1 - \cos^2 C, leading after algebraic simplification to the Heron's form.[25] An alternative proof places the triangle in the coordinate plane for direct computation via the determinant formula for area. Position vertex B at (0, 0), vertex C at (a, 0), and vertex A at (x, y). The side lengths give the equations x^2 + y^2 = c^2, (x - a)^2 + y^2 = b^2, and the base BC = a. Solving for y^2 eliminates x and results in $16A^2 = 4a^2 y^2 = (a + b + c)(-a + b + c)(a - b + c)(a + b - c), which simplifies to the squared Heron's expression.[26] Heron's formula can also be viewed as a special case of Brahmagupta's formula for the area of a cyclic quadrilateral, where one side length approaches zero, reducing the quadrilateral to a triangle.[27] For a scalene triangle with sides 3, 4, and 5, the semiperimeter s = 6, so A = \sqrt{6(6-3)(6-4)(6-5)} = \sqrt{36} = 6, confirming the known right-triangle area. However, for near-collinear "skinny" triangles, such as sides 1, 1, and \epsilon where \epsilon \ll 1, the terms s - a and s - b become nearly equal to s, causing subtractive cancellation in floating-point arithmetic and loss of precision in the product under the square root.[28] The formula relates to the inradius r of the triangle via A = r s, where the area equals the inradius times the semiperimeter, as the incircle's tangents divide the perimeter into equal segments.[29] Generalizations extend Heron's approach to higher dimensions, such as formulas for the volume of a tetrahedron in terms of its edge lengths, using similar algebraic structures but without deriving the full expression here.[30]Cayley-Menger Determinant
The Cayley-Menger determinant provides a coordinate-free method to compute the area of a triangle using only its side lengths, expressed through the determinant of a symmetric matrix constructed from the squared distances between the vertices. For a triangle with vertices labeled 1, 2, 3 and side lengths a = d_{23}, b = d_{13}, c = d_{12}, the squared area \Delta^2 is given by -16 \Delta^2 = \det \begin{pmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & c^2 & b^2 \\ 1 & c^2 & 0 & a^2 \\ 1 & b^2 & a^2 & 0 \end{pmatrix}, where the matrix is bordered by a row and column of 1's along the off-diagonal positions corresponding to an auxiliary dimension.[31] This formula arises as a special case of the general Cayley-Menger determinant for the content (volume) of simplices in higher dimensions, here applied to a 2-simplex embedded in Euclidean space. The derivation of this expression begins with the coordinate representation of the triangle's area using the determinant formula for three points in the plane: \Delta = \frac{1}{2} \left| \det \begin{pmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{pmatrix} \right|. By expressing the squared distances d_{ij}^2 = (x_i - x_j)^2 + (y_i - y_j)^2 and forming the Gram matrix of dot products G_{ij} = \mathbf{p}_i \cdot \mathbf{p}_j, the area relates to \det(G) via \Delta^2 = \frac{1}{4} \det(G) after centering the coordinates (subtracting the centroid). Row and column operations on an augmented matrix transform this into the bordered form of the Cayley-Menger matrix, yielding the determinant relation above; this process embeds the 2D configuration as a degenerate 3D simplex with zero volume, linking to the general formula for simplex content.[32] Alternatively, it can be viewed as projecting the volume formula for a 3D tetrahedron onto the plane, where the auxiliary point enforces flatness.[33] This determinant-based approach offers advantages in distance geometry and computational applications, as it avoids explicit coordinate assignments and directly handles metric information, facilitating tasks like rigidity analysis and embedding verification in Euclidean space.[33] It is particularly useful in computational geometry for solving geometric constraints without solving systems of equations for positions, enabling efficient numerical checks for realizability of distance sets.[34] Historically, the determinant was first introduced by Arthur Cayley in 1841 to establish conditions for points to lie in a lower-dimensional subspace, such as coplanarity, using algebraic invariants of distance matrices; this laid the foundation for volume computations from edge lengths in polyhedra. Karl Menger extended and formalized it in 1928 for general simplices, solidifying its role in modern geometry.[33] For an equilateral triangle with side length a, the formula yields the known area \Delta = \frac{\sqrt{3}}{4} a^2, confirming equivalence to the standard formula.[31] This matrix form serves as a simplified special case of Heron's formula when expanded.[31] In practice, the determinant can be computed using linear algebra libraries, such as MATLAB'sdet function or Python's NumPy linalg.det, for numerical verification in software implementations.