On Euler’s magic matrices of sizes 3 3 and 8 8
Peter Müller · 2025
Read On Euler’s magic matrices of sizes 3 3 and 8 8 by Peter Müller (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-16260.txt.
Introduction
Euler, the great Swiss mathematician, built a square of whole numbers with rare traits: each row's squares sum to the same total, the two diagonals match it, and no square repeats. He found such a square of size four. Peter Muller takes up the sizes three and eight in a solo 2025 paper.
For size eight, Muller builds fresh cases that meet all the rules. For size three, he proves no such square can exist at all. The rules bind rows to their own mirror image by a fixed scale, which is what makes small cases so stiff. The result closes one size and opens the next, in a puzzle that has sat since Euler's own work.
Catalog record
| CREATOR | Peter Müller |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 24 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-16260
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
On Euler’s magic matrices of sizes 3 3 and 8 8 Peter Müller Abstract . A proper Euler’s magic matrix is an integer n × n n\times n matrix M ∈ ℤ n × n M\in\mathbb{Z}^{n\times n} such that M ⋅ M t = γ ⋅ I M\cdot M^{t}=\gamma\cdot I for some nonzero constant γ \gamma , the sum of the squares of the entries along each of the two main diagonals equals γ \gamma , and the squares of all entries in M M are pairwise distinct. Euler constructed such matrices for n = 4 n=4 . In this work, we use multiplication matrices of the octonions to construct examples for n = 8 n=8 , and prove that no such matrix exists for n = 3 n=3 . 2020 Mathematics Subject Classification Primary 11C20; Secondary 15B36 1. Introduction A classical magic square is an n\times n matrix A with distinct nonnegative integer entries such that the sums of the entries in each row, each column, and both main diagonals are the same. If one requires in addition that the entries of A are square numbers, then A is called a magic square of squares , see [ 2 ] , [ 14 ] . It is an open problem whether a magic square of squares of size 3 exists, despite considerable effort on this question in [ 3 ] and [ 4 ] . Leonhard Euler looked at the question for n=4 . He noticed that orthogonal matrices, or slightly more general matrices M such that M\cdot M^{t}=\gamma\cdot I , could make the problem easier. For if A is the matrix whose entries are the squares of those of M , then the conditions on the row and column sums for A are automatically fulfilled. So one is faced with only two polynomial conditions for the two main diagonals, and the added requirement that the entries of A are pairwise distinct. Definition 1.1 . Let R be a commutative ring and n be a positive integer. A matrix M=(m_{i,j})_{1\leq i,j\leq n}\in R^{n\times n} is called an Euler’s magic matrix over R , if the following holds for some \gamma\in R\setminus\{0\} , where I_{n} denotes the n\times n identity matrix: (1) \displaystyle M\cdot M^{t} \displaystyle=\gamma\cdot I_{n}, (2) \displaystyle\sum_{i=1}^{n}m_{i,i}^{2} \displaystyle=\gamma, (3) \displaystyle\sum_{i=1}^{n}m_{i,n+1-i}^{2} \displaystyle=\gamma. If in addition the squares of the entries in M are pairwise distinct, then we call M a proper Euler’s magic matrix . Note that the sum in ( 3 ) is the sum of the squares of the elements on the anti-diagonal. As remarked above, if M is a proper Euler’s magic matrix, then A=(a_{i,j})_{1\leq i,j\leq n} with a_{i,j}=m_{i,j}^{2} is a magic square of squares. The case n=2 is easy to work out, the only Euler’s magic matrices have the form \begin{pmatrix}a&a\\ a&-a\end{pmatrix} , \begin{pmatrix}a&a\\ -a&a\end{pmatrix} , \begin{pmatrix}a&-a\\ a&a\end{pmatrix} , and \begin{pmatrix}-a&a\\ a&a\end{pmatrix} . In particular, there are no proper such cases. Euler studied the intriguing problem of whether a proper Euler’s magic matrix exists for n=4 , referring to it as a “problema curiosum”. In fact he managed to produce a multi-parametric family of such matrices. A particular case, due to Euler too, is M=\begin{pmatrix}68&-29&41&-37\\ -17&31&79&32\\ 59&28&-23&61\\ -11&-77&8&49\end{pmatrix}. A more systematic study for the case n=4 , based on the algebra of quaternions, was given by Hurwitz in [ 7 , Vorlesung 12] . See [ 2 ] , [ 13 ] and in particular [ 10 ] and [ 11 , Lecture 12] about the history of this problem and its connection to the Hamilton quaternions. In Section 2 we show this negative result concerning 3\times 3 matrices: Theorem 1.2 . There is no Euler’s magic matrix in \mathbb{Q}^{3\times 3} . It is perhaps surprising that n=3 is the only positive integer for which there is no Euler’s magic matrix in \mathbb{Q}^{n\times n} . In fact, in Section 4 we provide a simple construction of Euler’s magic matrices in \mathbb{Z}^{n\times n} for each n\neq 3 . However, these matrices are far from proper. In particular, we do not know whether a proper Euler’s magic matrix exists for n=5 . Section 4 contains some examples which come close. In Section 3 we examine the case n=8 . In [ 12 ] and [ 13 ] , Ísabel Pirsic suggested to use certain matrices coming from left and right multiplication of the octonions to find a construction analogous to Euler’s for n=4 . However, a massive search by her did not find an example. In this note, we demonstrate that a careful analysis of the polynomial system yields solutions without much searching. So Pirsic’s suggestion to use octonion multiplication matrices proved successful. In order to describe our results (and later the methods), we introduce the matrices L(a,b,\dots,h)=\left(\begin{array}[]{rrrrrrrr}a&-b&-c&-d&-e&-f&-g&-h\\ b&a&-d&c&-f&e&h&-g\\ c&d&a&-b&-g&-h&e&f\\ d&-c&b&a&-h&g&-f&e\\ e&f&g&h&a&-b&-c&-d\\ f&-e&h&-g&b&a&d&-c\\ g&-h&-e&f&c&-d&a&b\\ h&g&-f&-e&d&c&-b&a\end{array}\right) and R(p,q,\dots,w)=\left(\begin{array}[]{rrrrrrrr}p&-q&-r&-s&-t&-u&-v&-w\\ q&p&s&-r&u&-t&-w&v\\ r&-s&p&q&v&w&-t&-u\\ s&r&-q&p&w&-v&u&-t\\ t&-u&-v&-w&p&q&r&s\\ u&t&-w&v&-q&p&-s&r\\ v&w&t&-u&-r&s&p&-q\\ w&-v&u&t&-s&-r&q&p\end{array}\right). With respect to a suitable basis of the octonions \mathbb{O} over the real numbers, L(a,b,\dots,h) describes the left multiplication \mathbb{O}\to\mathbb{O},z\mapsto xz , where x has the coefficients a,b,\dots,h . Likewise, R(p,q,\dots,w) describes the right multiplication \mathbb{O}\to\mathbb{O},z\mapsto zx , where x has coefficients p,q,\dots,w . The reason that we use different letters for the entries of L(\cdot) and R(\cdot) is that the matrices we will study have the form M=L\cdot R=L(a,b,\dots,h)\cdot R(p,q,\dots,w) . The point is that for L and R (with arbitrary a,b,\dots,h,p,q,\dots,w ) we have L\cdot L^{t}=(a^{2}+b^{2}+\dots+h^{2})\cdot I_{8} and R\cdot R^{t}=(p^{2}+q^{2}+\dots+w^{2})\cdot I_{8} , and therefore M\cdot M^{t}=\gamma\cdot I_{8} with \gamma=(a^{2}+b^{2}+\dots+h^{2})(p^{2}+q^{2}+\dots+w^{2}) . Thus condition ( 1 ) in Definition 1.1 is automatically satisfied, and one has “only” to discuss the two polynomial conditions ( 2 ) and ( 3 ) in the 16 unknowns a,b,\dots,h,p,q,\dots,w and the properness. A typical example that we obtain is Theorem 1.3 . Set \displaystyle L \displaystyle=L(2,\;1,\;1,\;4,\;2,\;1,\;1,\;-2), \displaystyle R \displaystyle=R(-7,\;-55,\;-11,\;1,\;-27,\;-13,\;-19,\;4). Then M=L\cdot R=\left(\begin{array}[]{rrrrrrrr}142&197&-225&30&16&57&-13&-170\\ -37&-60&136&201&177&98&-32&-193\\ -283&-4&-148&-95&71&164&10&-1\\ -22&237&181&-178&138&-29&-45&-8\\ -120&97&27&74&-62&-129&293&-82\\ -9&38&-116&131&235&-144&0&187\\ -103&180&50&195&-163&64&-132&107\\ -126&-35&-51&-20&-42&-247&-191&-154\end{array}\right) is a proper Euler’s magic matrix. This single example arises from specializing the parameters of a 4 -parametric family of Euler’s magic matrices to values which preserve properness. In this case, the example was obtained from setting (q,r,t,u)=(-55,-11,-27,-148) and rescaling in the following theorem. Theorem 1.4 . For variables q,r,t,u over \mathbb{Q} set X=7q^{2}+7r^{2}+21qt-7rt+34t^{2}-7qu-21tu+4u^{2}+7q+21r-7u+34 and \displaystyle L \displaystyle=L(2,\;1,\;1,\;4,\;2,\;1,\;1,\;-2), \displaystyle R \displaystyle=R\left(\frac{3(t^{2}-1)u}{2X},\;q,\;r,\;1,\;t,\;u-q-3t-1,\;t-r-3,\;\frac{u^{2}-X}{2u}\right). Then M=L\cdot R is a proper Euler’s magic matrix over \mathbb{Q}(q,r,t,u) . Remark 1.5 . The reader who wishes to verify the examples need not type these matrices. A proof is provided in the ancillary SageMath script euler_verify.sage at [ 9 ] . This script can be run at the SageMathCell at https://sagecell.sagemath.org/ . 2. There are no Euler’s magic 3\times 3 matrices If we look for Euler’s magic n\times n matrices for odd n over a field, then we may assume that these matrices are orthogonal: Lemma 2.1 . Let K be a field, n be odd, and M\in K^{n\times n} with M\cdot M^{t}=\gamma\cdot I_{n} for 0\neq\gamma\in K . Then \gamma=\lambda^{2} for \lambda\in K , therefore \frac{1}{\lambda}\cdot M is orthogonal. Proof. Write n=2k+1 . Taking the determinant in M\cdot M^{t}=\gamma\cdot I_{n} yields (\det M)^{2}=\gamma^{n}=\gamma^{2k+1} , so \gamma=\lambda^{2} for \lambda=\det M/\gamma^{k} . ∎ We use the following refinement of the Cayley transform which parametrizes orthogonal real matrices: Proposition 2.2 . Let M\in\mathbb{R}^{n\times n} be a an orthogonal