TITLE: Asking whether there is a compact Lie group containing affine symplectic group
QUESTION [11 upvotes]: The affine symplectic group is interesting and important in physics. However, the Lie group is noncompact. In order to have some good properties (Basically, we need some good behavior of Haar measure) that need in physics. So the question is that I hope to find another compact Lie group $G$ which affine symplectic group is a subgroup of $G.$ (Not just topologically, but the group operation needs to be preserved). The simple analog is that $\mathbb{R}$ is a noncompact Lie group but can fit into a 2-torus $T^2.$ One can see this:
Can a compact Lie group have a non-compact Lie subgroup?
I have searched the literature, but I can not find many pieces of literature for affine symplectic group.
Any ideas and comments are very welcome.

REPLY [21 votes]: The answer is 'no', the affine symplectic group cannot appear as a Lie subgroup of any compact Lie group.  The reason is that the affine symplectic group contains $\mathrm{SL}(2,\mathbb{R})$ as a Lie subgroup, and $\mathrm{SL}(2,\mathbb{R})$ cannot be a Lie subgroup of any compact Lie group.
To see this, note that any compact Lie group has a bïinvariant Riemannian metric, a property that is inherited by all of its Lie subgroups.  However, $\mathrm{SL}(2,\mathbb{R})$ does not have a bïinvariant Riemannian metric because its adjoint representation on ${\frak{sl}}(2,\mathbb{R})\simeq\mathbb{R}^3$ acts as $\mathrm{SO}(1,2)\subset \mathrm{GL}(3,\mathbb{R})$, which does not preserve any positive definite inner product on $\mathbb{R}^3$.