I need help with the following question.
Let ($M, d$) be a metric space and $x$ ∈ $M$.
Define $D : M × M → \mathbb R$
by $D(p, q)$ = $d(p, x) + d(q, x)$ if $p$ does not equal $q$
and
$D(p, q)$ = $0$ if $p=q$
Show that $D$ is a distance function.
My attempt:
I am aware that this function holds for non-negativity when $p$ does not equal $q$
I am also aware that it holds for identification condition as the function = $0$ when $p = q$
How would i show symmetry and and that it holds for the triangle inequality?
Since $d$ is a metric so $d(p,x)=d(x,p)$ and $d(x,q)=d(q,x)$.
$D(p,q)= d(p,x)+d(q,x)=d(x,p)+d(x,q)= D(q,p)$
$D(p,r)= d(p,x)+d(r,x)\le d(p,r)+d(r,x)+ d(r,q)+ d(q,x)=D(p,q)+D(q,r)$