41

Given an $n\times n$-matrix $A$ with integer entries, I would like to decide whether there is some $m\in\mathbb N$ such that $A^m$ is the identity matrix.

I can solve this by regarding $A$ as a complex matrix and computing its Jordan normal form; equivalently, I can compute the eigenvalues and check whether they are roots of $1$ and whether their geometric and algebraic multiplicities coincide.

Are there other ways to solve this problem, perhaps exploiting the fact that $A$ has integer entries? Edit: I am interested in conditions which are easy to verify for families of matrices in a proof.

Edit: Thanks to everyone for this wealth of answers. It will take me some time to read all of them carefully.

Rasmus
  • 18,404
  • 2
    Dear Rasmus, I was wondering if you couldn't be more precise about your motivations and the kind of answer you expect. For instance, to which extent is it a numerical computation question? – Pierre-Yves Gaillard Aug 25 '11 at 10:24
  • If the answer to the above is "none at all": How do you check whether the eigenvalues are roots of 1? –  Aug 25 '11 at 10:34
  • Dear @Pierre-Yves Gaillard, I'm having a bit of a hard time responding to your question at the moment. As for the motivation, this problem has come up in my research, which is concerned with homological invariants of C*-algebras. I'm afraid that elaborating on the context would not help clarifying the problem as such. I am not interested in computational aspects. An ideal answer would rather read like this: "This is the case iff the following easily testable condition is fulfilled: ...". Such an answer might not exist. – Rasmus Aug 25 '11 at 11:44
  • 4
    @Rasmus: what does "easily testable" mean if you aren't interested in computational aspects? – Qiaochu Yuan Aug 25 '11 at 16:50
  • 1
    @Qiaochu: I may have underestimated the broadness of the notion of computational aspects. To give an analogy: A matrix over a field is invertible iff its determinant is non-zero. I would consider this condition easily testable. I admit that I need to compute the determinant for this, though. But I am not interested in how to program a computer to do this for me. – Rasmus Aug 25 '11 at 20:19
  • @Rasmus: it sounds to me like you want something like "easy to verify for families of matrices in a proof." Is that accurate? – Qiaochu Yuan Aug 25 '11 at 22:20
  • @Qiaochu: Yes, that sounds very accurate. Thank you for your help! – Rasmus Aug 26 '11 at 07:21
  • Dear Rasmus, if $f$ is the minimal polynomial of $A$, then the closest analogy to "a matrix over a field is invertible iff its determinant is non-zero" I can think of is (1) "the roots of $f$ are simple and are roots of $1$", or (2) "$f$ is a product of distinct cyclotomic polynomials". For a matrix with rational coefficients, (1) and (2) are trivially equivalent. (1) was your idea from the beginning, (2) is the formulation I used. You ask (3) "are there other ways to solve this problem, perhaps exploiting the fact that $A$ has integer entries?" I'd be tempted to answer as follows... – Pierre-Yves Gaillard Aug 26 '11 at 14:32
  • 1
    ... Linear algebra over a ring which is not a field seems much harder than over a field. Can we exploit the fact that $A$ has rational entries? Not really, because two matrices with rational entries are conjugate over $\mathbb Q$ if they are conjugate over $\mathbb C$. (See this question.) So, I'd say the short answer to (3) is: "no". – Pierre-Yves Gaillard Aug 26 '11 at 14:32
  • Dear Rasmus: More simply: The condition that $A$ be of finite order is in fact a condition on its minimal polynomial, and the minimal polynomial is the same over $\mathbb Q$ or over any extension of $\mathbb Q$. So (IMHO) the most natural way to express this condition is to do it (in one fashion or another) in terms of the minimal polynomial. – Pierre-Yves Gaillard Aug 27 '11 at 06:11

7 Answers7

15

The following conditions on an $n$ by $n$ integer matrix $A$ are equivalent:

(1) $A$ is invertible and of finite order.

(2) The minimal polynomial of $A$ is a product of distinct cyclotomic polynomials.

