Topological subspace in $(S^{1})^{n}$ Studying the set of solutions of a particular linear system associated to a matroid, I notice that is it possibile to determine the topology of the quotient and identify it as a subtorus of $(S^{1})^{n}.$ However, I'm not able to complete my proof, since it remains to be solved the following points. I've already proved for the simple case of an affine line in the plane, and it seems to be true for all dimension, but I've not found a solution yet. Here's the text of the problem
Let $n\geq1$ and let $\pi:\mathbb{R}^{n}\longrightarrow(S^{1})^{n}$ be the projection $(x_{1},\ldots,x_{n})\mapsto(e^{2\pi ix_{1}},\ldots,e^{2\pi ix_{n}}).$
Let $S\subseteq\mathbb{R}^{n}$ be an affine nonempty subspace assigned by a system of $m$ equations in $n$ variables $Ax=b$. Assume that the matrix of coefficients $A$ has rational entries. Hence, $\pi(S)\subseteq(S^{1})^{n}$ is homeomorphic to a torus $(S^{1})^{r}$ where $r=\mathrm{rank}(A).$
 A: Let $S_0$ denote the linear subspace parallel to $S$, so $S_0$ is the solution space of $Ax=0$. If the statement is true for $S_0$ then it is true for $S$ because, choosing a translation $T : \mathbb{R}^n \to \mathbb{R}^n$ that takes the origin (in $S_0$) to any point on $S$, it follows that $T$ takes $S_0$ to $S$, and it follows that $T$ projects to a homeomorphism of the $n$-torus $(S^1)^n$ that takes $\pi(S_0)$ to $\pi(S)$. Since $\pi(S_0)$ is a subtorus, so is $\pi(S)$.
So we have reduced the problem to the special case of a linear subspace $S_0$. Since $Ax=0$ is a homogeneous system of equations with rational coefficients, we can clear the denominators, multiplying by their l.c.m., to get an equivalent system of equations with integer coefficients. From this it follows that the linear subspace $S_0$ has a basis consisting of vectors with integer coefficients. And from this it follows that the set of integer vectors of $S_0$ forms a lattice $L = \mathbb{Z}^n \cap S_0$ whose rank equals $r=rank(A)$ which also equals the dimension of $S_0$. The quotient $S_0 / L$ is therefore a torus of dimension $r$, because $L$ has an integer basis of rank $r$ which implies that there is a linear isomorphism between $S_0$ and $\mathbb{R}^r$ that takes $L$ to $\mathbb{Z}^r$. And this $r$-dimensional torus $S_0 / L$ is embedded in $(S^1)^n = \mathbb{R}^n / \mathbb{Z}^n$.
