Proving that the triangle inequality is satisfied is often the most difficult part of proving that a function is a metric. We will work through this proof with the help of the Cauchy-Schwarz Inequality.
So we have a quadratic that is never negative. This implies that the quadratic can have at most one real zero. The quadratic formula gives the roots of as
We have only shown that and are metrics on , but similar arguments apply in . Proofs are left to Exercise 5 and Exercise 6. In addition, the discrete metric