Square of Metric does not necessarily form Metric

Theorem
Let $M = \struct {A, d}$ be a metric space.

Let $d_4: A^2 \to \R$ be the mapping defined as:
 * $\forall \tuple {x, y} \in A^2: \map {d_4} {x, y} = \paren {\map d {x, y} }^2$

Then $d_4$ may or may not be a metric for $A$.

Proof
Let $d$ be the standard discrete metric on $M$.

Then:
 * $\forall \tuple {x, y} \in A^2: \map {d_4} {x, y} = \map d {x, y}$

and indeed in this case $d_4$ is a metric for $A$.

Let $M = \struct {\R, d}$ be the real number line with the usual (Euclidean) metric.

Let $x = 1$, $y = \dfrac 1 2$ and $z = 0$.

We have:

So we have:
 * $\map {d_4} {x, y} + \map {d_4} {y, z} < \map {d_4} {x, z}$

and it is seen that $d_4$ does not satisfy.