We introduce Magic Gems, a geometric representation of magic squares as three-dimensional polyhedra. By mapping an n times n magic square onto a centered coordinate grid with cell values as vertical displacements, we construct a point cloud whose convex hull defines the Magic Gem. Building on prior work connecting magic squares to physical properties such as moment of inertia, this construction reveals an explicit statistical structure: we show that magic squares have vanishing covariances between position and value. We develop a covariance energy functional (the sum of squared covariances with individual row, column, and diagonal indicator variables) and prove that for all orders of n greater than or equal to three, an arrangement is a magic square if and only if this complete energy vanishes. This characterization transforms the classical line-sum definition into a statistical orthogonality condition. We also study a simpler low-mode relaxation using only four aggregate position indicators; this coincides with the complete characterization for n equals three (verified exhaustively) but defines a strictly larger class for n greater than or equal to four (explicit counterexamples computed). Perturbation analysis demonstrates that magic squares are isolated local minima in the energy landscape. The representation is invariant under dihedral symmetry D4, yielding canonical geometric objects for equivalence classes.
翻译:本文引入魔幻宝石,将幻方表示为三维多面体的几何框架。通过将n×n幻方映射到以单元格数值为垂直位移的中心坐标网格上,我们构建了一个点云,其凸包定义了魔幻宝石。基于先前将幻方与转动惯量等物理属性相联系的研究,该构造揭示了一个明确的统计结构:我们证明幻方在位置与数值之间具有零协方差。我们建立了一个协方差能量泛函(即与各行、各列及各对角线指示变量协方差平方之和),并证明对于所有n≥3的阶数,一种排列是幻方当且仅当该完全能量泛函为零。这一特征将经典的行列和定义转化为统计正交性条件。我们还研究了一种仅使用四个聚合位置指示变量的简化低模态松弛;该松弛在n=3时与完全特征化等价(已通过穷举验证),但在n≥4时定义了严格更大的类别(已计算显式反例)。扰动分析表明幻方是能量景观中孤立的局部极小值。该表示在二面体对称群D4下保持不变,从而为等价类生成规范几何对象。