I believe that the best way to think of it is in terms of modules. Say we have a matrix with characteristic polynomial $f$. For simplicity assume that its minimal polynomial is also $f$. Then it gives $R^n$ the structure of a $R[\alpha]/f(\alpha)$-module. This module is often locally free of rank $1$ because that property is preserved by specialization at primes1$, with different conditions depending on different ring properties. So we are asked to understand line bundles on$\textrm{Spec} R[\alpha]/f(\alpha)$, or at least those line bundles that pushforward to trivial vector bundles on$\textrm{Spec} R$. This problem is quite subtle - it includes, for instance, computing the class numbers of every algebraic number field. 1 I believe that the best way to think of it is in terms of modules. Say we have a matrix with characteristic polynomial$f$. For simplicity assume that its minimal polynomial is also$f$. Then it gives$R^n$the structure of a$R[\alpha]/f(\alpha)$-module. This module is locally free of rank$1$because that property is preserved by specialization at primes. So we are asked to understand line bundles on$\textrm{Spec} R[\alpha]/f(\alpha)$, or at least those line bundles that pushforward to trivial vector bundles on$\textrm{Spec} R\$. This problem is quite subtle - it includes, for instance, computing the class numbers of every algebraic number field.