Solution (source code)

= Solution

Write
$$
\Omega=\begin{pmatrix}0&I_n\\-I_n&0\end{pmatrix}.
$$
The identity belongs to $G$. If $A,B\in G$, then
$$
(AB)^T\Omega(AB)=B^T(A^T\Omega A)B=B^T\Omega B=\Omega.
$$
Taking determinants in $A^T\Omega A=\Omega$ shows that $A$ is invertible, and multiplying that identity by $A^{-T}$ and $A^{-1}$ gives $(A^{-1})^T\Omega A^{-1}=\Omega$. Thus $G$ is a group.

Let $\operatorname{Skew}_{2n}(\mathbb R)$ denote the vector space of skew-symmetric $2n\times2n$ matrices and define
$$
F:M_{2n}(\mathbb R)\longrightarrow\operatorname{Skew}_{2n}(\mathbb R),
\qquad F(A)=A^T\Omega A.
$$
Then $G=F^{-1}(\Omega)$. At $A\in G$,
$$
DF_A(H)=H^T\Omega A+A^T\Omega H.
$$
Given any skew-symmetric matrix $S$, set $H=AB$ with $B=-\frac12\Omega S$. Since $A^T\Omega A=\Omega$, a direct calculation gives
$$
DF_A(AB)=B^T\Omega+\Omega B=S.
$$
The derivative is therefore surjective at every point of $F^{-1}(\Omega)$. The <regular level set theorem> proves that the <symplectic group> is an embedded submanifold of $M_{2n}(\mathbb R)$.