(3) The elementary divisors of $A$ are cyclotomic polynomials.

  • 2
    I forgot to mention explicitly that the elementary divisors are computed in $\mathbb Q[X]$. I think it's clear enough from the context. [I've already made so many edits that I don't want to make one more just for that. - The elementary divisors are always powers of irreducible elements of the underlying PID. So, the statement in the answer is correct over any field on which it makes sense - the most natural such field being of course $\mathbb Q$.] – Pierre-Yves Gaillard Aug 26 '11 at 01:50
  • I was reading this wikipedia article to find out what an elementary divisor of a rational matrix is. The article seems to say that it is a rational number rather than a polynomial. What am I missing? – Rasmus Aug 29 '11 at 21:05
  • 1
    @Rasmus: Let $K$ be a field, $V$ a finite dimensional $K$-vector space and $\phi$ an endomorphism of $V$. We can form the PID $K[X]$ (where $X$ is an indeterminate) and endow $V$ with the $K[X]$-module structure given by $fv:=f(\phi)v$ (with $f\in K[X]$, $v\in V$). [We could also view $V$ as a module over the PID $K$, but this wouldn't take $\phi$ into account.] If $V=K^n$, then $\phi$ can be viewed as a matrix (like your matrix $A$); in this case, the matrix $A$ of the Wikipedia entry is the "characteristic matrix" $X-\phi$... – Pierre-Yves Gaillard Aug 29 '11 at 21:57
  • ... My favorite reference for this is Bourbaki, Algèbre, Chap. 7, but there are others, like Jacobson's Basic Algebra, vol. 1, Birkhoff-Mac Lane, A Survey of Modern Algebra, probably Lang's Algebra. (I wrote this answer and this one.) – Pierre-Yves Gaillard Aug 29 '11 at 22:00
  • Thank you very much for this explanation and also for your interesting comments under the question! – Rasmus Aug 29 '11 at 23:10
10

Answer amended in view of Rasmus's comment:

I'm not sure how useful it is, but here's a remark. If $A$ has finite order, clearly $\{\|A^{m}\|: m \in \mathbb{N} \}$ is bounded (any matrix norm you care to choose will do).

On the other hand, if the semisimple part (in its Jordan decomposition as a complex matrix) of $A$ does not have finite order, at least one of its eigenvalues has absolute value greater than $1$, so $\{ \|A^{m}\| :m \in \mathbb{N} \}$ is unbounded.

(I am using the fact that all eigenvalues of $A$ are algebraic integers, and they are closed under algebraic conjugation: it is a very old theorem (and fun to prove) that if all algebraic conjugates of an algebraic integer $\alpha$ are of absolute value $1$, then $\alpha$ is a root of unity).

On the other hand, if the semi-simple part of $A$ has finite order, but $A$ itself does not, then (a conjugate of) some power of $A,$ say $A^h$, (as a complex matrix) has a Jordan block of size greater than $1$ associated to the eigenvalue $1$. Then the entries of the powers of $A^h$ become arbitrarily large, and $\{ \| A^{m} \|: m \in \mathbb{N} \}$ is still unbounded.

  • Could you please define when a matrix has finite order? – Rasmus Aug 25 '11 at 11:49
  • To say that a matrix $A$ has finite order means just that $A^{m} = I$ for some positive integer $m.$ Hence my answer says that either some power of $A$ is the identity matrix, or else (some of ) the matrix entries in the powers of $A$ will get arbitrarily large in absolute value as the power increases. – Geoff Robinson Aug 25 '11 at 12:02
  • 2
    The matrix $\begin{pmatrix}1&1\0&1\end{pmatrix}$ has the only eigenvalue $1$ but is not of finite order. Am I missing something? – Rasmus Aug 25 '11 at 20:28
  • Dear Geoff, thanks for clarifying. – Rasmus Aug 25 '11 at 21:47
7

If $A$ is an $n\times n$ integer matrix, and $A^m=1$, then $\phi(m)\le n$, where $\phi$ is Euler's phi-function (because $\phi(m)$ is the degree of the minimal polynomial for the $m$th roots of unity, and $n$ is the degree of the characteristic polynomial of $A$). Given $n$, there are only finitely many $m$ with $\phi(m)\le n$, and a little elementary number theory lets you find the biggest such $m$. So all you have to do is calculate $A^j$ for all $j$ up to that biggest $m$; if you don't get the identity matrix by then, you never will.

This may take less calculation than finding the eigenvalues, Jordan form, etc.

EDIT: Jyrki notes in the comments that it's not so easy. It still may be salvageable.

FURTHER EDIT: A very nice paper which considers, among other things, the question of the maximal order of an $n\times n$ matrix with integer entries is James Kuzmanovich and Andrey Pavlichenkov, Finite groups of matrices whose entries are integers, The American Mathematical Monthly Vol. 109, No. 2, Feb., 2002, pages 173-186. With regard to Geoff Robinson's comment, "It is larger than Landau's function, but not by much," the authors find that the ratio between the two functions is less than 51 for $n\lt100,000$ (the maximum in that range being 50.978, first achieved at $n=22434$), and they admit to not knowing whether the ratio is unbounded.

Gerry Myerson
  • 179,216
  • 1
    A nice idea, but are you sure it works exactly like this? Say, we find a 2x2 matrix of order 3, and a 4x4 matrix of order 5. Putting these together as diagonal blocks we get a 6x6 matrix of order 15. Yet $\phi(15)=8>6$. IOW there need not be any eigenvalues that are primitive roots of order $m$. – Jyrki Lahtonen Aug 25 '11 at 12:59
  • @Jyrki, oops. I knew I was forgetting something. Well, it's still true that, given $n$, $m$ is bounded, and I'm sure the bounds are well-studied and readily available. Perhaps someone will find a reference. – Gerry Myerson Aug 25 '11 at 13:17
  • 1
    @Jyrki: This is Landau's function, given at http://oeis.org/A000793 which grows like $\exp(\sqrt{n \log n})$ – Ross Millikan Aug 25 '11 at 13:26
  • @Gerry: Yes, your approach gives a bound on the prime power factors of $m$. If $p^\ell$ divides $m$ then one of the eigenvalues must be of order $p^\ell$, and consequently your argument goes thru, and we get the inequality $\phi(p^\ell)=p^{\ell-1}(p-1)\le n$. Probably a bit more can be said? – Jyrki Lahtonen Aug 25 '11 at 13:29
  • It seems to me one gets the best possible bound by noting that $A$ is a direct sum of companion matrices of cyclotomic polynomials. Is this correct? – Pierre-Yves Gaillard Aug 25 '11 at 13:47
  • 1
    @all above: I think the maximal order of a matrix of finite order in ${\rm GL}(n,\mathbb{Z})$ can be explicitly determined. It is larger than Landau's function, but not by much. First note that the maximum is achieved when the min poly is a product of cyclotomics from powers of different primes. – Geoff Robinson Aug 25 '11 at 15:03
  • @GeoffRobinson, related to "It is larger than Landau's function, but not by much", it depends what you mean by not much. It is correct that Kuzmanovich et al. in their paper did not know whether the ratio is unbounded, but it is. Furthermore, we have $\lim_{n\to \infty} f(n)/g(n) = 0$. It is difficult to prove though. – Nathan Portland Nov 12 '11 at 02:42
  • @Nathan, do you have a citation for your assertions? – Gerry Myerson Nov 12 '11 at 11:50
  • @GerryMyerson, I don't but I wrote a draft (non finished) several years ago, in response to that article from Kuzmanovich that I was planning to send to AMM. I should try to finish it one day and submit it. – Nathan Portland Nov 12 '11 at 14:42
4

There are these so-called Pascal matrices. These special matrices are suitable to work with for this problem and also a direct subclass of your solution set.

But notice that if there is a such matrix then there is a property that is related to @Pierre-Yves' answer and that is $A^{m-1}A=A^{m-2}A^2=\ldots = I$ hence the inverse of $A^p$ is $A^{m-p}$. So if there is such $A$ then $A^{-1}$ first it must be integer valued and further it must be some power of $A$ i.e. checking whether $A^{-1}=A^{m-1}$ should be sufficient. And this can be done with a relatively fast computation on any machine.

EDIT 1: As Geoff and Yuval commented below, the matrix inverse and its relatively low order powers already encode a lot of information that can be checked with ease.

EDIT 2: Bah, of course the obvious numerical solution is to check whether $A = A^{m+1}$ which involves only matrix multiplication with a few lines of code in any environment :)

  • 3
    The fact that $A$ and $A^{-1}$ should have the same characteristic polyomial should be fairly easily checkable and computable, even before starting to worry about powers. – Geoff Robinson Aug 25 '11 at 15:29
  • @Geoff: Oops, that was stupid of me, thanks :) –  Aug 25 '11 at 15:54
  • 1
    :no,not at all. – Geoff Robinson Aug 25 '11 at 16:09
  • You could use a "meet-in-the-middle" approach to drive the running time down by roughly a square root factor. Instead of trying all possible exponents in sequence, "guess" the order of magnitude of $m$, and look for $A^x = A^{-y}$ where $x,y$ are both taken from domains whose sizes are the square root of the original order of magnitude. Instead of "guessing", you can enumerate (this only affects the running time by a constant). – Yuval Filmus Aug 25 '11 at 17:15
  • @Yuval: Yep, I agree. It can be substantially improved but I tried storing the elements of $A^k-A$ with $A \in \mathbb{R}^{13 \times 13}$ and $k$ runs up to 2500. The measured time is little more than 6 seconds and since Rasmus is not interested in computational aspects, I thought that it is sufficient. And I didn't even use a recursive method, every time it computed the matrix power from scratch. –  Aug 25 '11 at 17:34
  • 1
    Regarding EDIT 2, how is the equation $A=A^{m+1}$ any better than $A^m=1$? – Rasmus Aug 25 '11 at 20:36
  • @Rasmus: It is not. That's the "bah" part, after inverses and other stuff, the question simply becomes "given $A\in M_n(\mathbb{Z})$, is $A=A^{m+1}$?" –  Aug 25 '11 at 20:49
