# Verifying triangle inequality for vectors

How would I get Mathematica to verify the triangle inequality for norms (say, the 2-norm for vectors in $\mathbb{R}^n$)?

For scalars, this suffices:

Reduce[Abs[x + y] <= Abs[x] + Abs[y], {x, y}, Reals] (* True *)


However, I can't get Mathematica to verify Norm[x + y] <= Norm[x] + Norm[y] for fixed- or general-dimension vector spaces, using Reduce or Simplify with appropriate assumptions.

• An even simpler version of this would be verifying that Norm[x]==0 implies x is the zero vector. – Ross B. Sep 19 '16 at 23:12

Directly:

x = {a, b};
y = {c, d};
Reduce[Norm[x + y] <= Norm[x] + Norm[y], {a, b, c, d}, Reals]


returns True. Slightly more generally:

x = Array[a, 2];
y = Array[b, 2];
Reduce[Norm[x + y] <= Norm[x] + Norm[y], Flatten@{x, y}, Reals]


works, but I grew tired of waiting when I replaced the "2" with a "3". The "simpler version" is indeed simpler, and works for much larger dimensions:

x = Array[a, 10];
Solve[Norm[x] == 0, x, Reals]

{{a -> 0, a -> 0, a -> 0, a -> 0, a -> 0,
a -> 0, a -> 0, a -> 0, a -> 0, a -> 0}}

• Sure, but this quickly becomes unwieldy and computationally intensive. Ideally I'd like to specify something like x \[Element] Vectors or x \[Element] Vectors[n]. – Ross B. Sep 19 '16 at 23:05
• Was just about to post how it works a little better for the simpler example :)...still can't help but feel that Mathematica can do something smarter than try to brute force a polynomial in $2n$ variables. – Ross B. Sep 20 '16 at 0:27

You can project higher dimensional spaces down to 2D with one vertex at the origin. In this case:

x = {a, b};
y = {c, d};
z = {0, 0};
CylindricalDecomposition[Norm[x - z] + Norm[y - z] >= Norm[x - y], {a, b, c, d}]
(* True *)

• The wording is a bit off here. What is true is that a pair of vectors determines a two dimensional space. That is not the same as representing them in two dimensions using the "standard" Cartesian basis. – Daniel Lichtblau Sep 19 '16 at 22:33