Mathematical workbench

Square laboratory

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

Blue–blue

ABCDF

E14 265x−3 240y−2 376
Matrix 3 × 3 · valuesΣ = 42 795
A11 025
B15 129
C16 641
D19 881
E14 265
F8 649
G11 889
H13 401
J17 505

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

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

Family ABCDF

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

{A,B,C,D,F}{P:MP(E,x,y)=rP2}\{A,B,C,D,F\}\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+x+y=qF2.\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+x+y&=q_F^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:

U1=a22b2,V1=2ab,M1=a2+2b2,U12+2V12=M12U_1=a^2-2b^2,\quad V_1=2ab,\quad M_1=a^2+2b^2,\quad U_1^2+2V_1^2=M_1^2U2=c22d2,V2=2cd,M2=c2+2d2,U22+2V22=M22U_2=c^2-2d^2,\quad V_2=2cd,\quad M_2=c^2+2d^2,\quad U_2^2+2V_2^2=M_2^2

Define the declared cell values as the following explicit squares:

A=[M2(U1U2+V1M2)]2,B=[M2(U1M22U2V12M1V2)]2,C=[M2(M2U1+U2V1M1V2)]2,D=[M2(M1M22U1V2)]2,F=[M2(M1U2+2V1V2)]2.\begin{aligned}A&=[M_2(U_1U_2+V_1M_2)]^2,\\B&=[M_2(U_1M_2-2U_2V_1-2M_1V_2)]^2,\\C&=[M_2(M_2U_1+U_2V_1-M_1V_2)]^2,\\D&=[M_2(M_1M_2-2U_1V_2)]^2,\\F&=[M_2(M_1U_2+2V_1V_2)]^2.\end{aligned}

Substitution of these five minors into the two blue quadrics leaves only multiples of U₁²+2V₁²−M₁² and U₂²+2V₂²−M₂²; both are zero. Hence both compatible norm relations hold.

B+2AD2F=0B+2A-D-2F=0D+2AF2C=0D+2A-F-2C=0B+2A=D+2F,D+2A=F+2CB+2A=D+2F,\qquad D+2A=F+2C

Reduce the two blue quadrics to two copies of Uᵢ²+2Vᵢ²=Mᵢ². Eliminating the shared cell roots gives a compatibility matrix of rank four; the five displayed expressions are its maximal minors. The common factor M₂ clears the only denominator, and the two norm identities reduce both original residuals to zero.

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)=(D+F2,CD,FA)(E,x,y)=\left(\frac{D+F}{2},\,C-D,\,F-A\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

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

Color lemmas used in this proof

Blue x² + 2y² norm

B+2A=D+2FB+2A=D+2F

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, B, D, F; its conclusion is exactly the cell relation displayed above.

General statement and proof

Blue x² + 2y² norm

D+2A=F+2CD+2A=F+2C

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, D, F; 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.

Ui2+2Vi2=Mi2(i=1,2)U_i^2+2V_i^2=M_i^2\quad(i=1,2)Δ=M1(M126V12)0\Delta=M_1(M_1^2-6V_1^2)\ne0

Inverse construction

Recover two rational rotations of the norm X²+2Y² from the two blue equalities. The compatibility matrix has the nonzero minor Δ=M₁(M₁²−6V₁²). Vanishing at a nonzero rational norm triple would require M₁/V₁=√6; hence the rank is three and the vector of minors recovers the unique projective line of compatible roots.

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.blue_blue_abcdf_square_mask