# Triangle Inequality

The triangle inequality is a very important mathematical relation. It is a core requirement for metrics, or distance functions, to be considered valid and furthermore, a set is equipped with a metric and is therefore considered a metric space if there exists a distance function defined for all members of the set that satisfies the triangle inequality, along with two other requirements that are usually fairly easy to satisfy. Here, we give a proof for the triangle inequality in $$\mathbb{R}^{k}$$, which is fairly restrictive, as the inequality can of course be generalized to include all metric spaces. It is assumed in the following proof that the reader is familiar with the concepts of a Euclidean norm (aka magnitude of a vector) and Euclidean inner product (aka dot product of two vectors).

The triangle inequality in $$\mathbb{R}^{k}$$ is: $$\parallel \vec{x} +\vec{y} \parallel \leq \parallel \vec{x} \parallel + \parallel \vec{y} \parallel$$ $$\forall \vec{x}$$, $$\vec{y}$$ $$\in \mathbb{R}^{k}$$

Proof:

Consider the Pythagorean Theorem: $$a^2 +b^2 =c^2$$. Now, let $$a$$ and $$b$$ be the Euclidean norms of two vectors in $$\mathbb{R}^{k}$$, $$\vec{x}$$ and $$\vec{y}$$, respectively. Then it follows that $$c$$ is the Euclidean norm of $$\vec{x} +\vec{y}$$, due to the geometric properties of vector addition. Then we have:

$$\parallel \vec{x} +\vec{y} \parallel^2 = \parallel \vec{x} \parallel^2 + \parallel \vec{y} \parallel^2$$

This is equivalent to stating: $$(\vec{x} +\vec{y})\cdot(\vec{x} +\vec{y}) = \vec{x}\cdot\vec{x} + \vec{y}\cdot\vec{y}$$

Now let $$\vec{x} = <x_1,x_2,...,x_k>$$ and $$\vec{y} = <y_1,y_2,...,y_k>$$

Then it is apparent that: $$\vec{x}+\vec{y} = <x_1+y_1,x_2+y_2,...,x_k+y_k>$$

And: $$(\vec{x} +\vec{y})\cdot(\vec{x} +\vec{y}) = \displaystyle \sum_{i=1}^{k} (x_i+y_i)^2$$

$$\vec{x}\cdot\vec{x}=\displaystyle \sum_{i=1}^{k} x_i^2$$

$$\vec{y}\cdot\vec{y}=\displaystyle \sum_{i=1}^{k} y_i^2$$

Then we have: $$\displaystyle \sum_{i=1}^{k} (x_i+y_i)^2=\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2$$

$$\Rightarrow$$ $$\sqrt{\displaystyle \sum_{i=1}^{k} (x_i+y_i)^2}=\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2}$$

Now, it is clear that:

$$0 \leq 2\sqrt{(\displaystyle \sum_{i=1}^{k} x_i^2)(\displaystyle \sum_{i=1}^{k} y_i^2)}$$

$$\Rightarrow$$ $$\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2 \leq \displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2 +2\sqrt{(\displaystyle \sum_{i=1}^{k} x_i^2)(\displaystyle \sum_{i=1}^{k} y_i^2)}$$

Note: $$\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2 +2\sqrt{(\displaystyle \sum_{i=1}^{k} x_i^2)(\displaystyle \sum_{i=1}^{k} y_i^2)}= \left(\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2}+\sqrt{\displaystyle \sum_{i=1}^{k} y_i^2}\right)^2$$

Then: $$\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2 \leq\left(\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2}+\sqrt{\displaystyle \sum_{i=1}^{k} y_i^2}\right)^2$$

$$\Rightarrow$$ $$\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2} \leq\left(\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2}+\sqrt{\displaystyle \sum_{i=1}^{k} y_i^2}\right)$$

Since: $$\sqrt{\displaystyle \sum_{i=1}^{k} (x_i+y_i)^2}=\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2 + \displaystyle \sum_{i=1}^{k} y_i^2}$$

We have: $$\sqrt{\displaystyle \sum_{i=1}^{k} (x_i+y_i)^2}\leq\left(\sqrt{\displaystyle \sum_{i=1}^{k} x_i^2}+\sqrt{\displaystyle \sum_{i=1}^{k} y_i^2}\right)$$

$$\Rightarrow$$ $$\sqrt{(\vec{x} +\vec{y})\cdot(\vec{x} +\vec{y})} \leq \sqrt{\vec{x}\cdot\vec{x}} +\sqrt{ \vec{y}\cdot\vec{y}}$$

$$\Rightarrow$$ $$\parallel \vec{x} +\vec{y} \parallel \leq \parallel \vec{x} \parallel + \parallel \vec{y} \parallel$$

Which is the triangle inequality.

QED

Remark: Some may be wondering why we were able use the Pythagorean Theorem in generalized $$\mathbb {R}^{k}$$ without restricting $$k$$ to $$k=2$$. This is because in higher dimensions of Euclidean Space, any triangle existing in this metric space can be considered a flat projection on some arbitrary 2-D plane in Euclidean k-space. Since all planes in such space are subject to the same metric and inner product as the space itself, this usage is justified.

Note by Ethan Robinett
3 years, 8 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

• bulleted
• list

1. numbered
2. list

1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

> This is a quote
This is a quote
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

I do not understand your remark at the end.

It would have made more sense, if you proved it in just the $$k = 2$$ case (which is much easier to see), and then say that "any triangle must lie entirely within a plane", hence we are done (with showing that $$|x| + |y| \geq |x+y|$$).

Note: Pythagorean Theorem holds in generalized $$\mathbb{R} ^k$$ by induction.

Staff - 3 years, 8 months ago

Can you prove this:- Prove(mathematically as well by arguments) that the tension in a rope(massive or massless) will be along the rope everywhere.

- 3 years, 8 months ago