Let $A\in M_{n}(\mathbb{Q})$, meaning that $A$ is $n\times n$ matrix with entries in the rational numbers $\mathbb{Q}$. Suppose that $A$ satisfies two conditions:
- $\det(A)\neq 0$
- For every integer $k$, there exists a $B\in M_{n}(\mathbb{Q})$ such that $B^k = A$.
Does it follow that $A = I_n$? Here, $I_n$ is the $n\times n$ identity matrix.
Motivation. The analogous problem where $\mathbb{Q}$ everywhere is replaced by $\mathbb{Z}$ has an affirmative answer. More precisely, let's prove the following statement:
Claim. Let $A\in M_{n}(\mathbb{Z})$, meaning that $A$ is $n\times n$ matrix with integer entries. Suppose that $\det(A)\neq 0$ and that for every integer $k$, there exists $B\in M_{n}(\mathbb{Z})$ such that $B^k = A$. Then $A = I_n$.
Proof. Since $\det(A)\neq 0$, there are only finitely many primes dividing $\det(A)$. Let $p$ be any prime which does not divide $\det(A)$. After reducing mod $p$, we still get a non-singular matrix $\overline{A}$, so $\overline{A}\in\operatorname{GL}_{n}(\mathbb{Z}/p\mathbb{Z})$. Let $k=\# \operatorname{GL}_{n}(\mathbb{Z}/p\mathbb{Z})$ be the cardinality of the group of invertible matrices with entries in $\mathbb{Z}/p\mathbb{Z}$. By hypothesis, there exists $B\in M_{n}(\mathbb{Z})$ such that $B^k=A$. After reducing mod $p$, we get $(\overline{B})^k = \overline{A}$. By Lagrange's theorem, $(\overline{B})^k = \overline{I_{n}}$. Therefore, $\overline{A} = \overline{I_{n}}$, so that each entry of $A-I_{n}$ is divisible by $p$. Since we have infinitely many choices for the prime $p$, it follows that each entry of $A-I_{n}$ must in fact be zero, yielding $A=I_n$.
Remark 1. The hypothesis $\det(A)\neq 0$ is necessary. Otherwise, we can just take any diagonal matrix $A= \operatorname{diag}(1, 1, .. 1, 0, 0 .., 0)$ with any number of $1$s and $0$s. Certainly $A^k = A$ for every $k$ but $A\neq I_{n}$ if there is at least one zero on the diagonal.
Remark 2. It is tempting to modify the above argument for the case of $\mathbb{Q}$, but it doesn't seem to work immediately. Again using the fact that $\det(A)\neq 0$, there are only finitely many primes appearing in the numerator and denominator of $\det(A)$, so we can pick a prime $p$ which doesn't appear there. Reducing the original matrix $A$ mod $p$ still works fine. But the problem arises at the step when we use hypothesis to get a matrix $B$ such that $B^k = A$ (where $k$ clearly depends on p -- this is important). That matrix $B$ might have the prime $p$ show up in the denominator of some of its entries, so reduction mod $p$ doesn't make sense.
Reference. I learnt the proof above from "Mathematical Bridges" by Andreescu, Mortici and Tetiva. The problem appears as Exercise 18 in Chapter 6, and the solution is presented few pages later. So I am also adding the (contest-math) tag, since that is the theme of the aforementioned book.
The general result is as follows:
Let $A\in M_n(\mathbb{Q})$; then
For every integer $k$, there exists $B\in M_n(\mathbb{Q})$ such that $B^k=A$ IFF $A(A-I_n)^n=0$.
You can see several proofs
in english in https://artofproblemsolving.com/community/c7h42444 , grobber's post.
in french in "La revue de mathématiques spéciales" n° 117-2 , R535, where, with a colleague, we gave a solution using Mahler's measure.