Let $F$ be a finite field of order $p$, where $p$ is prime. For any $n\times n$ matrix $A$ that is invertible over $F$, then there would appear to exist integers $k$ such that $A^{k} = I$. My question is simply what is the minimum value of $k$ (as a function of $n$ and $p$), which I will call $k\_{n,p}$, such that this relation holds for all choices of $A$.


Proving that such an integer exists is relatively straightforward. By assumption, there exists a $B$ such that $AB = I$. Furthermore, there are precisely $\gamma\_{n}(p) = (p^n - 1)(p^n-p) \ldots (p^n - p^{n-1})$ matrices satisfying the requirements for $A$. Since invertible matrices form a group, this implies that there exist distinct integers $a$ and $b$ between $1$ and $\gamma\_{n}(p)+1$ such that $A^a = A^b$, and hence $B = A^{a-b-1} = A^{k-1}$. This implies that $k\_{n,p} \leq \gamma\_n(p)$. Furthermore, since the order of the group of invertible matrices over $F$ is $\gamma\_n(p)$, and the powers of $A$ form a subgroup of this group, Lagrange's theorem implies that $k\_{n,p}$ must divide $\gamma\_n(p)$. So my question amounts to whether $k\_{n,p} = \gamma\_n(p)$, or whether you can do better.


This would essentially be an equivalent of Fermat's little theorem for matrices, but in searching such literature I have only been able to turn up trace relations, and so if this is well known, or if my reasoning is flawed, I would appreciate a pointer to the relevant literature (or to my error).



What is the minimum $k$ such that $A^k \equiv I$ mod p for invertible matrices?
The quantity that you are trying to compute is called the *exponent* of the group $\text{GL}\_n(\mathbb F\_p)$. As you note by Lagrange ,it always divides the order of the group. More generally, one can ask about the exponent of the group $\text{GL}\_n(\mathbb F\_q)$, where $q$ is a power of $p$. You'll find a detailed answer/discussion at <https://math.stackexchange.com/questions/292620/exponent-of-gln-q>


