Mathematical workbench

Square laboratory

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

Red–blue

ABCDH

E313x−24y288
Matrix 3 × 3 · valuesΣ = 939
A289
B625
C25
D49
E313
F577
G601
H1
J337

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

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

Family ABCDH

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

{A,B,C,D,H}{P:MP(E,x,y)=rP2}\{A,B,C,D,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,Exy=qD2,E+xy=qH2.\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_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^2P=c2+2d2,Q=2cd,M=c22d2,P22Q2=M2P=c^2+2d^2,\qquad Q=2cd,\qquad M=c^2-2d^2,\qquad P^2-2Q^2=M^2TP,Q(u,v)=(Pu+2Qv,Qu+Pv)\mathcal T_{P,Q}(u,v)=(Pu+2Qv,\,Qu+Pv)TP,Q(u,v)122TP,Q(u,v)22=M2(u22v2)\mathcal T_{P,Q}(u,v)_1^2-2\mathcal T_{P,Q}(u,v)_2^2=M^2(u^2-2v^2)

Define the declared cell values as the following explicit squares:

(A,B,C,D,H)=((Pr+Qt)2,(Pt+2Qr)2,(Ms)2,(Mt)2,(Mr)2)(A,B,C,D,H)=((Pr+Qt)^2,(Pt+2Qr)^2,(Ms)^2,(Mt)^2,(Mr)^2)

The red relation is the arithmetic-progression triple scaled by M². The blue relation is preservation of X²−2Y² by T on the pair (t,r).

D+H=M2(t2+r2)=2M2s2=2CD+H=M^2(t^2+r^2)=2M^2s^2=2CB2A=M2(t22r2)=D2HB+2H=D+2AB-2A=M^2(t^2-2r^2)=D-2H\quad\Longleftrightarrow\quad B+2H=D+2A

The red quadric gives r, s, t. The remaining blue quadric is an equality of values of X²−2Y². Its rational conic is parametrized by P=c²+2d², Q=2cd, M=c²−2d²; multiplication in Q(√2) then gives the linear transformation T(P,Q). Solving the two cell quadrics for the remaining roots gives exactly the displayed components of T, and the factor M attaches them to the 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)=(AH+C,HC,AH)(E,x,y)=(A-H+C,\,H-C,\,A-H)

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

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

Color lemmas used in this proof

Light-red arithmetic progression

D+H=2CD+H=2C

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

General statement and proof

Blue x² + 2y² norm

B+2H=D+2AB+2H=D+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, B, D, 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 conic completely. Two representations of the same form X²−2Y² differ by a rational element of square norm in Q(√2), and the conic P²−2Q²=M² parametrizes every such element. Zero norm creates no separate rational branch because 2 is not a rational square.

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