Mathematical workbench

Square laboratory

Control an arbitrary square through E, x, and y, or obtain these coordinates from a parametric family.

Yellow–blue

ABCGH

E1 700x416y1 216
Matrix 3 × 3 · valuesΣ = 5 100
A2 116
B2 500
C484
D68
E1 700
F3 332
G2 916
H900
J1 284

a brick-red frame marks a value that is a perfect square

Magic invariantall 8 line sums agree
Declared maskABCGH · confirmed
Actual result5/9 squares
Nondegeneracy9 pairwise-distinct entries

Family ABCGH

Theorem and complete proof

General theory of the 4/9 and 5/9 orbits

Statement

Under the assumptions below, the formulas define an integral magic square of order 3 in which at least all 5 cells of the ABCGH mask are squares of integers. Other cells are allowed to be squares as well.

{A,B,C,G,H}{P:MP(E,x,y)=rP2}\{A,B,C,G,H\}\subseteq\{P:\mathcal M_P(E,x,y)=r_P^2\}

The parameters a, b, c, and d are arbitrary integers. Every auxiliary root introduced below is therefore integral.

Initial system and elimination of E, x, y

For every marked cell, introduce an integral root and substitute the corresponding Magic3 linear form. This gives the system:

{E+x=qA2,Ex+y=qB2,Ey=qC2,E+y=qG2,E+xy=qH2.\left\{\begin{aligned}E+x&=q_A^2,\\E-x+y&=q_B^2,\\E-y&=q_C^2,\\E+y&=q_G^2,\\E+x-y&=q_H^2.\end{aligned}\right.

The coefficient matrix of E, x, and y has rank 3. Eliminating them therefore leaves 2 independent homogeneous quadratic equations in the roots. The equations are derived and parametrized below.

Derivation of the root parametrization

Introduce the following auxiliary integers:

P=a2b2,Q=2ab,N=a2+b2,P2+Q2=N2P=a^2-b^2,\qquad Q=2ab,\qquad N=a^2+b^2,\qquad P^2+Q^2=N^2U=c22d2,V=2cd,M=c2+2d2,U2+2V2=M2U=c^2-2d^2,\qquad V=2cd,\qquad M=c^2+2d^2,\qquad U^2+2V^2=M^2

Define the declared cell values as the following explicit squares:

A=(QMNVPU)2,B=(QM+2NVPU)2,C=(2PVNU)2,G=(2QVNM)2,H=(PMQU)2.\begin{aligned}A&=(-QM-NV-PU)^2,&B&=(QM+2NV-PU)^2,\\C&=(2PV-NU)^2,&G&=(-2QV-NM)^2,\\H&=(-PM-QU)^2.\end{aligned}

Substitute the displayed polynomial roots into both quadrics. Mixed terms cancel in pairs; the remaining terms vanish by P²+Q²=N² and U²+2V²=M². The root formulas contain no division.

B+HCG=0B+H-C-G=0G+2HC2A=0G+2H-C-2A=0B+H=C+G,G+2H=C+2AB+H=C+G,\qquad G+2H=C+2A

Parametrize the two norms separately: P²+Q²=N² and U²+2V²=M². After substitution, the two cell quadrics become a homogeneous linear system in the bilinear products PU, PV, QU, QV, NM, and the other displayed products. The five roots are compatible maximal minors of that system; direct expansion below shows that this chart has no hidden divisions or conditions.

Reconstruction of the magic square

Use the standard three-coordinate form:

M(E,x,y)=(E+xEx+yEyExyEE+x+yE+yE+xyEx)\mathcal M(E,x,y)=\begin{pmatrix} E+x & E-x+y & E-y\\ E-x-y & E & E+x+y\\ E+y & E+x-y & E-x \end{pmatrix}

Set the coordinates equal to the following linear combination of the square values already constructed:

(E,x,y)=(C+G2,AC+G2,GC2)(E,x,y)=\left(\frac{C+G}{2},\,A-\frac{C+G}{2},\,\frac{G-C}{2}\right)

If a division by 2 is not integral, multiply every displayed root by 2. All cell values are then multiplied by 4, every homogeneous identity is preserved, and the numerators become even. This is exactly the normalization performed by the generator.

qP2qP,P=qP24Pq_P\mapsto2q_P,\qquad P=q_P^2\mapsto4P

The general linear lemma is applied directly: when the selected cell-form matrix has rank 3, its value vector lies in the image exactly when every vector in the left kernel annihilates it. The left kernel has dimension one for four cells and two for five cells. The colored identities above form precisely such a basis, while the displayed formulas for E, x, and y give the unique preimage.

LS(E,x,y)T=(qP2)PS,kerLST=R1,,R2L_S(E,x,y)^T=(q_P^2)_{P\in S},\qquad \ker L_S^T=\langle R_1,\ldots,R_{2}\rangle

Now substitute the coordinates into the nine Magic3 linear forms. Therefore

πABCGH ⁣(M(E,x,y))=(A,B,C,G,H){n2:nZ}5\pi_{ABCGH}\!\left(\mathcal M(E,x,y)\right)=(A,B,C,G,H)\in\{n^2:n\in\mathbb Z\}^{5}

By the Magic3 form itself, every row, every column, and both diagonals sum to 3E. We have therefore obtained the required family of magic squares with square-valued mask ABCGH. This proves the claim.

Color lemmas used in this proof

Yellow equality of two sums of squares

B+H=C+GB+H=C+G

A yellow four-cell support comes from composition of the Gaussian norm and gives an equality between two pairwise cell sums.

u=ac+bd,v=adbc,w=acbd,z=ad+bcu=ac+bd,\quad v=ad-bc,\quad w=ac-bd,\quad z=ad+bcu2+v2=w2+z2=(a2+b2)(c2+d2)u^2+v^2=w^2+z^2=(a^2+b^2)(c^2+d^2)(U,V,W,Z)=(u2,v2,w2,z2)U+V=W+Z(U,V,W,Z)=(u^2,v^2,w^2,z^2)\Longrightarrow U+V=W+Z

In this mask, the lemma variables are replaced by cells B, C, G, H; its conclusion is exactly the cell relation displayed above.

General statement and proof

Blue x² + 2y² norm

G+2H=C+2AG+2H=C+2A

A blue four-cell support encodes a weighted equality of squares obtained by composing the norm u² + 2v².

u=ac+2bd,v=adbc,w=ac2bd,z=ad+bcu=ac+2bd,\quad v=ad-bc,\quad w=ac-2bd,\quad z=ad+bcu2+2v2=w2+2z2=(a2+2b2)(c2+2d2)u^2+2v^2=w^2+2z^2=(a^2+2b^2)(c^2+2d^2)(U,V,W,Z)=(u2,v2,w2,z2)U+2V=W+2Z(U,V,W,Z)=(u^2,v^2,w^2,z^2)\Longrightarrow U+2V=W+2Z

In this mask, the lemma variables are replaced by cells A, C, G, H; its conclusion is exactly the cell relation displayed above.

General statement and proof

Coverage completeness

Status: complete coverage. Completeness here refers to rational root vectors; integral representatives are obtained by clearing denominators and applying a common scale.

Broadest guaranteed subset

The entire set of rational root vectors satisfying the two quadrics for this mask, including the zero vector. Integral solutions are understood projectively: after clearing denominators, up to root signs and common scale.

P2+Q2=N2,Δ=N(3N24Q2)=N(3P2Q2)0P^2+Q^2=N^2,\qquad \Delta=N(3N^2-4Q^2)=N(3P^2-Q^2)\ne0U2+2V2=M2U^2+2V^2=M^2

Inverse construction

First recover the rational rotation P²+Q²=N² from the yellow pair. The shared roots then give a linear system for U,V,M. Its displayed minor \Delta=N(3N^2-4Q^2)=N(3P^2-Q^2) is nonzero at every nonzero rational point: for ABCDE the remaining factor is 3P²+Q², while in the other two masks Q²=3P² over Q forces P=Q=0. Thus the system is invertible, and U²+2V²=M² is then completely parametrized by the second parameter pair.

What remains outside the guarantee

There are no uncovered rational branches. A possible zero denominator in the inverse chart is removed by changing root signs or forces the entire root vector to be zero; the formula also produces the zero vector.

Exc(ΦS)=\operatorname{Exc}(\Phi_S)=\varnothing

Completeness is proved over the rational solutions of both quadrics.

This text agrees with a universal polynomial certificate in proof-core.yellow_blue_five_square_masks