Example of a metric space where triangle inequality doesn’t hold

analysisgeneral-topologymetric-spacesreal-analysis

Give an example of a space where all the conditions of usual metric space are satisfied except the triangle inequality? I see such spaces are called semimetrics but I couldn't find any examples.

Best Answer

$(X,d)$, $X = \mathbb{R}$, $d(x,y) = |x - y|^2$

$d(0,n) = n^2 > n = d(0,1) + d(1,2) + \dots + d(n-1,n)$

Related Question