MAGIC SQUARE. A magic square is one divided into any number of equal squares, like a chess-board, in each of which is placed one of a series of consecutive numbers from 1 up to the square of the number of cells in a side, in such a manner that the sum of those in the same row or column and in each of the two diagonals is constant....
From a very early period these squares engaged the attention of mathematicians, especially such as possessed a love of the marvellous, or sought to win for themselves a superstitious regard. They were then supposed to possess magical properties, and were worn, as in India at the present day, engraven in metal or stone, as amulets or talismans. According to the mystic imaginings of the old astrologers relations subsisted between these squares and the planets: a square with only one cell, containing 1, symbolized the unity of the deity; a square of two, containing the four elements, was the symbol of matter; while those of 3, 4, 5, 6, 7, 8 were consecrated respectively to Saturn, Jupiter, Mars, the Sun, Venus, and Mercury. In later times such squares ranked only as mathematical curiosities; till at last their mode of construction was systematically investigated. These squares were at first mere triumphs of the same dogged perseverance as was in later times exhibited by the Dutchman, Ludolph van Ceulen, who, after calculating τr to 35 places of decimals, directed, like Archimedes, that it should be engraven on his tomb, though his industry was surpassed by M. de Lagry, who continued the decimal to 127 places. The earliest known writer on the subject was Emanuel Moscopulus, a Greek, who lived in the 4th or 5th century, and whose manuscript is preserved in the National Library at Paris. After him Frenicle constructed magic squares, such that if one or more of the encircling bands of numbers be taken away the remaining central squares are still magical. Subsequently M. Poignard constructed squares with numbers in arithmetical progression, having the magical summations. The later researches of M. de la Hire, recorded in the Mémoires de lj Academie Royale in 1705, are interesting as giving general methods of construction. He has there collected the results of the labours of earlier pioneers; but the subject has now been fully systematized, and extended to cubes.
In order to understand the rest of this article diagram A should be carefully examined. A square of 5 has adjoining it one of the eight equal squares by which any square may be conceived to be surrounded, each of which has two sides resting on adjoining ones, while four have sides resting on the surrounded square, and four meet it only at its four angles. 1, 2, 3 are placed along the path of a knight in chess; 4, along the same path, would fall in a cell of the outer square, and is placed instead in the corresponding cell of the’original square;
5 then falls within the square. α, δ, c, d are placed diagonally in the square; but e enters the outer [table]
square, and is removed thence to the same cell of the square it had left, σ, β, γ, δ, e pursue another, but regular, course; and the diagram shows how that course is recorded in the square they have twice left. Whichever of the eight surrounding squares may be entered, the corresponding cell of the central square is taken instead. The 1, 2, 3, . . . . , a, i>, c, . . . . , α, β, γ, . . . . are said to lie in paths. Squares whose Poots are Odel.— Diagrams B, C, D exhibit one of the earliest methods of constructing magic squares. Here the 3’s in B and 2’s in C are placed in [table]
opposite diagonals to secure the two diagonal summations; then each number in C is multiplied by 5 and added to [table]
that in the corresponding number in B, which gives the square D. Diagrams E, F, G give M. de la Hire’s method; [table]
the squares E, F, being combined as above, give the magic square G. Μ. Bachet arranged the numbers as in H, where there are three numbers in each of four surrounding squares; these being placed in the corresponding cells of the central square, the square I is formed. He also constructed squares such that if one or more outer bands of numbers are removed the remaining central squares are magical. His method of forming them may be understood from a square of 5. Here each summation is 5x13; if therefore 13 is subtracted from each number, the summa [table]
tions will be zero, and the twenty-five cells will contain the series ± 1, ÷ 2, ÷ 3, . . . . ÷ 12, the odd cell having 0. The central square of 3 is formed with four of the twelve numbers with + and - signs and zero in the middle; the band is filled up with the rest, as in diagram J; then, 13 being added in each cell, the magic square K is obtained.
Squares whose Poots are Even.— These were constructed in various ways, similar to that of 4 in diagrams I., M, N. The numbers in M being multiplied by 4, and the squares I., M being superimposed, give N. The application of [table]
this method to squares the half of whose roots are odd requires a complicated adjustment. Squares whose half root is a multiple of 4, and in which there are summations along all the diagonal paths, may be formed, by observing·, as when the root is 4, that the series 1 to 16 may be [table]
changed into the series 15, 13,. . . . 3, 1, —1,-3,. . . . - 13, - 15, by multiplying each number by 2 and subtracting 17; and, vice versa, by adding 17 to each of the latter, and dividing by 2. The diagonal summations of a square, filled as in diagram O, make zero; and, to obtain the same [table]
in the rows and columns, we must assign such values to the ρ ’ Α and <fs as satisfy the equations jo 1 +jo 2 + α 1 -t-α 2 = O, p 3 + p i + a 3 + a 4 = 0, p 1 +p 3 ~α 1 -α 3 = 0, and p 2 + p i - α 2 - a 4 = Ο,—a solution of which is readily obtained by inspection, as in diagram P; this leads to the square, diagram Q. When the root is 8, the upper four subsidiary rows may at once be written, as in diagram R; then, if the square be completed, 65 added to each, and the sums halved, the square is completed. In such squares as these, the two opposite squares about the same diagonal (except that of 4) may be turned through any number of right angles, in the same direction, without altering the summations.
N asile Squares.— Squares that have many more summations than in rows, columns, and diagonals have been investigated by the Rev. A. H. Frost ^Cambridge Math. Jour., 1857), and called Nasik squares, from the town in India where he resided; and he has extended the method to cubes, various sections of which have the same singular properties. In order to understand their construction it will be necessary to consider carefully diagram S, which shows that, when the root is a prime, and not composite, number, as 7, eight letters a, b, . . . h may proceed from any, the same, cell, suppose that marked 0, each letter being repeated in the cells along different paths. These eight paths are called normal paths, their number being one more than the root. Observe here that, excepting the cells from which any two letters start, they do not occupy again the same cell, and that two letters, starting from any two different cells along different paths, will appear together in one and only one cell. Hence, if ρ x be placed in the cells of one of the n + 1 normal paths, each of the remaining η normal paths will contain one, and only one, of these p 1 ⅛. If now we fill each row with ρ 2 , p 3 , ... p η in the same order, commencing from the ρ λ in that row, the p 2 ’ s, jd 3 , s, and pfs will lie each in a path similar to that of ρ 1 , and each of the n normal paths will contain one, and only one, of the letters ρ 1 , ρ 2 , . . . p n , whose sum will be '⅜p. Similarly, if q χ be placed along any of the normal paths, different from that of the ∕>⅛, and each row filled as above with the letters g 2 , q 3 , . . . q n , the sum of the 7’3 along any normal path different from that of the q l will be 5⅛. The n 2 cells of the square will now be found to contain all the combinations [table]
of the p’s and q’s; and, if the q’s be multiplied by n, the p’s made equal to 1, 2, . . . n, and the fs to 0, 1, 2, . . . n-1 in any order, the Nasik square of n will be obtained, and the summations along all the normal paths, except those traversed by the p’s and q’s, will be the constant ‰q + ⅜p. When the root is an odd composite number, as 9, 15, <fcc., it will be found that in some paths, different from the two along which the p χ and q x were placed, instead of having each of the p’s and q’s, some will be wanting, while some are repeated. Thus, in the case of 9, the triplets p l p i p 7 , p 2 p 3 p 8 , p 3 p 6 p 3 , and q χ q i q 7 , q 2 q b q 6 , q 3 q 3 q 9 occur, each triplet thrice, along paths whose summation should be— ⅜p, 45, and Sr, 36. But if we make p x , p 2 ,. . . p Q = 1, 3, 6, 5, 4, 7, 9,8, 2, and the r 1 , r 2 , • . . r 9 = 0, 2, 5, 4, 3, 6, 8, 7, 1, thrice each of the above sets of triplets will equal Sp and ¾ respectively. If now the q’s are multiplied by 9, and added to the p’s in their several cells, we shall have a Nasik square, with a constant summation along eight of its ten normal paths. In diagram T, the numbers are in the nonary scale; that in the centre is the middle one of 1 to 9 2 , and the sum of pairs of numbers equidistant from and opposite to the central 45 is twice 45; and the sum of any number and the 8 numbers 3 from it, diagonally, and in its row and column, is the constant Nasical summation, e.g., 72 and 32, 22, 76, 77, 26, 37, 36, 27. The numbers in T being kept in the nonary scale, it is not necessary to add any nine of them together in order to test the Nasical summation; for, taking the first column, the figures in the place of units are seen at once to form the series, 1, 2, 3,. . . . 9, and those in the other place three triplets of 6, 1, 5. For the squares of 15 the p’s and g ,, s may be respectively 1, 2, 10, 8, 6, 14, 15, 11, 4, 13, 9, 7,3, 12, 5, and0,1,9, 7,5,13,14, 10, 3, 12, 8, 6, 2, 11, 4, where five times the sum of every third number [table]
and three times the sum of every fifth number makes ⅜p and 2≥⅛; then, if the q’s are multiplied by 15, and added to the p’s, the Nasik square of 15 is obtained. When the root is a multiple of 4, the same process gives us, for the square of 4, the diagram U. Here the columns give ⅛p, but alternately 2<2 1 , 2ç 3 , and 2g 2 , 2g ’ 4 ; and the rows give ¾, but alternately 2p 1 , 2p 3 , and 2p 2 , 2p i ; the diagonals giving ¾> and ⅛q. If p χ , p 2f p. i , p i and g 1 , q 2 , q 3 , q i be 1, 2, 4, 3, and 0, 1, 3, 2, we have the Nasik square of diagram V. A square like this is engraven in the Sanskrit character on the gate of the fort of Gwalior, in. India. The squares of higher multiples of 4 are readily obtained by a similar adjustment. [table] [table]
A Nasik cube is composed of n 3 small equal cubes, here called cubelets, in the centres of which the natural numbers from 1 to n 3 are so placed that every section of the cube by planes perpendicular to an edge has the properties of a Nasik square; also sections by planes perpendicular to a face, and passing through the cubelet centres of any path of Nasical summation in that face. Diagram W shows by dots the way in which these cubes are constructed. A dot is here placed on three faces of a cubelet at the corner, showing that this cubelet belongs to each of the faces AOB, BOG, COA, of the cube. Dots are placed on the cubelets of some path of AOB (here the knight’s path), beginning from O, also on the cubelets of a knight’s path in BOG. Dots are now placed in the cubelets of similar paths to that on BOG in the other six sections parallel to BOO, starting from their dots in AOB. Forty-nine of the three hundred and forty-three cubelets will now contain a dot; and it will be observed that the dots in sections perpendicular to BO have arranged themselves in similar paths. In this manner, p x , q x , r x being placed in the comer cubelet 0, these letters are severally placed in the cubelets of three different paths of AOB, and again along any similar paths in the seven sections perpendicular to AO, starting from the letters’ position in AOB. Next,p 2 g ’ 2 r 2 , pgq 3 r 3 , . . . prq∙flrι are placed in the other cubelets of the edge AO, and dispersed in the same manner as PN, ∖ r ∖ ∙ Every cubelet will then be found to contain a different combination of then’s, g ,, s, and r’s. If therefore the p’s are made equal to 1, 2, . . . 7, and the fs and r’s to 0, 1, 2, . . . 6, in any order, and the g ,, s multiplied by 7, and the r’s by 7 2 , then, as in the case of the squares, the 7 3 cubelets will contain the numbers from 1 to 7 3 , and the Nasical summations will be 27 2 r + S7g ’ +p. If 2, 4, 5 be values of r,p,q, the number for that cubelet is written 245 in the septenary scale, and if all the cubelet numbers are kept thus, the paths along which summations are found can be seen without adding, as the seven numbers would contain 1, 2, 3, . . . 7 in the unit place, and 0, 1, 2, . . . 6 in each of the other places. In all Nasik cubes, if such values are given to the letters on the central cubelet that the number is the middle one of the series 1 to n s , the sum of all the pairs of numbers opposite to and equidistant from the middle number is the double of it. Also, if around a Nasik cube the twenty-six surrounding equal cubes be placed with their cells filled with the same numbers, and their corresponding faces looking the same way,—and if the surrounding space be conceived thus filled with similar cubes, and a straight line of unlimited length be drawn through any two cubelet centres, one in each of any two cubes,—the numbers along that line will be found to recur in groups of seven, which (except in the three cases where the same p, q, or r recur in the group) together make the Nasical summation of the cube. Further, if we take n similarly filled Nasik cubes of η, n new letters, s,, s, 1 , . . . s n , can be so placed, one in each of the n 4 cubelets of this group of n cubes, that each shall contain a different combination of the p’s, q’s, r’s, and s’s. This is done by placing s 1 on each of the ri 2 cubelets of the first cube that contain p 1 , and on the n 2 cubelets of the 2d, 3d, . . . and nth cube that contain p 2 , p 3 , . . . p n respectively. This process is repeated with s 2 , beginning with the cube at which we ended, and so on with the other s’s ; the n 4 cubelets, after multiplying the q’s, r’s, and s’s by n, v?, and n i respectively, [table]
will now be filled with the numbers from 1 to n i , and the constant summation will be '2, ∣ ι 3 s + Sn 2 r + ~2,nq + ^2,ρ. This process may be carried on without limit; for, if the n cubes are placed in a row with their faces resting on each other, and the corresponding faces looking the same way, n such parallelepipeds might be put side by side, and the n 5 cubelets of this solid square be Nasically filled by the introduction of a new letter t ; while, by introducing another letter, the n β cubelets of the compound cube of n s Nasik cubes [table] [table]
might be filled by the numbers from 1 to n 6 , and so ad infinitum. When the root is an odd composite number the values of the three groups of letters have to be adjusted as in squares, also in cubes of an even root. A similar process enables us to place successive numbers in the cells of several equal squares in which the Nasical summations are the same in each, as in diagrams X.
Among the many ingenious squares given by various writers, this article may justly close with two by Euler, in the Histoire de Γ Académie Royale des Sciences, Berlin, 1759. In diagram Y the natural numbers show the path of a knight that moves within an odd square in such a manner that the sum of pairs of numbers opposite to and equidistant from the middle figure is its double. In diagram Z the knight returns to its starting cell in a square of 6, and the difference between the pairs of numbers opposite to and equidistant from the middle point is 18.
A model consisting of seven Nasik cubes, constructed by Mr Frost, can be seen in the South Kensington Museum. The centres of the cubes are placed at equal distances in a straight line, the similar faces looking the same way in a plane parallel to that line. Each of the cubes has seven parallel glass plates, to which, on one side, the seven numbers in the septenary scale are fixed, and behind each, on the other side, its value in the common scale. 1201, the middle number from 1 to 7 4 , occupies the central cubelet of the middle cube. Besides each cube having separately the same Nasical summation, this is also obtained by adding the numbers in any seven similarly situated cubelets, one in each cube. Also, the sum of all pairs of numbers, in a straight line through the central cube of the system, equidistant from it, in whatever cubes they are, is twice 1201.
A very complete bibliographical index of writers on this subject is given in Professor Lucas’s Récréations Mathématiques, Pans, 1882.
[3,297 words — estimated reading time: 19 minutes]
