Solution (source code)

= Solution

For a real linear change of coordinates $x'=Ax$, one has $dx'=A\,dx$. The <Euclidean metric> therefore transforms to
$$
g'=dx'^Tdx'=dx^TA^T A\,dx.
$$
It agrees with $dx^Tdx$ for every displacement precisely when $A^TA=I$. For example, equality of the associated <quadratic forms> determines their symmetric coefficient <matrices> by <polarization identity>. The <orthogonal group> is defined by this condition, so
$$
\boxed{\operatorname{Stab}_{\operatorname{GL}(6,\mathbb R)}(g)
=O(6)=\{A:A^TA=I\}.}
$$
Taking <determinants> gives $(\det A)^2=1$. Thus these <matrices> are invertible automatically; both signs of the <determinant> are allowed, since the <metric> alone does not specify an orientation.