I'm interested in computing the direct limit of an arbitrary $2\times 2$ primitive matrix over $\mathbf{Z}$. That is for a fixed primitive matrix $M$, the colimit $\displaystyle\lim\_{\stackrel{\longrightarrow}{n}}(\mathbf{Z}^2,M)$ over a diagram of shape $\mathbf{N}$.


Is there an algorithmic way of computing these groups? It's possible to calculate some simple examples by hand, such as $\displaystyle\lim\_{\stackrel{\longrightarrow}{n}} \left(\begin{smallmatrix}1&1\\ 1&1 \end{smallmatrix}\right) \cong \mathbf{Z}[1/2]$, but it is not clear to me how to calculate these groups for arbitrary primitive matrices. A reasonable approach seemed to be to put $M$ into Smith Normal Form, but the invertible matrices seem to affect the generators in ways that can't be controlled as one might naively assume.


If there is no method which works in all cases, does there exist a reasonably large subclass for which a method does exist?



Direct limit of primitive integral matrices
Since you mention primitive, I guess you mean matrices with nonnegative entries such that some power of the matrix is strictly positive? 


There is a large literature on this type of problem, especially when we take into account the ordered abelian group structure (when the matrices have only nonnegative entries). But one way to approach this is to view it as a module over the centralizer of the matrix, and invert the matrix (so that it becomes a cyclic module over the centralizer (here "invert" means factoring out the ideal of the centralizer that is killed by the matrix, and then inverting the central element corresponding to the matrix). There are some subtleties arising from the ideal class (if the characteristic polynomial is irreducible modulo any zeros).


This goes back to McDuffee and someone else in the 20s. 


Edit: You asked about computable: I assume you mean this in the non-technical sense. For size 2 matrices, there are only three possibilities, rank 1, rank 2 and both eigenvalues integers, or rank 2 and quadratic large eigenvalue. 


For rank 1, the limit is just $Z[1/n]$ (as a subgroup of the reals, that is, totally ordered) where $n$ is the large eigenvalue. 


When both eigenvalues are nonzero integers, you can conjugate with an element of SL(2,Z) to an upper triangular matrix, and obtain the limit group as an extension, $Z[1/k] \to G \to Z[1/n]$ with the strict ordering inherited from the map to the reals (here $n$ is the large eigenvalue, $k$ is the other one), and only finitely many abelian group extension classes arise once $n$ and $k$ are fixed; see also Boyle and Handelman, *Algebraic shift equivalence and primitive matrices,* Transactions of the AMS 336 (1993) 121–149, which is probably the reference I should have given first.


When the characteristic polynomial is irreducible, then there is the connection between ideal classes over the centralizer, and again there are only finitely many limit groups once the characteristic polynomial is fixed. See also Handelman, *Matrices of positive polynomials*, Electron. J. Linear Algebra, 19 (2009) 2--89, especially the zero variable examples discussed early on.


