TITLE: Why are quotient metric spaces defined this way?
QUESTION [28 upvotes]: From Wikipedia:

If $M$ is a metric space with metric $d$, and $\sim$ is an equivalence
  relation on $M$, then we can endow the quotient set $M/{\sim}$ with the
  following (pseudo)metric. Given two equivalence classes $[x]$ and
  $[y]$, we define $$
     d'([x],[y]) = \inf\{d(p_1,q_1)+d(p_2,q_2)+\dotsb+d(p_{n},q_{n})\} $$ where the infimum is taken over all finite sequences $(p_1, p_2,
 \dots, p_n)$ and $(q_1, q_2, \dots, q_n)$ with $[p_1]=[x], [q_n]=[y],
 [q_i]=[p_{i+1}], i=1,2,\dots, n-1$. In general this will only define a
  pseudometric, i.e. $d'([x],[y])=0$ does not necessarily imply that
  $[x]=[y]$. However for nice equivalence relations (e.g., those given
  by gluing together polyhedra along faces), it is a metric.


I wonder why the quotient metric is defined that way?
Instead, how about using the distance between two subsets of the metric space $$
         d'([x],[y]) = \inf\{d(p,q)\} $$ the infimum is taken over all $(p,q)$ such that $[p]=[x], [q]=[y]$?

Thanks and regards!

REPLY [12 votes]: Clearly, using the definition from Wikipedia, you always get a smaller or equal distance than under your proposal. If the definitions disagree and your approach is employed, the triangle inequality is violated. The definition you find in Wikipedia guarantees that the triangle inequality is valid. So I will give an example in which the triangle inequality is violated under your propsal. 
Let $A=\{(0,x):x\in[0,1]\}$, $C=\{(1,x):x\in[0,1]\}$, and $B=\{(x,x):x\in(0,1)\}$. Let $X=A\cup B\cup C$ and endow it with the Euclidean metric. Partition $X$ into $A$, $B$, and $C$. One can make a path from $A$ to $C$ have lenght arbitrarily close to $0$, but $d(A,C)=1$ under your proposal.

REPLY [7 votes]: Hopefully an example will show the problem:
Consider $X = \{ ±1, ±2, 1.1, 2.1 \}$ with $d(x,y)=|x-y|$ and  $\sim\, = \{\{1,-1\},\{2,-2\},\{1.1,2.1\}\}$.
Then $$d([1],[2]) \leq d([1],[1.1]) + d([1.1],[2]),$$ but if we use any sort of infimum definition, then $$d([1],[1.1]) \leq |1-1.1| = 0.1$$ and $$d([1.1],[2])=d([2.1],[2]) \leq |2.1-2|=0.1,$$ so $$d([1],[2]) \leq 0.2 < |1-2|= 1$$
Using a supremum would have the odd effect that $d([1],[1])=d([1],[-1]) \geq 2$, so infimum seems natural, even if it is a little broken (only a pseudo-metric).
(Joriki's answer indicates the same example.)