Mathematical workbench

Square laboratory

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

Red–yellow

ABCEH

E625x−504y96
Matrix 3 × 3 · valuesΣ = 1 875
A121
B1 225
C529
D1 033
E625
F217
G721
H25
J1 129

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

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

Family ABCEH

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 ABCEH mask are squares of integers. Other cells are allowed to be squares as well.

{A,B,C,E,H}{P:MP(E,x,y)=rP2}\{A,B,C,E,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=qE2,E+xy=qH2.\left\{\begin{aligned}E+x&=q_A^2,\\E-x+y&=q_B^2,\\E-y&=q_C^2,\\E&=q_E^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:

r=a2+2ab+b2,s=a2+b2,t=a2+2abb2,r2+t2=2s2r=-a^2+2ab+b^2,\qquad s=a^2+b^2,\qquad t=a^2+2ab-b^2,\qquad r^2+t^2=2s^2N=c2+d2,P=d2c2,Q=2cd,P2+Q2=N2N=c^2+d^2,\qquad P=d^2-c^2,\qquad Q=2cd,\qquad P^2+Q^2=N^2

Define the declared cell values as the following explicit squares:

(A,B,C,E,H)=((PsQt)2,(Nr)2,(Qs+Pt)2,(Ns)2,(Nt)2)(A,B,C,E,H)=((Ps-Qt)^2,(Nr)^2,(Qs+Pt)^2,(Ns)^2,(Nt)^2)

The Gaussian rotation of (s,t) preserves its sum of squares up to the factor N². The red relation for B,E,H is the original arithmetic-progression triple multiplied by N².

A+C=(P2+Q2)(s2+t2)=N2(s2+t2)=E+HA+C=(P^2+Q^2)(s^2+t^2)=N^2(s^2+t^2)=E+HB+H=N2(r2+t2)=2N2s2=2EB+H=N^2(r^2+t^2)=2N^2s^2=2E

First parametrize the red quadric by r, s, t. The yellow quadric then asks for preservation of the sum of squares of one pair. Up to scale, every rational point of the corresponding circle comes from P=d²−c², Q=2cd, N=c²+d², including the second projection point. Multiplying the pair by ((P,−Q),(Q,P)) gives the displayed roots, while P²+Q²=N² enforces compatibility with the chosen red triple.

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)=(E,AE,EC)(E,x,y)=(E,\,A-E,\,E-C)

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

πABCEH ⁣(M(E,x,y))=(A,B,C,E,H){n2:nZ}5\pi_{ABCEH}\!\left(\mathcal M(E,x,y)\right)=(A,B,C,E,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 ABCEH. This proves the claim.

Color lemmas used in this proof

Light-red arithmetic progression

B+H=2EB+H=2E

A red triple means the linear condition U + W = 2V on three cells whose values are all perfect squares.

r=a2+2ab+b2,s=a2+b2,t=a2+2abb2r=-a^2+2ab+b^2,\qquad s=a^2+b^2,\qquad t=a^2+2ab-b^2r2+t2=2s2r^2+t^2=2s^2(U,V,W)=(k2r2,k2s2,k2t2)U+W=2V(U,V,W)=(k^2r^2,\,k^2s^2,\,k^2t^2)\Longrightarrow U+W=2V

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

General statement and proof

Yellow equality of two sums of squares

A+C=E+HA+C=E+H

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 A, C, E, 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.

(qP)PSVS(Q)(q_P)_{P\in S}\in V_S(\mathbb Q)

Inverse construction

Invert the red arithmetic-progression triple by its complete parametrization. The remaining pair has the same nonzero sum of squares, so a rational Gaussian rotation relates its two rational representations. The triple P²+Q²=N² parametrizes every such rotation. If that norm is zero, the two quadrics force the zero vector.

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.

The text reconstructs a legacy parametrization; its machine certificate has not yet been migrated to proof-core.legacy_red_yellow_abceh