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](https://math.stackexchange.com/questions/625140/a-fermats-flt-look-like-for-matrices) 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?



Fermat's Last Theorem for integer matrices
This problem is addressed in "[On Fermat's problem in matrix rings and groups](https://www.researchgate.net/profile/Attila_Szakacs/publication/266533344_On_Fermat%27s_problem_in_matrix_rings_and_groups/links/554b437b0cf29f836c968201.pdf)," 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.$$


