Transitive Closure of Symmetric Relation is Symmetric

Theorem
Let $S$ be a set.

Let $\mathcal R$ be a symmetric relation on $S$.

Let $\mathcal T$ be the transitive closure of $\mathcal R$.

The $\mathcal T$ is symmetric.

Proof
Let $a, b \in S$ with $a \mathrel{\mathcal T} b$.

By Construction of Transitive Closure, there is an $n \in \N$ such that $a \mathrel{\mathcal R^n} b $.

Thus there are $x_0, x_1, \dots x_n \in S$ such that:
 * $x_0 = a$
 * $x_n = b$
 * For $k = 0, \dots, n-1$: $x_k \mathrel{\mathcal R} x_{k+1}$

For $k = 0, \dots, n$, let $y_k = x_{n-k}$.

Then:
 * $y_0 = x_n = b$
 * $y_n = x_0 = a$

For $k = 0, \dots, n-1$: $x_{n-k-1} \mathrel{\mathcal R} x_{n-k}$.

Thus $y_{k+1} \mathrel{\mathcal R} y_k$.

Since $\mathcal R$ is symmetric:
 * For $k = 0, \dots, n-1$: $y_k \mathrel{\mathcal R} y_{k+1}$.

Thus $b \mathrel{\mathcal R^n} a$, so $b \mathrel{\mathcal T} a$.