Distance in $\mathbb{S}^1$

63 Views Asked by At

I need prove that the funtion $d: \mathbb{S}^1 \times \mathbb{S}^1 \to \mathbb{R}$ is a metric, where $\mathbb{S}^1= \{ e^{2\pi r}:r \in [0, 1] \}$ given by

$$d(x,y) = \begin{cases}\min\{s-r,1-s+r\}&\text{if } r\leq s\\\min\{r-s,1-r+s\}&\text{if } s\leq r\end{cases} \text{ if } x=e^{2i\pi r},y=e^{2i\pi s}\in\mathbb{S}^1$$

image of definition of d(x,y)

I have trouble proving the triangle inequality. I would appreciate if someone helps me.