Mathematical workbench

Square laboratory

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

Red–red

ABEHJ

E4 225x−3 000y1 056
Matrix 3 × 3 · valuesΣ = 12 675
A1 225
B8 281
C3 169
D6 169
E4 225
F2 281
G5 281
H169
J7 225

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

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

Family ABEHJ

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

{A,B,E,H,J}{P:MP(E,x,y)=rP2}\{A,B,E,H,J\}\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,E=qE2,E+xy=qH2,Ex=qJ2.\left\{\begin{aligned}E+x&=q_A^2,\\E-x+y&=q_B^2,\\E&=q_E^2,\\E+x-y&=q_H^2,\\E-x&=q_J^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:

k1=a2+b2,k2=c2+d2k_1=a^2+b^2,\qquad k_2=c^2+d^2r=k2(a2+2ab+b2),r0=k2(a2+b2),r+=k2(a2+2abb2)r_-=k_2(-a^2+2ab+b^2),\quad r_0=k_2(a^2+b^2),\quad r_+=k_2(a^2+2ab-b^2)s=k1(c2+2cd+d2),s0=k1(c2+d2),s+=k1(c2+2cdd2)s_-=k_1(-c^2+2cd+d^2),\quad s_0=k_1(c^2+d^2),\quad s_+=k_1(c^2+2cd-d^2)r0=s0=k1k2r_0=s_0=k_1k_2

Define the declared cell values as the following explicit squares:

(A,B,E,H,J)=(r+2,s2,r02,s+2,r2)(A,B,E,H,J)=(r_+^2,s_-^2,r_0^2,s_+^2,r_-^2)

Expanding (−u²+2uv+v²)²+(u²+2uv−v²)²=2(u²+v²)², first for (a,b) and then for (c,d), gives the two required arithmetic progressions of squares with a common middle root.

r2+r+2=2r02,s2+s+2=2s02r_-^2+r_+^2=2r_0^2,\qquad s_-^2+s_+^2=2s_0^2A+J=2E,B+H=2EA+J=2E,\qquad B+H=2E

Start with two copies of the red conic r²+t²=2s². Each rational root triple comes from the standard two-parameter chart. To make the triples share one cell, multiply the first triple by the distinguished root of the second and the second by the distinguished root of the first; these cross-multipliers are k₁ and k₂. The common root then agrees identically, and permuting the other four roots gives the declared mask.

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

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

Color lemmas used in this proof

Light-red arithmetic progression

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

General statement and proof

Dark-red arithmetic progression

B+H=2EB+H=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 B, E, 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),qE0(q_P)_{P\in S}\in V_S(\mathbb Q),\qquad q_E\ne0qE=0(qP)PS=0q_E=0\Longrightarrow(q_P)_{P\in S}=0

Inverse construction

When q_E≠0, invert both red conics by their standard complete parametrization and use the cross-multipliers to align their scales at the shared root. When q_E=0, the corresponding red relation over Q forces the adjacent roots to vanish: a shared middle root uses a sum of two squares, while a shared endpoint uses the irrationality of √2. The second red relation then also gives 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_red_abehj