Mathematical workbench

Square laboratory

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

Red–yellow

ACDEG

E4 225x1 104y3 000
Matrix 3 × 3 · valuesΣ = 12 675
A5 329
B6 121
C1 225
D121
E4 225
F8 329
G7 225
H2 329
J3 121

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

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

Family ACDEG

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

{A,C,D,E,G}{P:MP(E,x,y)=rP2}\{A,C,D,E,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,Ey=qC2,Exy=qD2,E=qE2,E+y=qG2.\left\{\begin{aligned}E+x&=q_A^2,\\E-y&=q_C^2,\\E-x-y&=q_D^2,\\E&=q_E^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,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,C,D,E,G)=((PrQs)2,(Nr)2,(Qr+Ps)2,(Ns)2,(Nt)2)(A,C,D,E,G)=((Pr-Qs)^2,(Nr)^2,(Qr+Ps)^2,(Ns)^2,(Nt)^2)

The red relation follows from r²+t²=2s². For the yellow relation, expand the two sums of squares: the mixed terms cancel, and P²+Q² is replaced by N².

C+G=N2(r2+t2)=2N2s2=2EC+G=N^2(r^2+t^2)=2N^2s^2=2EA+D=(P2+Q2)(r2+s2)=N2(r2+s2)=C+EA+D=(P^2+Q^2)(r^2+s^2)=N^2(r^2+s^2)=C+E

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,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

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

Color lemmas used in this proof

Light-red arithmetic progression

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

General statement and proof

Yellow equality of two sums of squares

A+D=C+EA+D=C+E

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, D, E; 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_acdeg