4

we have the classification of such matrix in general case,

here is the paper:

Reginald Koo, A Classification of Matrices of Finite Order over $\mathbb{C, R}$ and $\mathbb{Q}$, Mathematics Magazine, Vol. $76$, No. $2$ (Apr., $2003$), pp. $143-148$.

Quixotic
  • 22,431
Jay
  • 41
2

Depending on your actual situation you might want to use crude necessary criteria to weed out candidates.

For example, the trace of the matrix is the sum of $n$ roots of unity and cannot have large absolute value.

The same criteria can be repeatedly checked while computing powers.

Phira
  • 20,860
0

If we were to know that $A$ is normal, then we could use spectral calculus to conclude from $A^m=1$ that the norm fulfills $||A||=1$. But since $A$ has only integer entries, we know that the rows $Ae_i$ must be unit vectors, otherwise the norm of the matrix would be equal or larger than $\sqrt{2}$. After all,

$$||Ae_i|| = ||\sum_j a_{ij} e_j|| = \sqrt{\sum_j a_{ij}^2} \geq \sqrt{2} \quad \text{ if more than one } a_{ij} \geq 1 .$$

This means that $A$ must be a permutation matrix.

I don't know what happens when the matrix is not normal, i.e. when it does not commute with its transpose.

  • 2
    Please check your argument. The matrix $$A=\left(\begin{array}{rr}0&1\-1&-1\end{array}\right)$$ satisfies the equation $A^3=1$ and its Jordan form has no off-diagonal entries. I think that your mistake is in that the matrix norm is only invariant up to unitary equivalence - not up to a more general similarity transformation. – Jyrki Lahtonen Aug 25 '11 at 17:22
  • @Jyrki Lahtonen: Oops, indeed, thanks. Having a diagonal Jordan form doesn't mean that the matrix is normal. – Greg Graviton Aug 26 '11 at 07:14