# Fermat's Last Theorem for integer matrices

Some years ago I was asked by a friend if Fermat's Last Theorem was true for matrices. It is pretty easy to convince oneself that it is not the case, and in fact the following statement occurs naturally as a conjecture:

For all integers $$n,k\geq 2$$ there exist three square matrices $$A$$, $$B$$ and $$C$$ of size $$k\times k$$ and integer entries, such that $$\det(ABC)\neq 0$$ and: $$A^n + B^n = C^n$$

Of course, the case $$k=1$$ is just Fermat's Last Theorem, but in that case the conclusion is the opposite for $$n>2$$.

I think that I read somewhere that it is known that the above assertion is true (I do not remember exactly where, and haven't seen anything on Google, but this old question on MSE, on which there is an old reference, that I think does not answer this).

Two observations that are pretty straightforward to verify are the following: the case $$2\times 2$$ and $$3\times 3$$ solve the general case $$k\times k$$ by putting suitable small matrices on the diagonal.

Also, as it is stated in a comment on that question, if the exponent $$n$$ is odd then the case $$2\times 2$$ can be solved by this example:

$$\begin{bmatrix} 1 & n^\frac{n-1}{2}\\ 0 & 1\end{bmatrix}^n + \begin{bmatrix} -1 & 0\\n^\frac{n-1}{2} & -1\end{bmatrix}^n = \begin{bmatrix} 0 & n\\1& 0\end{bmatrix}^n$$

Does anybody know of such examples in the $$2\times 2$$ case for even $$n$$, and the general $$3\times 3$$ case?

More clearly: are there easy and explicit examples for each $$n$$ and $$k$$ for the above conjecture?

• Of possible interest, Niven, Ivan. Fermat’s theorem for matrices. Duke Math. J. 15 (1948), no. 3, 823--826. doi:10.1215/S0012-7094-48-01574-9. projecteuclid.org/euclid.dmj/1077475036, Mathematical Reviews number (MathSciNet) MR0026672, Zentralblatt MATH identifier 0032.00102 – Gerry Myerson Feb 14 at 21:03
• There's also Schwarz, Štefan, Fermat's theorem for matrices revisited. (English). Mathematica Slovaca, vol. 35 (1985), issue 4, pp. 343-347 MSC: 11C20, 15A33, 20M10 | MR 820630 | Zbl 0584.15007 at dml.cz/handle/10338.dmlcz/136402 – Gerry Myerson Feb 14 at 21:06
• @GerryMyerson: It is about a different Fermat theorem. – Mark Sapir Feb 15 at 1:11
• E. Bolker, "Solutions of $A^k + B^k = C^k$ in $n \times n$ integral matrices”, American Mathematical Monthly, 75, 1968, 759-760. – Ethan Bolker Feb 15 at 19:44
• A JSTOR link to Ethan Bolker's article is here: jstor.org/stable/2315199 – Zach Teitler Feb 16 at 17:23

This problem is addressed in "On Fermat's problem in matrix rings and groups," by Z. Patay and A. Szakács, Publ. Math. Debrecen 61/3-4 (2002), 487–494, which summarizes previous work on the topic and gives some new results. It seems that the problem is not completely solved.

When $$k=2$$, Khazonov showed that there are solutions in $$SL_2(\mathbb Z)$$ if and only if $$n$$ is not a multiple of 3 or 4, but I couldn't immediately find any statement anywhere about the case $$4\mid n$$ and $$2\times 2$$ integer matrices with nonzero determinant.

Khazanov also proved that $$GL_3(\mathbb Z)$$ solutions do not exist if $$n$$ is a multiple of either 21 or 96, and $$SL_3(\mathbb Z)$$ solutions do not exist if $$n$$ is a multiple of 48.

Patay and Szakács give explicit solutions for $$SL_3(\mathbb Z)$$ when $$n=\pm 1\pmod 3$$ as well as for $$n=3$$. Here's a solution for $$n=3$$: $$\pmatrix{0& 0&1\\ 0 &-1& 1\\ 1 & 1 & 0}^3 + \pmatrix{0&1&0\\ 0&1&-1\\ -1&-1&0}^3 = \pmatrix{0&1&1\\0&0&1\\1&0&0}^3.$$

For $$k=2$$ with $$n \equiv 2 \mod 4$$:

$$\pmatrix{1 & (-1)^{(n-2)/4} 2^{n/2} n^{n-1} \cr 0 & 1}^n + \pmatrix{n & -n\cr n & n\cr}^n = \pmatrix{1 & 0\cr (-1)^{(n-2)/4} 2^{n/2} n^{n-1} & 1\cr}^n$$

An example for $$n=4$$ is $$\pmatrix{3 & -2\cr 1 & 2\cr}^4 + \pmatrix{2 & -4\cr 2 & 0\cr}^4 = \pmatrix{1 & 2\cr -1 & 2\cr}^4$$ but I don't have a generalization.