Toral endomorphism with determinat $k$ has $k$ preimage for every $x$ Suppose $n$-dimensional torus which is defined $T^n={\mathbb R^n}/{\mathbb Z^n}$.
$\color{black}{Definition}$:  Given $A\in GL_n(\mathbb Z)$. we define toral
endomorphism $T_A:T^n \to T^n$ by $T_A([
X])=[AX]$
If $|detA|=k$ how to prove that every $x$ has $k$ preimages
and $T_A^{-1} B(x,r)$ for sufficiently small  radius $r$ consist of $k$ connected component's $B_1,B_2,...,B_k$
Thanks for any hint.
 A: Adressing the question about the number of preimages: Let $[y]$ be any point in the torus $\mathbb{T}^n$. If a point $[x]$ is the preimage of $[y]$, then we have $T_{A}[x] = [y]$, that is, $Ax = y + p$, with $p \in \mathbb{Z}^{n}$. Taking the inverse of $A$ in both sides of the last equation, we can write $x = A^{-1}y + A^{-1}p$. We know that $A^{-1} = \frac{1}{det A}C^{T}$, where $C^{T}$ is the traspost of the cofactor matrix of $A$. $C^{T}$ is a matrix with integer entries, because by definition $A$ only has integer entries. Since $|det A| = 1$, $A^{-1}p \in \mathbb{Z}^n$ for every $p \in \mathbb{Z}^{n}$ and we conclude that $\#T^{-1}_{A}[y] = 1 = |det A|$. 
When $A$ is a diagonal matrix: Using the same equation in the last case, we can write $x = A^{-1}y + A^{-1}p$. But here we do not have $A^{-1}p \in \mathbb{Z}^{n}$. So the idea is to figure out what kind of different points in $\mathbb{T}^{n}$ are preimages of $[y]$. The matrix $A$ is diagonal and can be written as 
$A=\begin{bmatrix}
\lambda_{1}&0&...&0\\
0&\lambda_{2}&...&0\\
...&...&...&...\\
0&0&...&\lambda_{n}\\
\end{bmatrix}$ where $\lambda_{1}, \lambda_{2},...,\lambda_{n}$ are the eigenvalues. The inverse of A is given by 
$A^{-1} = \frac{1}{det A}\begin{bmatrix}
 \lambda_{2}\lambda_{3}...\lambda_{n}&0&...&0\\
 0&\lambda_{1}\lambda_{3}...\lambda_{n}&...&0\\
 ...&...&...&...\\
 0&0&...&\lambda_{1}\lambda_{2}...\lambda_{n-1}\\
\end{bmatrix} = \begin{bmatrix}
\frac{1}{\lambda_{1}}&0&...&0\\
0&\frac{1}{\lambda_{2}}&...&0\\
...&...&...&...\\
0&0&...&\frac{1}{\lambda_{n}}\\
\end{bmatrix}.$
Since $A$ is an endomorphism, $|det A| \neq 0$ and $|det A| \neq 1$ implying that $\lambda_{j} \neq 0$ for every $j$. Now let $d = |det A|$ and $p = (p_{1},...,p_{n})$. We can evaluate the value of this inverse at $p$ to obtain  
$A^{-1}p = \begin{bmatrix}
\frac{p_{1}}{\lambda_{1}}\\
\frac{p_{2}}{\lambda_{2}}\\
...\\
\frac{p_{n}}{\lambda_{n}}\\
\end{bmatrix}.$
Writing $p_{j} = |\lambda_{j}|k_{j} + r_{j}$, $0\leq r_{j}<|\lambda_{j}|$ for every $j$, we have that 
$A^{-1}p = \begin{bmatrix}
k_{1}\\
k_{2}\\
...\\
k_{n}\\
\end{bmatrix} + \begin{bmatrix}
\frac{r_{1}}{|\lambda_{1}|}\\
\frac{r_{2}}{|\lambda_{2}|}\\
...\\
\frac{r_{n}}{|\lambda_{n}|}\\
\end{bmatrix}.$
Since $k_{j} \in \mathbb{Z}$, $k = (k_{1},...,k_{n}) \in \mathbb{Z}^n$ we can conclude that all the preimages of $[y]$ are the points of the form  
$[A^{-1}y - \begin{bmatrix}
\frac{r_{1}}{|\lambda_{1}|}\\
\frac{r_{2}}{|\lambda_{2}|}\\
...\\
\frac{r_{n}}{|\lambda_{n}|}\\
\end{bmatrix}] \in \mathbb{T}^{n}.$ 
Since $0\leq r_{j}<|\lambda_{j}|$ for every $j$, we have that $\#T^{-1}_{A}[y] = |\lambda_{1}|.|\lambda_{2}|...|\lambda_{n}| = |det A|$, for any $[y] \in \mathbb{T}^{n}$. By the Smith Normal Form, every integer matrix $M$ can be written as $ADB$, where $D$ is a diagonal integer matrix and $A$, $B$ are integer matrices with determinant +1 or -1.
