Algebraic Classification of All 880 Fourth-Order Magic Squares and the Discovery of Complete Alternating Magic Squares

Abstract

In this paper, we introduce a newly defined algebraic invariant for square matrices termed the Alternating Power Difference (APD). The APD is defined as the signed sum of the powers of diagonal sums along permutations of the symmetric group, distinguishing between even and odd permutations. It serves as a measure of the broken even-odd symmetry inherent in a matrix through higher-order moments. We applied this invariant to all 880 essentially different normal 4×4 magic squares (excluding symmetries) and defined the First Appearance Degree m1 as the minimum power at which the APD first becomes non-zero. Through an exhaustive computational search, we found that these magic squares are categorized into three clearly separated classes: m1=3 (240 squares), m1=4 (624 squares), and m1=∞ (16 squares). In particular, the case m1=∞ identifies exceptionally rare magic squares for which the APD vanishes at all degrees. We refer to these as Complete Alternating Magic Squares and demonstrate that they possess a strong algebraic symmetry undetectable by conventional geometric classifications or link-line patterns. Furthermore, we reveal that the APD-based classification refines the classical link-line classification based on complementary sum pairs, showing that each geometric type is clearly distinguished by its first appearance degree. All results in this paper are based on exhaustive computations and are fully reproducible. Our findings suggest that the APD is an effective new invariant for detecting hidden algebraic structures in magic squares and related combinatorial matrices.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…