That this function is a distance function means firstly that it is symmetric in x {\displaystyle x} and y , {\displaystyle y,} secondly that the distance between x {\displaystyle x} and itself is zero, and otherwise the distance between x {\displaystyle x} and y {\displaystyle y} must be positive, and lastly that the triangle inequality holds, meaning that the length of one leg of a triangle xyz cannot exceed the sum of the lengths of the other two legs: