Proof of triangle inequality using max, min, abs.
October 02, 2022 | 1 minute, 23 seconds
We suppose that for all \(x,y\in\mathbb{R}\) we have that \(\abs{x+y}\leq\abs{x}+\abs{y}\). Then:
\[ \begin{align*} &\abs{x}+\abs{y} \geq \abs{x+y} \\ \iff& \max(x,-x)+\max(y,-y) \geq \abs{x+y} \\ \iff& \max(x+\max(y,-y),-x+\max(y,-y)) \geq \abs{x+y} \\ \iff& \max(\max(x+y,x-y),\max(-x+y,-x-y)) \geq \abs{x+y} \\ \iff& \max(x+y,x-y,-x+y,-x-y) \geq \abs{x+y} \\ \iff& \max(\max(x+y,-x-y),\max(x-y,-x+y)) \geq \abs{x+y} \\ \iff& \max(\abs{x+y},\abs{x-y}) \geq \abs{x+y} \\ \iff& \max(0,\abs{x-y}-\abs{x+y}) \geq 0 \\ \end{align*}\]
which is true by definition, and therefore the triangle inequality holds for all real numbers.
Proof of 'reverse' triangle inequality.
The 'reverse' triangle inequality states that \(\abs{\abs{x}-\abs{y}}\leq \abs{x-y}\).
We require the difference identity \(\abs{\abs{x}-\abs{y}}=\abs{x+y}+\abs{x-y}-\abs{x}-\abs{y}\).
Proof:
We first show that \(\abs{x+\abs{y}}+\abs{x-\abs{y}}=\abs{x+y}+\abs{x-y}\):
\[ \begin{align*} \abs{x+\abs{y}} &= \begin{cases} \abs{x+y} & y\geq 0 \\ \abs{x-y} & y\leq 0 \end{cases} \\ &= \abs{x+y}+\abs{x-y}-\begin{cases} \abs{x-y} & y\geq 0 \\ \abs{x+y} & y\leq 0 \end{cases} \\ &= \abs{x+y}+\abs{x-y}-\abs{x-\abs{y}} \end{align*}\]
and hence it follows that \(\abs{x+\abs{y}}+\abs{x-\abs{y}}=\abs{x+y}+\abs{x-y}\). Furthermore, the difference identity can be proven as follows:
\[ \begin{align*} \abs{\abs{x}-\abs{y}} &= \begin{cases} \abs{x-\abs{y}} & x\geq 0 \\ \abs{x+\abs{y}} & x\leq 0 \end{cases} \\ &= \abs{x-\abs{y}}+\abs{x+\abs{y}}-\begin{cases} \abs{x+\abs{y}} & x\geq 0 \\ \abs{x-\abs{y}} & x\leq 0 \end{cases} \\ &= \abs{x-\abs{y}}+\abs{x+\abs{y}}-\abs{\abs{x}+\abs{y}} & (1)\\ &= \abs{x+y}+\abs{x-y}-\abs{x}-\abs{y} & (2) \end{align*}\]
To show the 'reverse' triangle inequality is true, we begin with the triangle inequality:
\[ \begin{align*} &\abs{x}+\abs{y}\geq \abs{x+y} \\ \iff& \abs{\abs{x}+\abs{y}}\geq \abs{x+y} \\ \iff& \abs{x+y}+\abs{x-y}-\abs{\abs{x}-\abs{y}}\geq \abs{x+y} \\ \iff& \abs{x-y}\geq \abs{\abs{x}-\abs{y}} \end{align*}\]