A parametrization of 8x8 magic squares of squares through octonionic multiplication
AA parametrization of 8 × Ísabel Pirsic
In 1771 Euler posed what he called a ‘problema curiosum’ [3]: to find a 4 × M such that M M > = M > M = c ∗ I, c ∈ Z , where also the sums of the squares of the diagonal entries shouldadd up to c .He gave explicit solutions, e.g.,68 −
29 41 − −
17 31 79 3259 28 −
23 61 − −
77 8 49but also the following interesting parametrisation:+a p+b q+ +a r − b s − a s − b r +a q − b p+c r+d s − c p+d q +c q+d p +c s − d r − a q+b p+ +a s+b r +a r − b s +a p+b q+c s − d r +c q+d p +c p − d q − c r − d s+a r+b s − − a p+b q +a q+b p +a s − b r − c p − d q − c r+d s +c s+d r − c q+d p − a s+b r − − a q − b p − a p+b q +a r+b s − c q+d p +c s+d r +c r − d s +c p+d qwhere, to fulfill the diagonal conditions, two equations have to be satisfied,namely pr + qs = 0 , ac = − d ( pq + rs ) − b ( ps + qr ) b ( pq + rs ) + d ( ps + qr ) . It is not known exactly, how Euler arrived at the solution, though we cantake some guesses. For instance, the visualization presented in Figure 1 hintsat a strong connection to Latin squares, famously another of Euler’s researchobjects [2]. – The figure is to be read like this: For each 2 × ap , the place inside the subsquarethe second and the white squares negated terms.Only in the early 1900s, Hurwitz gave a deeper explanation for Euler’s ma-trix. In the last chapter of his ‘Vorlesungen über die Zahlentheorie der Quater-nionen’ [4], he effectively proves that SO (4 , R ) can be modelled by combined1 a r X i v : . [ m a t h . HO ] A ug igure 1: The quaternionic magic square of squares2eft and right multiplication of quaternions, i.e., for any γ ∈ SO (4) there existquaternions q L , q R of norm 1, such that γ (cid:0) ( a, b, c, d ) (cid:1) = ( p, q, r, s ) ⇐⇒ q L ∗ ( a + bi + cj + dk ) ∗ q R = p + qi + rj + sk, where i, j, k are the quaternionic basis elements. (We will identify 4-vectors andquaternions.) Therefore, if we initially have a orthonormal basis { e , e , e , e } = { , i, j, k } , transformation by multiplication to A ∗ e i ∗ P = ( a + bi + cj + dk ) ∗ e i ∗ ( p + qi + rj + sk ) , with not necessarily unit quaternions A, P will give an at least orthogonal basisagain. And this is exactly what happens in Euler’s matrix, save some signchanges and column permutation; the rows are given by the components of A ∗ e i ∗ P . The column permutation is necessary to make the diagonal conditionseasier to attain, sign changes are probably just for aesthetic reasons.Euler did not know yet about quaternions, but he had found the four-squares-identity ( a + a + a + a )( b + b + b + b ) =( a b − a b − a b − a b ) +( a b + a b + a b − a b ) +( a b − a b + a b + a b ) +( a b + a b − a b + a b ) which secretly is also founded on quaternionic multiplication. It may indeed beseen as the multiplicativity of the quaternionic norm, i.e., N ( A ) N ( B ) = N ( AB ).This is relevant in the magic square context, since the norm of the rows is thusconstant and equal to N ( A e i P ) = N ( A ) N ( e i ) N ( P ) = N ( A ) N ( P ) . Now arose the question, if a similar thing can be done for the octonions, theinfamously non-associative Cayley-Dickson extension of the quaternions. There,it is known (see, e.g., [1]) that SO (8) is generated by at most seven multiplica-tions, either all left or all right, but conversely any single multiplication with aunit octonion is also associated to a transformation in SO (8).So, in order to obtain a magic square of size 8 with reasonably small norm,the same approach as shown by Hurwitz may be made, i.e., to build a matrixfrom the components of A ∗ ( e i ∗ P ) , where e i runs through the octonionic basiselements. (Multiplying with just one octonion would not give a ‘magic’ matrix,i.e., where all entries are distinct; so two is the minimum. Similarly, performingtwo multiplications on the same side does not produce enough distinct elements.)– To give this matrix in detail in text form is not particularly enlightning, wewill instead present its visualization analogous to the 4 × Theorem 1
Let A = ( a e + b e + c e + d e + e e + f e + g e + h e ) ,P = ( p e + q e + r e + s e + t e + u e + v e + w e ) ,A, P ∈ O [ a, b, . . . , h, p, q, . . . , w ] be symbolic octonions, (i.e., a, b, . . . , h, p, q, . . . , w are variables, and e = 1 , e i are orthogonal basis elements of O ) and let M ∈ R [ a, . . . , h, p, . . . , w ] × be givenby the i -th row vector defined as the components of A ( e i P ) .Then the matrix M constitutes a symbolic semi-magic square of squares withentries in Z [ a, . . . , h, p, . . . , w ] , with orthogonal rows and constant N ( A ) N ( P ) .Consequently, supposing the matrix is evaluated at some A , P ∈ Q , suchthat all entries are distinct integers, this integer matrix constitutes an (integral)semi-magic square of squares with orthogonal rows and constant N ( A ) N ( P ) . Proof
The assertions on M follow from the fact that multiplication withunit octonions models SO (8) (see [1]), hence right multiplication with P andsubsequent left multiplication with A preserves the initial orthogonality, whilemultiplying all lengths equally. Also, all choices of orthogonal basis elementsact as a permutation on each other, up to sign change, so that the coefficientsof the matrix entries are all ±
1. That all entries are different can be verifiedby calculation, e.g., using Sage [5]. Figure 2 also visualizes this in that no two3 × (cid:3) – Having attained a parametrisation the next step is to find numbers suchthat the entries are indeed different and the constant is low. By plugging inconcrete values for the A, P , e.g., this matrix with constant 9476 could befound: 43 16 -19 8 -22 47 38 -53-30 11 30 5 25 -32 75 -169 -4 -7 -52 -46 -57 -6 -35-8 -67 48 21 -5 10 -17 -4254 -11 14 49 -31 -36 17 3644 41 60 -21 33 -2 -25 -107 -26 29 -54 -24 37 32 45-41 46 35 22 -60 15 -12 1which only lacks the diagonal properties required for a fully magic matrix; thistype is called semi-magic.The diagonal properties in Euler’s matrix arose from choosing such a per-mutation of rows that in the diagonal all terms were present. Then calculating5he sum of squares of the diagonal elements and subtracting the magic constantleads very naturally to the side conditions. – This does not work with the 8 × −
32 to 32 did notproduce any results.It is not difficult to find at least parameters such that not only all entriesbut also all their squares (or absolute values) are distinct, one of low constant43617 is given by A = ( − , − , , − , , − , , − , P = ( − , , − , − , , , − , . When presenting the matrix in terms of the parameters, it is dependent on thespecific implementation of the algebra. We chose the Cayley-Dickson extensionof the quaternion algebra as given by the computer algebra system Sage [5].(The according scripts are available from the author by request.)The parameters for the 9476 matrix exhibit an interesting detail, in that oneof them has half integers for coordinates: A = (8 , − , − , , − , − , − , − , P = 12 (5 , , − , − , − , , , . It is already the case in the quaternions that the appropriate integers to performnumber theory contain half integers, this is even more true for the octonions(see a concise account in [1]). The half integers may be placed only in specific4-subsets of the coordinates. It seemed appropriate to choose at least one factorof this form to achieve a low constant.The next step by the Cayley-Dickson construction would be the 16-dimensionalsedenions; however, the Hurwitz theorem states that there are no further normedreal division algebras beyond dimension 8. In particular the multiplicativity ofthe norm does not hold any longer; consequently the analog matrix does nothave orthogonal rows. Similar constructions might also be carried out in anyother composition algebra, though a different definition of orthogonality wouldapply, i.e., instead of
M M > one would consider something like M QM > for amatrix Q . References [1] J.H.Conway, D.A.Smith, On Quaternions and Octonions: Their Geome-try, Arithmetic, and Symmetry, A.K.Peters Ltd., Natick, MA, 2003[2] L.Euler, Recherches sur un nouvelle espéce de quarrés magiques, Verhan-delingen uitgegeven door het zeeuwsch Genootschap der Wetenschappente Vlissingen 9 (1782), 85-239. Reprinted in Opera Omnia, I.7, 291-392.[3] L.Euler, Problema algebraicum ob affectiones prorsus singulares i memo-rabile, Novi commentarii academlae scientiarum Petropolitanae, 15 (1770)1771, 75-106. Reprinted in Opera Omnia, I-6, 287-31564] A.Hurwitz, Vorlesungen über die Zahlentheorie der Quaternionen,Springer, Berlin, 1919[5]
SageMath, the Sage Mathematics Software System (Version 8.8) , The SageDevelopers, 2019,