Word Metric is Metric

Theorem
Let $\struct {G, \circ}$ be a group.

Let $S$ be a generating set for $G$ which is closed under inverses (that is, $x^{-1} \in S \iff x \in S$).

Let $d_S$ be the associated word metric.

Then $d_S$ is a metric on $G$.

Proof
Let $g, h \in G$.

It is given that $S$ is a generating set for $G$.

It follows that there exist $s_1, \ldots, s_n \in S$ such that $g^{-1} \circ h = s_1 \circ \cdots \circ s_n$.

Therefore $\map {d_S} {g, h} \le n$, establishing that $\R$ is a valid codomain for the mapping $d_S$ with domain $G \times G$.

This is the form a mapping must have to be able to be a metric.

Now checking the other defining properties for a metric in turn:

Clearly the empty sequence can be formed with elements from $S$.

It also has length zero.

Therefore, we have for any $g \in G$ that $\map {d_S} {g, g} = 0$.

Thus is seen to be fulfilled.

Let $g, h, k \in G$.

Let $\map {d_S} {g, h} = n, \map {d_S} {h, k} = m$.

Let $s_1, \ldots, s_n, r_1, \ldots, r_m \in S$ be such that:


 * $g^{-1} \circ h = s_1 \circ \cdots \circ s_n$
 * $h^{-1} \circ k = r_1 \circ \cdots \circ r_m$

From these equations, obtain:

Therefore, $\map {d_S} {g, k} \le m + n = \map {d_S} {g, h} + \map {d_S} {h, k}$.

Thus is seen to be fulfilled.

Let $g, h \in G$.

Let $\map {d_S} {g, h} = n$.

Furthermore, let $s_1, \ldots, s_n \in S$ be such that:


 * $g^{-1} \circ h = s_1 \circ \cdots \circ s_n$

From Inverse of Group Product, obtain:

By assumption $S$ is closed under taking inverses, and hence the latter expression yields a valid sequence for the metric $d_S$.

It follows that $\map {d_S} {h, g} \le \map {d_S} {g, h}$.

Switching the roles of $g$ and $h$ in the above, we obtain the converse inequality, and hence equality.

Thus is seen to be fulfilled.

There is only one word of length zero, namely the empty word.

However, the empty word sends an element $g$ to itself.

Hence $g, h \in G, g \ne h \implies \map {d_S} {g, h} > 0$.

Thus is seen to be fulfilled.

Thus $d_S$ is a metric.