Positive integer matrices satisfying $A^3 + B^3 = C^3$

linear algebramatricesmatrix equations

From the 3rd edition of the book "The Linear Algebra a Beginning Graduate Student Ought to Know" by Jonathan S. Golan, we find the following exercise (number 475) under chapter 9:

"Find infinitely-many triples $(A, B, C$) of nonzero matrices in $M_{3×3}(\mathbb{Q})$, the entries of which are nonnegative integers, satisfying the condition $A^3 + B^3 = C^3.$"

Now we if understand "non-negative integers" to include $0$, then easily we can take $A$, $B$ and $C$ to be diagonal matrices such that:

$$ A =
\begin{pmatrix}
a & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
\end{pmatrix}
, B =
\begin{pmatrix}
0 & 0 & 0 \\
0 & b & 0 \\
0 & 0 & 0 \\
\end{pmatrix},
C = \begin{pmatrix}
a & 0 & 0 \\
0 & b & 0 \\
0 & 0 & 0 \\
\end{pmatrix}$$

However, if we interpret the term "non-negative" to mean "strictly positive" (s.t. a positive matrix is defined in the sense given in the entry: https://en.wikipedia.org/wiki/Nonnegative_matrix), the question becomes harder… I suspect that the equation never holds, not only in the case of $n=3$, but for all positive integers $n$. I.e. we cannot find positive matrices $A,B,C$ in $M_{n×n}(\mathbb{Q})$ such that $A^k + B^k = C^k.$ where $k>2$ is an integer." I conjecture this because a few constructions I tried for finding solutions all failed, and I imagine a way to prove that it is impossible would be by contradiction… i.e. show that any valid triplet would imply a rational/integer solution to the integer equation $a^k + b^k = c^k$ (where $a,b,c \in \mathbb{Q}$) which can't exist by Fermat's last theorem. However, I haven't found a promising trick yet and I wonder if the conjecture, if true, can be proven so easily, be it via contradiction or via other means…

Best Answer

Take $$ A = B = \begin{pmatrix} 1 & 1 & 1 \\ 2 & 1 & 1 \\ 2 & 2 & 1 \\ \end{pmatrix} $$ $$C = \begin{pmatrix} 2 & 1 & 1 \\ 2 & 2 & 1 \\ 2 & 2 & 2 \\ \end{pmatrix} $$ It can then be checked that $$ A^3 + B^3 = C^3 = \begin{pmatrix} 38 & 30 & 24 \\ 48 & 38 & 30 \\ 60 & 48 & 38 \\ \end{pmatrix} $$ To construct an infinite family, note that you can just take any positive number $n\in \mathbb{N}$, and multiplying $A, B, C$ by $n$ you obtain positive matrices which still satisfy the equation.

P.S. I found this example using a simple brute force algorithm in python.

import numpy as np
from itertools import product
cubes = []
argcubes = []
for x in product(range(1,3), repeat=9):
    A = np.array(x).reshape(3,3)
    argcubes.append(A)
    cubes.append(A@A@A)
cubes = np.stack(cubes)
def contains(X):
    return np.any(np.all(X == cubes, axis=(1,2)))
def index(X):
    return np.all(X == cubes, axis=(1,2)).argmax()
found = False
for i, A in enumerate(cubes):
    if found:
        break
    for j, B in enumerate(cubes):
        if found:
            break
        C = A + B
        if contains(C):
            print(i, j, index(C))
            print(argcubes[i])
            print(argcubes[j])
            print(argcubes[index(C)])
            found = True
Related Question