Finite-order elements of $\text{GL}_4(\mathbb{Q})$ I'm currently studying for my qualifying exams in algebra, and I have not been able to solve the following problem:

Determine all possible positive integers $n$ such that there exists an element in $\text{GL}_4(\mathbb{Q})$ of order $n$.

I've been playing around with various canonical forms, but I just can't figure it out.  Can anyone help me?
 A: There is something wrong in the first sentence of the accepted answer. The problem is that the minimal polynomial for a matrix may not be irreducible. For example, the matrix $$\begin{bmatrix}1& 1 \\ 0 &1 \end{bmatrix}\in M_n(\mathbb{Q})$$ has minimal polynomial $(x-1)^2$ which is reducible.
However, the conclusion for the $GL_4(\mathbb{Q})$ is still right. This is mainly because $4$ is too small.
Suppose $A$ has order $n$, then $A$ satisfies $x^n-1$ and $A^k - I\neq 0$ for all $k< n$. Let $m(x)$ be the minimal polynomial of $A$, then we have 

*

*$m(x)|x^n-1 = \prod_{d|n}\Phi_d(x)$

*$m(x)\nmid x^k - 1$ for all $k< n$
Since $\Phi_d(x)$ are irreducible (prime) over $\mathbb{Q}$, hence $m(x) = \prod_{d_i} \Phi_{d_i}(x)$ for some distinct $d_i|n$. Let $k = lcm(d_1, d_2, \ldots)$. If $k<n$, then we have $m(x)|\Phi_k(x)$ which is a contradiction. Hence we must have $lcm(d_1,d_2,\ldots) = n$. Note that $\deg m(x) \leq 4$, hence we have $\sum \phi(d_i) \leq 4$. Then after a tedious checking (check for all possible $d_i$'s), we still get $\phi(n)\leq 4$ as that answer claims.
The general conclusion in that answer is wrong. Here is an concrete counter-example:
We work in $GL_8(\mathbb{Q})$, and we show that there is element of order $21$ yet $\phi(21) = 12 > 8$. Pick $f_A(x) = m(x) = \Phi_3(x)\Phi_7(x)$ ($f_A$ is the characteristic polynomial for $A$), then $\deg m(x) = \phi(3)+\phi(7) = 8$. Also, note that $m(x)\nmid x^k - 1$ for $k<21$. (Suppose it divides, then $3|k, 7|k$ implies that $lcm(3,7) = 21 | k$ which is a contradiction). Hence we find a matrix of order 21 (A is invertible since the constant term for its characteristic polynomial $f_A$ is 1).
A: Let $A$ be a matrix of finite order $n$. Consider its minimal polynomial $m(x)$.

 The minimal polynomial $m(x)$ of $A$ is irreducible over $\Bbb Q$ and $$m(x)\mid(x^n-1)$$, whence is a cyclotomic polynomial, and also has degree $\le4$. Therefore $\varphi(n)\le4$. By inspection $$n=2^a3^b5^c,$$ and after explicitly writing down the candidates we see it suffices to determine rational $4\times4$ matrices of orders $8$, $10$ and $12$. For the second, it suffices to negate a rational $4\times 4$ matrix of order $5$. For the third, form a block matrix out of two $2\times2$ matrices of orders $3$ and $4$. Finally, to determine matrices of the appropriate dimensions of orders $3,4,5,8$, compute the matrix of the multiplication-by-$x$ linear transformation on $\Bbb Q(x)$ for $x=\zeta_3,\zeta_4,\zeta_5,\zeta_8$ with respect to (say) the power basis $\{1,x,\cdots\}$.

More generally,

 ${\rm GL}_d(\Bbb Q)$ has an element of order $n\iff \varphi(n)\le d.\,$ A proof can be adapted from above.

