 thumb|three examples of the triangle inequality for triangles with sides of lengths , , . the top example shows the case when there is a clear inequality and the bottom example shows the case when the third side, , is nearly equal to the sum of the other two sides . 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.wolfram mathworld - http://mathworld.wolfram.com/triangleinequality.html  if , , and  are the lengths of the sides of the triangle, then the triangle inequality states that :z \leq x + y , with equality only in the degenerate case of a triangle with zero area. in euclidean geometry and some other geometries, the triangle inequality is a theorem about distances, and it is written using vectors and vector lengths (norms): :\|\mathbf x + \mathbf y\| \leq \|\mathbf x\| + \|\mathbf y\| , where the length  of the third side has been replaced by the vector sum . when  and  are real numbers, they can be viewed as vectors in , and the triangle inequality expresses a relationship between absolute values. 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 proven without these theorems. the inequality can be viewed intuitively in either  or . the figure at the right shows three examples beginning with clear inequality (top) and approaching equality (bottom). in the euclidean case, equality occurs only if the triangle has a  angle and two  angles, making the three vertices collinear, as shown in the bottom example. thus, in euclidean geometry, the shortest distance between two points is a straight line. 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. {{cite book |title=robotics: science and 
Geometric_inequalities Linear_algebra Metric_geometry Theorems_in_geometry