# Triangle inequality

Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
Citable Version  [?]

This editable Main Article is under development and subject to a disclaimer.

The triangle inequality is a basic result in mathematics, which, in its simplest form, can be stated in words as follows:

The sum of the lengths of two sides of a triangle is greater than the length of the third

It is based on the intuitive idea that:

The straight line path is the shortest path

The former statement is often taught to students at the end of primary school or the beginning of middle school. The triangle inequality comes up in a number of other forms throughout mathematics, and is encountered in the theory of metric spaces in topology, the theory of normed vector spaces in functional analysis, and in parts of complex analysis.

## In Euclidean geometry

### Formal statement

In Euclidean geometry, the statement is as follows:

Let ${\displaystyle A,B,C}$ be three non-collinear points in the plane. Then, we have:

${\displaystyle |AB|+|BC|>|AC|}$

where ${\displaystyle |\cdot |}$ denotes the length of the line segment joining the two points.

If we consider the triangle ${\displaystyle \triangle ABC}$, then this is precisely the statement that the sum of two sides of a triangle is at least equal to the third.

When ${\displaystyle A,B,C}$ are collinear, we get what is called a degenerate triangle. For degenerate triangles, equality can hold. It holds iff ${\displaystyle B}$ is between ${\displaystyle A}$ and ${\displaystyle C}$.

### Intuitive justification

The rationale behind the triangle inequality is that the straight line path from ${\displaystyle A}$ to ${\displaystyle C}$ is shorter than the path where we first go to ${\displaystyle B}$, and then to ${\displaystyle C}$.

## In metric spaces

A metric space is a mathematical abstraction of spaces with a notion of distance between any two points. Since the triangle inequality is so fundamental to the way we expect distance to behave, the triangle inequality is assumed as one of the axioms for a metric space. Formally, a metric space is a set ${\displaystyle X}$ equipped with a distance function ${\displaystyle d:X\times X\to \mathbb {R} _{\geq 0}}$ that satisfies the following conditions for all points ${\displaystyle x,y,z\in X}$:

• ${\displaystyle d}$ is symmetric i.e. ${\displaystyle d(x,y)=d(y,x)}$
• ${\displaystyle d(x,y)>0}$ if ${\displaystyle x\neq y}$ and ${\displaystyle d(x,y)=0}$ if ${\displaystyle x=y}$
• ${\displaystyle d(x,y)+d(y,z)\geq d(y,z)}$