I have given the following problem: Let $G$ be a closed matrix group with lie algebra $\mathfrak{g}$. Let $\mathfrak{h}$ be a commutative lie subalgebra of $\mathfrak{g}$. Let $H$ be the corresponding lie subgroup to $\mathfrak{h}$ i.e. $H:=\{e^{X_1}...e^{X_n}: X_i\in \mathfrak{h}\}$. I want to show that if $\mathfrak{h}$ is a maximal commutative lie subalgebra of $\mathfrak{g}$ then the corresponding lie subgroup $H$ is closed.
I have already shown that $H$ and $\overline{H}$ are commutative which could maybe be useful due to our assistent.
I know that $H$ is closed iff $H=\overline{H}$. Since clearly $H\subseteq \overline{H}$ I wanted to assume $H\subsetneq \overline{H}$ and get a contradiction using the maximality of the subalgebra $\mathfrak{h}$. I wanted to find a subalgebra with contains $\mathfrak{h}$ and is commutative. My first guess was to define the lie algebra corresponding to $\overline{H}$ by $\overline{\mathfrak{h}}:=\{X: e^{tX}\in \overline{H}~~\forall t\in \Bbb{R}\}$. Clearly $\mathfrak{h}\subset \overline{\mathfrak{h}}$ now if I could show that $\overline{\mathfrak{h}}$ is abelian I would be done, but I somehow don't manage to do this. I also don't see where to use my assumtion that $H\subsetneq \overline{H}$.
Could maybe someone help me further?
Continuing off of your approach, it suffices to show that $\overline{\mathfrak h}$ is commutative. Consider any $X,Y \in \overline{\mathfrak h}$. $e^{sX}$ and $e^{tY}$ commute for all $s,t \in \Bbb R$ by the commutativity of $\bar H$.
Now, use this fact to conclude that for every $s$, $e^{sX}$ commutes with $\frac d{dt} e^{tY}$ at $t = 0$, i.e. $e^{sX}$ commutes with $Y$ for all $s$. Similarly, conclude that $Y$ commutes with $X$ by considering the derivative of $e^{sX}$. Thus, $XY = YX$, so $\overline{\mathfrak h}$ is commutative, which is what we wanted.