[example: Irrational Winding In A Torus]
[claim]The subgroup $H=\{(e^{it},e^{i\alpha t}):t\in\mathbb R\}$ is dense in $T^2$ and is not closed.[/claim]
[proof]Define $\phi:\mathbb R\to T^2$ by $\phi(t)=(e^{it},e^{i\alpha t})$. For $s,t\in\mathbb R$,
\begin{align*}
\phi(s+t)=(e^{i(s+t)},e^{i\alpha(s+t)})=(e^{is}e^{it},e^{i\alpha s}e^{i\alpha t})=\phi(s)\phi(t).
\end{align*}
Thus $H=\phi(\mathbb R)$ is a subgroup of $T^2$.
To prove density, fix a target point $(e^{ia},e^{ib})\in T^2$. Points of $H$ with first coordinate exactly $e^{ia}$ are obtained by taking $t=a+2\pi n$ with $n\in\mathbb Z$, because
\begin{align*}
e^{i(a+2\pi n)}=e^{ia}e^{2\pi i n}=e^{ia}.
\end{align*}
For such $t$, the second coordinate is
\begin{align*}
e^{i\alpha(a+2\pi n)}=e^{i\alpha a}e^{2\pi i\alpha n}.
\end{align*}
So it remains to know that the set $\{e^{2\pi i\alpha n}:n\in\mathbb Z\}$ is dense in $S^1$.
We verify this density by the pigeonhole principle. Since $\alpha$ is irrational, the fractional parts of $0,\alpha,2\alpha,\ldots,N\alpha$ are distinct. Divide $[0,1)$ into $N$ intervals of length $1/N$. Two of these $N+1$ fractional parts lie in the same interval, so for some integer $q$ with $1\le q\le N$ there is an integer $p$ such that
\begin{align*}
0<|q\alpha-p|<1/N.
\end{align*}
Write $\varepsilon=q\alpha-p$. Then $e^{2\pi i q\alpha}=e^{2\pi i\varepsilon}$, and the step size $|\varepsilon|$ can be made arbitrarily small by choosing $N$ large. The multiples $0,\varepsilon,2\varepsilon,\ldots,m\varepsilon$ modulo $1$ then pass within $|\varepsilon|$ of every point of the circle before wrapping around, so the values $e^{2\pi i kq\alpha}$ are arbitrarily close to any prescribed point of $S^1$. Hence $\{e^{2\pi i\alpha n}:n\in\mathbb Z\}$ is dense in $S^1$.
Therefore, for every $(e^{ia},e^{ib})\in T^2$ and every neighbourhood of it, one can choose $n$ so that
\begin{align*}
(e^{i(a+2\pi n)},e^{i\alpha(a+2\pi n)})=(e^{ia},e^{i\alpha a}e^{2\pi i\alpha n})
\end{align*}
lies in that neighbourhood. Thus $H$ is dense in $T^2$. Since $H\ne T^2$, for example no $t$ satisfies both $e^{it}=1$ and $e^{i\alpha t}=e^{i\pi}$ because the first equation gives $t=2\pi m$ and then the second gives $e^{i\alpha t}=e^{2\pi i\alpha m}\ne -1$ when $\alpha$ is irrational, the dense subgroup $H$ is not closed.[/proof]
This is the basic obstruction excluded by the closedness condition in the definition of a matrix Lie group: a subgroup can come from a smooth one-parameter parametrisation and still have the wrong [subspace topology](/page/Subspace%20Topology) to be an embedded Lie subgroup.
[/example]