Mathematical workbench

Square laboratory

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

Red 4/9

ABDJ

E488x88y384
Matrix 3 × 3 · valuesΣ = 1 464
A576
B784
C104
D16
E488
F960
G872
H192
J400

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

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

Family ABDJ

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

{A,B,D,J}{P:MP(E,x,y)=rP2}\{A,B,D,J\}\subseteq\{P:\mathcal M_P(E,x,y)=r_P^2\}

The parameters a, b, c, and d are integers. The theorem requires neither positivity nor distinctness: it asserts that at least the four declared cells are perfect squares.

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,Exy=qD2,Ex=qJ2.\left\{\begin{aligned}E+x&=q_A^2,\\E-x+y&=q_B^2,\\E-x-y&=q_D^2,\\E-x&=q_J^2.\end{aligned}\right.

The coefficient matrix of E, x, and y has rank 3. Eliminating them therefore leaves 1 independent homogeneous quadratic equation 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+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^2qB=4dr,qJ=4ds,qD=4dt,qA=4cdq_B=4dr,\quad q_J=4ds,\quad q_D=4dt,\quad q_A=4cd

Define the declared cell values as the following explicit squares:

(A,B,D,J)=(qA2,qB2,qD2,qJ2)(A,B,D,J)=(q_A^2,q_B^2,q_D^2,q_J^2)

Expanding the first line gives the complete rational parametrization of the conic of three squares in arithmetic progression. The fourth root does not occur in the unique relation and therefore remains free.

qB2+qD2=2qJ2q_B^2+q_D^2=2q_J^2

Conversely, join a rational point of the red conic to (1,1,1). The line slope gives the ratio a:b, its common factor is absorbed by d, and the free fourth root by c. Clearing denominators gives exactly the displayed r, s, and t. Hence the parametrization is complete up to root signs and common scaling.

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)=(2A+B+D4,,2ABD4,,BD2)(E,x,y)=\left(\frac{2A+B+D}{4},,\frac{2A-B-D}{4},,\frac{B-D}{2}\right)

The factor δ=4 is the absolute value of a nonzero minor of the selected cell-form matrix. Multiplying every root by δ multiplies every cell value by δ², so Cramer's formulas for E, x, and y become integral.

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,,R1L_S(E,x,y)^T=(q_P^2)_{P\in S},\qquad \ker L_S^T=\langle R_1,\ldots,R_{1}\rangle

Now substitute the coordinates into the nine Magic3 linear forms. Therefore

πABDJ ⁣(M(E,x,y))=(A,B,D,J){n2:nZ}4\pi_{ABDJ}\!\left(\mathcal M(E,x,y)\right)=(A,B,D,J)\in\{n^2:n\in\mathbb Z\}^{4}

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 ABDJ. This proves the claim.

Color lemmas used in this proof

Light-red arithmetic progression

B+D=2JB+D=2J

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, D, J; 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

Every rational solution of the single quadric for this mask, including the zero solution. After clearing denominators, this means every integral projective class up to root signs, common scale, common gcd, and D₄ symmetries.

(qP)PSVS(Q),RS(q)=0(q_P)_{P\in S}\in V_S(\mathbb Q),\qquad R_S(q)=0

Inverse construction

The red conic has the rational point (1,1,1), so projection by lines gives all of its rational points; the fourth root is free.

What remains outside the guarantee

The union of the charts has no exceptional locus. An exceptional ruling of one affine chart is covered by one of the other three signed charts.

Exc(ΦS)=\operatorname{Exc}(\Phi_S)=\varnothing

The parametrization is complete over rational points and algorithmically complete after denominators are cleared.

The formulas are checked by an exact integral certificate in the browser generator; migration to proof-core is not complete yet.four_of_nine_abdj_orbit