Tensor constructions for Euler magic matrices and proper examples of orders 9, 27, 81 and 243
Sanjit Singh Mehat
math.GM
Sep 1, 2026 · v1
TL;DR
Existence of proper Euler magic matrices of orders 9, 27, 81, 243 and the order-9 and order-27 construction instances are kernel-verified in Lean 4 with Mathlib.
Abstract
An Euler magic matrix is an integer matrix $M$ satisfying $MM^{\mathsf{T}}=γI$ together with two diagonal square-sum conditions; it is proper when its entry squares are pairwise distinct. M{ü}ller proved that Euler magic matrices exist in every order other than $3$, and that no Euler magic matrix of order $3$ exists at all, while proper examples are considerably more restrictive. We describe a tensor construction whose factors are only required to satisfy the orthogonality equation $AA^{\mathsf{T}}=γI$: for a linear reindexing $L$ of the row index group $\mathbb{F}_3^k$ obeying an explicit support condition, the reindexed Kronecker product of $k$ such $3\times3$ factors satisfies the full Euler magic conditions in order $3^k$. Choosing factors whose entry squares have pairwise distinct products, we obtain proper Euler magic matrices of orders $9$, $27$, $81$ and $243$. The construction therefore produces proper examples in powers of three even though order three admits no Euler magic matrix, and the passage from the factors to the product is exactly where the Euler conditions are created rather than inherited. We give an explicit support condition on $L$ and show that it characterises the linear reindexings forcing the two Euler diagonal identities for every tuple of semi-magic factor arrays; over $\mathbb{F}_p$ with two factors, such a reindexing exists only when $p\le3$. The four existence results are formalised in Lean 4, as are the two instances of the construction used to obtain them; the order-$243$ certificate is taken from the archived development and was not rebuilt in preparing this paper, although its witness was reproduced here by exact integer arithmetic. Further proper examples of orders $729$ and $2187$ are verified by exact integer computation only.
Problem
Euler magic matrices are integer matrices with MM^T = γI whose two diagonals also have square-sum γ; a proper one has pairwise distinct entry squares. No Euler magic matrix of order 3 exists, and proper examples in odd orders above 5 were open.
Approach
A reindexed Kronecker product of 3×3 orthogonality factors is built using a linear reindexing L of F_3^k that satisfies an explicit support condition. This construction creates the diagonal conditions even though the individual factors violate them. Properness reduces to the factors' entry-square products being pairwise distinct, and suitable factors are found by search. The existence results and the specific constructions at L_9 and L_27 are formalised in Lean 4.
Results
Proper Euler magic matrices of orders 9, 27, 81 and 243 are obtained and machine-checked in Lean; the order-243 certificate is inherited from an archived development rather than rebuilt. The support condition characterises the valid reindexings, and examples of orders 729 and 2187 are verified by exact integer computation only.
| Order | k | Factor constants | γ |
|---|
| 9 | 2 | 3249, 9025 | 5415² |
| 27 | 3 | 5041, 9801, 11025 | 738045² |
| 81 | 4 | 11025, 17161, 21609, 29241 | 345759435² |
| 243 | 5 | 3249, 9025, 21609, 53361, 199809 | 82193088285² |
The four witnesses and their constants