Mathematical workbench

Square laboratory

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

Yellow–brown

ABCDG

E19 009x−1 320y7 560
Matrix 3 × 3 · valuesΣ = 57 027
A17 689
B27 889
C11 449
D12 769
E19 009
F25 249
G26 569
H10 129
J20 329

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

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

Family ABCDG

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

{A,B,C,D,G}{P:MP(E,x,y)=rP2}\{A,B,C,D,G\}\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,Exy=qD2,E+y=qG2.\left\{\begin{aligned}E+x&=q_A^2,\\E-x+y&=q_B^2,\\E-y&=q_C^2,\\E-x-y&=q_D^2,\\E+y&=q_G^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,u=a2+2abb2,r2+u2=2s2r=-a^2+2ab+b^2,\quad s=a^2+b^2,\quad u=a^2+2ab-b^2,\quad r^2+u^2=2s^2K=2r2s2,P=Kc2d2,Q=2ucdK=2r^2-s^2,\qquad P=Kc^2-d^2,\qquad Q=2ucdα=u(Kc2+d2),β=PrQs,γ=Ps+Qr,δ=Pr+Qs,η=QrPs\alpha=u(Kc^2+d^2),\quad\beta=Pr-Qs,\quad\gamma=Ps+Qr,\quad\delta=Pr+Qs,\quad\eta=Qr-PsE=P2s2+Q2r2E=P^2s^2+Q^2r^2

Define the declared cell values as the following explicit squares:

(A,B,C,D,G)=(α2,β2,γ2,δ2,η2)(A,B,C,D,G)=(\alpha^2,\beta^2,\gamma^2,\delta^2,\eta^2)

The yellow relation comes from two Gaussian rotations. For the brown relation, the quadric residual is reduced step by step to α² as displayed below. The final formula also proves that the chosen E reconstructs C and G without division.

β2+γ2=δ2+η2=(P2+Q2)(r2+s2)\beta^2+\gamma^2=\delta^2+\eta^2=(P^2+Q^2)(r^2+s^2)γ2+3η22β2=2[P2(2s2r2)+Q2(2r2s2)]\gamma^2+3\eta^2-2\beta^2=2\left[P^2(2s^2-r^2)+Q^2(2r^2-s^2)\right]2s2r2=u2,2r2s2=K2s^2-r^2=u^2,\qquad 2r^2-s^2=Ku2P2+KQ2=u2(Kc2+d2)2=α2u^2P^2+KQ^2=u^2(Kc^2+d^2)^2=\alpha^22A+2B=C+3G,B+C=D+G2A+2B=C+3G,\qquad B+C=D+GC+G=γ2+η2=2(P2s2+Q2r2)=2EC+G=\gamma^2+\eta^2=2(P^2s^2+Q^2r^2)=2E

An auxiliary red conic introduces r, s, u. After substitution into the brown quadric, the coefficient of the second pair becomes K=2r²−s². The pair P=Kc²−d², Q=2ucd parametrizes the resulting weighted conic; two Gaussian rotations then give β, γ, δ, η. The displayed chain of equalities solves both quadrics and reconstructs E without division.

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,GE)(E,x,y)=(E,\,A-E,\,G-E)

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

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

Color lemmas used in this proof

Yellow equality of two sums of squares

B+C=D+GB+C=D+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, D, G; its conclusion is exactly the cell relation displayed above.

General statement and proof

Weighted brown conic

2A+2B=C+3G2A+2B=C+3G

The brown support ABCG satisfies a separate weighted relation; the ABCDG family combines it with a yellow norm relation.

2A+2B=C+3G2A+2B=C+3GA=a2,B=b2,C=c2,G=g2A=a^2,\quad B=b^2,\quad C=c^2,\quad G=g^22a2+2b2c23g2=02a^2+2b^2-c^2-3g^2=0

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

General statement and proof

Coverage completeness

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

Broadest guaranteed subset

Every rational solution for which, after choosing root signs, the rank-one yellow matrix admits the factorization below with 2s²−r²=u² a rational square, together with the zero solution. This is the exact full image of the proved two-stage chart, not merely an arbitrarily chosen nondegenerate portion.

(b+dc+gcgdb)=2(rPrQsPsQ)\begin{pmatrix}b+d&c+g\\c-g&d-b\end{pmatrix}=2\begin{pmatrix}rP&rQ\\sP&sQ\end{pmatrix}2s2r2=u2Q2,K=2r2s22s^2-r^2=u^2\in\mathbb Q^2,\qquad K=2r^2-s^2a2=u2P2+KQ2a^2=u^2P^2+KQ^2

Inverse construction

The yellow quadric is equivalent to vanishing of the displayed determinant, so every nonzero yellow point has a rational rank-one factorization. If the square class of 2s²−r² is trivial, choose rational u. The brown quadric then becomes the conic a²=u²P²+KQ², and P=Kμ²−ν², Q=2uμν, a=u(Kμ²+ν²) gives all of its rational points. For a nonzero point both u and K are automatically nonzero, or else a rational √2 would result.

What remains outside the guarantee

Outside the proved image are rational solutions for which every admissible choice of root signs leaves the square class of 2s²−r² nontrivial. This is an arithmetic rather than a rank exception. Neither the absence of such points nor their coverage by the current formula has been proved.

Exc(ΦABCDG){[2s2r2]1 in Q×/(Q×)2}\operatorname{Exc}(\Phi_{ABCDG})\subseteq\{[2s^2-r^2]\ne1\text{ in }\mathbb Q^\times/(\mathbb Q^\times)^2\}

Completeness is proved for the entire subset with the indicated trivial square class; global completeness of ABCDG remains a separate problem.

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