In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side.[1] [2] This statement permits the inclusion of degenerate triangles, but some authors, especially those writing about elementary geometry, will exclude this possibility, thus leaving out the possibility of equality.[3] If,, and are the lengths of the sides of a triangle then the triangle inequality states that
c\leqa+b,
In Euclidean geometry and some other geometries, the triangle inequality is a theorem about vectors and vector lengths (norms):
\|u+v\|\leq\|u\|+\|v\|,
\R1
In Euclidean geometry, for right triangles the triangle inequality is a consequence of the Pythagorean theorem, and for general triangles, a consequence of the law of cosines, although it may be proved without these theorems. The inequality can be viewed intuitively in either
\R2
\R3
In spherical geometry, the shortest distance between two points is an arc of a great circle, but the triangle inequality holds provided the restriction is made that the distance between two points on a sphere is the length of a minor spherical line segment (that is, one with central angle in) with those endpoints.[4] [5]
The triangle inequality is a defining property of norms and measures of distance. This property must be established as a theorem for any function proposed for such purposes for each particular space: for example, spaces such as the real numbers, Euclidean spaces, the Lp spaces, and inner product spaces.
Euclid proved the triangle inequality for distances in plane geometry using the construction in the figure.[6] Beginning with triangle, an isosceles triangle is constructed with one side taken as and the other equal leg along the extension of side . It then is argued that angle has larger measure than angle, so side is longer than side . However:
\overline{AD}=\overline{AB}+\overline{BD}=\overline{AB}+\overline{BC},
For a proper triangle, the triangle inequality, as stated in words, literally translates into three inequalities (given that a proper triangle has side lengths that are all positive and excludes the degenerate case of zero area):
a+b>c, b+c>a, c+a>b.
|a-b|<c<a+b.
max(a,b,c)<a+b+c-max(a,b,c)
2max(a,b,c)<a+b+c
A mathematically equivalent formulation is that the area of a triangle with sides must be a real number greater than zero. Heron's formula for the area is
\begin{align} 4 ⋅ area&=\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}\\ &=\sqrt{-a4-b4-c4+2a2b2+2a2c2+2b2c2}. \end{align}
In terms of either area expression, the triangle inequality imposed on all sides is equivalent to the condition that the expression under the square root sign be real and greater than zero (so the area expression is real and greater than zero).
The triangle inequality provides two more interesting constraints for triangles whose sides are, where and
\phi
1< | a+c |
b |
<3
1\lemin\left( | a |
b |
,
b | |
c |
\right)<\phi.
In the case of right triangles, the triangle inequality specializes to the statement that the hypotenuse is greater than either of the two sides and less than their sum.[9]
The second part of this theorem is already established above for any side of any triangle. The first part is established using the lower figure. In the figure, consider the right triangle . An isosceles triangle is constructed with equal sides . From the triangle postulate, the angles in the right triangle satisfy:
\alpha+\gamma=\pi/2 .
2\beta+\gamma=\pi .
\alpha=\pi/2-\gamma, while \beta=\pi/2-\gamma/2 ,
\alpha<\beta .
\overline{AC}>\overline{AD} .
An alternative proof (also based upon the triangle postulate) proceeds by considering three positions for point :[10] (i) as depicted (which is to be proved), or (ii) coincident with (which would mean the isosceles triangle had two right angles as base angles plus the vertex angle, which would violate the triangle postulate), or lastly, (iii) interior to the right triangle between points and (in which case angle is an exterior angle of a right triangle and therefore larger than, meaning the other base angle of the isosceles triangle also is greater than and their sum exceeds in violation of the triangle postulate).
This theorem establishing inequalities is sharpened by Pythagoras' theorem to the equality that the square of the length of the hypotenuse equals the sum of the squares of the other two sides.
Consider a triangle whose sides are in an arithmetic progression and let the sides be . Then the triangle inequality requires that
\begin{array}{rcccl}0&<&a&<&2a+3d,\\ 0&<&a+d&<&2a+2d,\\ 0&<&a+2d&<&2a+d.\end{array}
To satisfy all these inequalities requires
a>0and-
a | |
3 |
<d<a.
When is chosen such that, it generates a right triangle that is always similar to the Pythagorean triple with sides,, .
Now consider a triangle whose sides are in a geometric progression and let the sides be . Then the triangle inequality requires that
\begin{array}{rcccl}0&<&a&<&ar+ar2,\\ 0&<&ar&<&a+ar2,\\ 0&<&ar2&<&a+ar.\end{array}
The first inequality requires ; consequently it can be divided through and eliminated. With, the middle inequality only requires . This now leaves the first and third inequalities needing to satisfy
\begin{align} r2+r-1&{}>0\\ r2-r-1&{}<0. \end{align}
The first of these quadratic inequalities requires to range in the region beyond the value of the positive root of the quadratic equation, i.e. where is the golden ratio. The second quadratic inequality requires to range between 0 and the positive root of the quadratic equation, i.e. . The combined requirements result in being confined to the range
\varphi-1<r<\varphianda>0.
When the common ratio is chosen such that it generates a right triangle that is always similar to the Kepler triangle.
The triangle inequality can be extended by mathematical induction to arbitrary polygonal paths, showing that the total length of such a path is no less than the length of the straight line between its endpoints. Consequently, the length of any polygon side is always less than the sum of the other polygon side lengths.
Consider a quadrilateral whose sides are in a geometric progression and let the sides be . Then the generalized polygon inequality requires that
\begin{array}{rcccl}0&<&a&<&ar+ar2+ar3\\ 0&<&ar&<&a+ar2+ar3\\ 0&<&ar2&<&a+ar+ar3\\ 0&<&ar3&<&a+ar+ar2.\end{array}
These inequalities for reduce to the following
r3+r2+r-1>0
r3-r2-r-1<0.
This generalization can be used to prove that the shortest curve between two points in Euclidean geometry is a straight line.
No polygonal path between two points is shorter than the line between them. This implies that no curve can have an arc length less than the distance between its endpoints. By definition, the arc length of a curve is the least upper bound of the lengths of all polygonal approximations of the curve. The result for polygonal paths shows that the straight line between the endpoints is the shortest of all the polygonal approximations. Because the arc length of the curve is greater than or equal to the length of every polygonal approximation, the curve itself cannot be shorter than the straight line path.[14]
The converse of the triangle inequality theorem is also true: if three real numbers are such that each is less than the sum of the others, then there exists a triangle with these numbers as its side lengths and with positive area; and if one number equals the sum of the other two, there exists a degenerate triangle (that is, with zero area) with these numbers as its side lengths.
In either case, if the side lengths are,, we can attempt to place a triangle in the Euclidean plane as shown in the diagram. We need to prove that there exists a real number consistent with the values,, and, in which case this triangle exists.
By the Pythagorean theorem we have and according to the figure at the right. Subtracting these yields . This equation allows us to express in terms of the sides of the triangle:
d= | -a2+b2+c2 |
2c |
.
h2=
| ||||
b |
\right)2.
For a real number to satisfy this, must be non-negative:
\begin{align} 0&\le
| ||||
b |
\right)2\\[4pt] 0&\le\left(b-
-a2+b2+c2 | |
2c |
\right)\left(b+
-a2+b2+c2 | |
2c |
\right)\\[4pt] 0&\le\left(a2-(b-c)2)((b+c)2-a2\right)\\[6pt] 0&\le(a+b-c)(a-b+c)(b+c+a)(b+c-a)\\[6pt] 0&\le(a+b-c)(a+c-b)(b+c-a) \end{align}
h
a,b,c
h>0
h=0
The area of a triangular face of a tetrahedron is less than or equal to the sum of the areas of the other three triangular faces. More generally, in Euclidean space the hypervolume of an -facet of an -simplex is less than or equal to the sum of the hypervolumes of the other facets.
Much as the triangle inequality generalizes to a polygon inequality, the inequality for a simplex of any dimension generalizes to a polytope of any dimension: the hypervolume of any facet of a polytope is less than or equal to the sum of the hypervolumes of the remaining facets.
In some cases the tetrahedral inequality is stronger than several applications of the triangle inequality. For example, the triangle inequality appears to allow the possibility of four points,,, and in Euclidean space such that distances
and
.However, points with such distances cannot exist: the area of the equilateral triangle is , which is larger than three times , the area of a isosceles triangle (all by Heron's formula), and so the arrangement is forbidden by the tetrahedral inequality.
In a normed vector space, one of the defining properties of the norm is the triangle inequality:
\|u+v\|\leq\|u\|+\|v\| \forallu,v\inV
That is, the norm of the sum of two vectors is at most as large as the sum of the norms of the two vectors. This is also referred to as subadditivity. For any proposed function to behave as a norm, it must satisfy this requirement.[15]
If the normed space is Euclidean, or, more generally, strictly convex, then
\|u+v\|=\|u\|+\|v\|
\|u+v\|=\|(1,1)\|=|1|+|1|=2=\|u\|+\|v\|.
The absolute value is a norm for the real line; as required, the absolute value satisfies the triangle inequality for any real numbers and . If and have the same sign or either of them is zero, then
|u+v|=|u|+|v|.
|u|>|v|.
The triangle inequality is useful in mathematical analysis for determining the best upper estimate on the size of the sum of two numbers, in terms of the sizes of the individual numbers. There is also a lower estimate, which can be found using the reverse triangle inequality which states that for any real numbers and,
|u-v|\geql||u|-|v|r|.
The taxicab norm or 1-norm is one generalization absolute value to higher dimensions. To find the norm of a vector
v=(v1,v2,\ldotsvn),
The Euclidean norm or 2-norm defines the length of translation vectors in an -dimensional Euclidean space in terms of a Cartesian coordinate system. For a vector
v=(v1,v2,\ldotsvn),
The inner product is norm in any inner product space, a generalization of Euclidean vector spaces including infinite-dimensional examples. The triangle inequality follows from the Cauchy–Schwarz inequality as follows: Given vectors
u
v
\langleu,v\rangle
\ | u + v\ | ^2 | =\langleu+v,u+v\rangle | ||||||
=\ | u\ | ^2 + \langle u, v \rangle + \langle v, u \rangle + \ | v\ | ^2 | |||||
\le\ | u\ | ^2 + 2 | \langle u, v \rangle | + \ | v\ | ^2 | |||
\le\ | u\ | ^2 + 2\ | u\ | \ | v\ | + \ | v\ | ^2 (by the Cauchy–Schwarz inequality) | |
=\left(\ | u\ | + \ | v\ | \right)^2. |
The Cauchy–Schwarz inequality turns into an equality if and only if and are linearly dependent. The inequality
\langleu,v\rangle+\langlev,u\rangle\le2\left|\left\langleu,v\right\rangle\right|
u
v
The -norm is a generalization of taxicab and Euclidean norms, using an arbitrary positive integer exponent, where the are the components of vector .
Except for the case, the -norm is not an inner product norm, because it does not satisfy the parallelogram law. The triangle inequality for general values of is called Minkowski's inequality.[17] It takes the form:
In a metric space with metric, the triangle inequality is a requirement upon distance:
d(A, C)\led(A, B)+d(B, C) ,
for all points,, and in . That is, the distance from to is at most as large as the sum of the distance from to and the distance from to .
The triangle inequality is responsible for most of the interesting structure on a metric space, namely, convergence. This is because the remaining requirements for a metric are rather simplistic in comparison. For example, the fact that any convergent sequence in a metric space is a Cauchy sequence is a direct consequence of the triangle inequality, because if we choose any and such that and, where is given and arbitrary (as in the definition of a limit in a metric space), then by the triangle inequality,, so that the sequence is a Cauchy sequence, by definition.
This version of the triangle inequality reduces to the one stated above in case of normed vector spaces where a metric is induced via, with being the vector pointing from point to .
The reverse triangle inequality is a logically equivalent alternative formulation of the triangle inequality that gives lower bounds instead of upper bounds. For plane geometry, the statement is:[18]
Any side of a triangle is greater than or equal to the difference between the other two sides.
In the case of a normed vector space, the statement is:
|\|u\|-\|v\||\leq\|u-v\|,
|d(A,C)-d(B,C)|\leqd(A,B)
\| ⋅ \|
z
d(z, ⋅ )
The proof of the reverse triangle inequality from the usual one uses
\|v-u\|=\|{-}1(u-v)\|=|{-}1| ⋅ \|u-v\|=\|u-v\|
\|u\|=\|(u-v)+v\|\leq\|u-v\|+\|v\| ⇒ \|u\|-\|v\|\leq\|u-v\|,
\|v\|=\|(v-u)+u\|\leq\|v-u\|+\|u\| ⇒ \|u\|-\|v\|\geq-\|u-v\|,
Combining these two statements gives:
-\|u-v\|\leq\|u\|-\|v\|\leq\|u-v\| ⇒ |\|u\|-\|v\||\leq\|u-v\|.
If
\|u+v\|-\|u\|\geq0,
\|u+v\|-\|u\|={|}\|u+v\|-\|u\|{|}\leq\|(u+v)-u\|=\|v\| ⇒ \|u+v\|\leq\|u\|+\|v\|
and if
\|u+v\|-\|u\|<0,
\|u\|+\|v\|\geq\|u\|>\|u+v\|
Thus, in both cases, we find that
\|u\|+\|v\|\geq\|u+v\|
For metric spaces, the proof of the reverse triangle inequality is found similarly by:
d(A,B)+d(B,C)\geqd(A,C) ⇒ d(A,B)\geqd(A,C)-d(B,C)
d(C,A)+d(A,B)\geqd(C,B) ⇒ d(A,B)\geqd(B,C)-d(A,C)
Putting these equations together we find:
d(A,B)\geq|d(A,C)-d(B,C)|
And in the converse, beginning from the reverse triangle inequality, we can again use two cases:
If
d(A,C)-d(B,C)\geq0
d(A,B)\geq|d(A,C)-d(B,C)|=d(A,C)-d(B,C) ⇒ d(A,B)+d(B,C)\geqd(A,C)
and if
d(A,C)-d(B,C)<0,
d(A,B)+d(B,C)\geqd(B,C)>d(A,C)
Thus, in both cases, we find that
d(A,B)+d(B,C)\geqd(A,C)
By applying the cosine function to the triangle inequality and reverse triangle inequality for arc lengths and employing the angle addition and subtraction formulas for cosines, it follows immediately that
and
With these formulas, one needs to compute a square root for each triple of vectors that is examined rather than for each pair of vectors examined, and could be a performance improvement when the number of triples examined is less than the number of pairs examined.
The Minkowski space metric
η\mu
\|u\|2=η\muu\muu\nu
\|u+v\|\geq\|u\|+\|v\|.
A physical example of this inequality is the twin paradox in special relativity. The same reversed form of the inequality holds if both vectors lie in the past light cone, and if one or both are null vectors. The result holds in
n+1
n\geq1
u
v