Integer eigenvectors of a rational matrix I have a $2n\times 2n$ rational matrix  $A$ for which I know can be diagonalized in the form
$$A=MDM^{-1}$$
where $D$ is a $2n\times 2n$ matrix consisting of half eigenvalues $1$ and half eigenvalues $0$. The eigenvectors can then be expressed in terms of the rows of $M$.
I.e. we have $n$ eigenvectors with eigenvalue $1$ of the form
$$DM^{-1}v=\lambda M^{-1} v$$
Hence, $v=M\vec e_1$.
I therefore have $n$ degenerate $2n$-vectors which correspond to the first $n$ rows of $M$. However, I would like to identify all possible integer eigenvectors.
In the case of integer matirx $A$ this would be a linear Diophantine equation and so we could use the Smith normal form to find $B=UAV$ where $B$ is a diagonal matrix and $U,V$ are unimodular.
One way could be to convert $A$ to an integer matrix by multiplying it by the greatest common divisor of all the denominators in $A$ but I wonder if this would mean we would lose possible eigenvectors.
Otherwise is there perhaps a way to select only the eigenspace of $v$ for which all $v_i$ are integers?
 A: Your idea of multiplying the matrix $\ A\ $ by the least common multiple (not the greatest common divisor) of the denominators of its entries will  work.  If $\ \sigma\ $ is the least common multiple of the denominators of the entries of $\ A\ $, and  $\ B=\sigma UAV\ $ is the Smith normal form of $\ \sigma A\ $, where $\ U\ $ and $\ V\ $ are unimodular matrices, then the first $\ n\ $ entries on the diagonal of $\ B\ $ will be non-zero and the rest will be zero. Therefore $\ \sigma UAV\vec{e}_i=B\vec{e}_i=0\ $ for $\ i=n,n+1,\dots,2n\ $ and $\ V\vec{e}_n, V\vec{e}_{n+1},\dots,$$\,V\vec{e}_{2n}\ $ will be $\ n\ $ linearly independent eigenvectors of $\ A\ $ with integer entries for the eigenvalue $\ 0\ $.
Also, if $\ \vec{w}\ $ is any eigenvector of $\ A\ $ for the eigenvalue $\ 0\ $, with integer entries, then $\ 0=\sigma UAVV^{-1}\vec{w}=BV^{-1}\vec{w}\ $.  Because the first $\ n\ $ entries on the diagonal of $\ B\ $ are non-zero, the first $\ n\ $ entries of $\ V^{-1}\vec{w}\ $ must be zero. Therefore
$$
V^{-1}\vec{w}=\pmatrix{0\\0\\\vdots\\0\\z_n\\z_{n+1}\\\vdots\\z_{2n}}=\sum_{i=n}^{2n}z_i\vec{e}_i\ ,
$$
where $\ z_i\in\mathbb{Z}\ $, because the entries of $\ V^{-1}\ $ and $\ w\ $ are all integers.  Therefore
$$
w=\sum_{i=n}^{2n}z_iV\vec{e}_i
$$
is an integer linear combination of the eigenvectors $\ V\vec{e}_n,$$\, V\vec{e}_{n+1},\dots,$$\,V\vec{e}_{2n}\ $. It follows that $\ V\vec{e}_n,$$\, V\vec{e}_{n+1},\dots,$$\,V\vec{e}_{2n}\ $ is a set of generators for the $\ \mathbb{Z}$-module of eigenvectors of $\ A\ $ with integer entries for the eigenvalue $\ 0\ $
Likewise, if you do the same thing with the matrix $\ A-I\ $, you'll get a set of $\ n\ $ generators with integer entries for the $\ \mathbb{Z}$-module of eigenvectors of $\ A\ $ with integer entries for the eigenvalue $\ 1\ $.
If you don't need the eigenvectors to form a set of generators, there's a slightly simpler way of getting a set of $\ n\ $ with integer entries that are merely linearly independent over the rationals.  Solving the sets of linear equations $\ Ax=0\ $ and $\ (A-I)y=0\ $ by Gaussian elimination will give you bases of the two eigenspaces with rational entries. If you now multiply each member of these bases by the least common multiple of the denominators of their entries, you'll get $\ n\ $ linearly independent eigenvectors with integer entries for each of the two eigenvalues.
