Symmetry depends on preserved structure (source code)

= Symmetry depends on preserved structure
{title2=$|G_{\rm set}|=24,\quad |G_{\rm affine}|=8,\quad |G_{\rm metric}|=4$}

Take the four-point <set>
$$
R=\{(2,1),(-2,1),(-2,-1),(2,-1)\},
$$
the <vertices of a polygon> of a <rectangle> whose side lengths are four and two. Three choices of structure give three different <symmetry groups> on these same points.

As an unstructured <set>, $R$ has all $4!=24$ <permutations> as symmetries, forming the <symmetric group> $S_4$. If <Euclidean distance> is part of the data, the allowed maps are only the identity, a half-turn <rotation>, and the <reflections> across the two coordinate axes. They form a <Klein four-group> of <group order> four. To see that nothing is missing, fix the image of one <vertex of a polygon>: its three other distances, $2$, $4$, and $\sqrt{20}$, are distinct, so they uniquely determine the images of the remaining vertices.

Preserving affine structure permits more. The <affine map>
$$
T(x,y)=(-2y,x/2),\qquad
T=\begin{pmatrix}0&-2\\1/2&0\end{pmatrix}
$$
cycles all four points of $R$. It sends a horizontal side of length four to a vertical side of length two, so it is not an <isometry>. Yet it preserves the <rectangle>'s vertex <set> and all <affine combinations> among those points.

\Image[/rectangle-metric-versus-affine-symmetry.png]
{title=An affine symmetry preserves these four points while changing a side's Euclidean length}
{description=Original example $T(x,y)=(-2y,x/2)$. The orange side of length four on the left is sent to the orange side of length two on the right. The point labels track the map for this illustration; they are not additional fixed labels imposed on the underlying four-point object.}

Let $A=\operatorname{diag}(2,1)$ and let $r(x,y)=(-y,x)$ be the <square>'s quarter-turn <rotation>. Then
$$
T=ArA^{-1}.
$$
Conjugating every <square> symmetry by $A$ gives eight <affine maps> preserving $R$. This <group isomorphism> makes the affine <symmetry group> a <dihedral group>, although some of its maps do not preserve the original <Euclidean distances>. There are no further affine symmetries: an <affine map> preserves the common midpoint of the diagonals, so it must preserve opposite pairs. The image of one vertex has four choices and the image of an adjacent vertex has two; those choices determine the map through three noncollinear points.

Thus
$$
\boxed{G_{\rm metric}\subsetneq G_{\rm affine}\subsetneq G_{\rm set},\qquad
4<8<24.}
$$
An arbitrary <permutation> need not be an <affine map>. For example, exchanging the two top vertices while fixing the two bottom vertices sends the common diagonal midpoint to two different points, which no single <affine map> can do. The phrase "the symmetry of these points" becomes unambiguous only after stating which structure matters.