NOL
Mathematical recreations and problems of past and present times

Chapter 36

CHAPTER VII.

MAGIC SQUARES.
in the form of a square, so that the sum of the numbers in every row, in every column, and in each diagonal is the same. If the integers are the consecutive numbers from 1 to n^ the square is said to be of the nth order, and it is easily seen that in this case the sum of the numbers in any row, column, or diagonal is equal to \n {n^ ■\- \) \ this number may be denoted by N. Unless otherwise stated, I confine my account to such magic squares, that is, to squares formed with consecu- tive integers from 1 upwards. The same rules however cover similar problems with 7t^ numbers in arithmetical progression.
Thus the first 16 integers, arranged in either of the forms given in figures i and ii below, represent magic squares of the
16
3
2
13
5
10
11
8
9
6
7
12
.4
15
14
1
I ^
15
10
3
6
4
5
16
9
14
11
2
7
1
8
13
12
Figure L
Figure ii.
fourth order, the sum of the numbers in any row, column, or diagonal being 34. Similarly figure iii on page 140, figure vii on page 143, figure xii on page 153, and figure xvi on page 157 represent magic squares of the fifth order ; figure xi on page loO represents a magic square of the sixth order; figure xviii on page 160 represents a magic square of the seventh
138 MAGIC SQUARES [CH. VII
order, and figures xxii and xxiii on pages 163, 164 represent magic squares of the eighth order.
The formation of these squares is an old amusement, and in times when mystical philosophical ideas were associated with particular numbers it was natural that such arrangements should be deemed to possess magical properties. Magic squares of an odd order were constructed in India before the Christian era according to a law of formation which is explained here- after. Their introduction into Europe appears to have been due to Moschopulus, who lived at Constantinople in the early part of the fifteenth century, and enunciated two methods for making such squares. The majority of the medieval astrologers and physicians were much impressed by such arrangements. In particular the famous Cornelius Agrippa (1486 — 1535) con- structed magic squares of the orders 3, 4, 5, 6, 7, 8, 9, which were associated respectively with the seven astrological "planets": namely, Saturn, Jupiter, Mars, the Sun, Venus, Mercury, and the Moon. He taught that a square of one cell, in which unity was inserted, represented the unity and eternity of God ; while the fact that a square of the second order could not be con- structed illustrated the imperfection of the four elements, air, earth, fire, and water; and later writers added that it was symbolic of original sin. A magic square engraved on a silver plate was sometimes prescribed as a charm against the plague, and one, namely, that represented in figure i on the last page, is drawn in the picture of Melancholy, painted in 1514 by Albert DUrer : the numbers in the middle cells of the bottom row give the date of the work. Such charms are still worn in the East.
The development of the theory was at first due mainly to French mathematicians. Bachet gave a rule for the construc- tion of any square of an odd order in a form substantially equivalent to one of the rules given by Moschopulus. The formation of magic squares, especially of even squares, was con- sidered by Frenicle and Format. The theory was continued by Poignard, De la Hire, Sauveur, D'Ons-en-bray, and Des Ourmes. Ozanam included in his work an essay on magic squares which
CH. VIl] MAGIC SQUARES 139
was ampliiied by Montucla. Like most algebraical problems, the construction of magic squares attracted the attention of Euler, but he did not advance the general theory. In 1837 an elaborate work on the subject was compiled by B. Violle, which is useful as containing numerous illustrations. I give the references in a footnote*.
I shall confine myself to establishing rules for the con- struction of squares subject to no conditions beyond those given in the definition. I shall commence by giving rules for the construction of a square of an odd order, and then shall proceed to similar rules for one of an even order.
It will be convenient to use the following terms. The spaces or small squares occupied by the numbers are called cells. The diagonal from the top left-hand cell to the bottom right-hand cell is called the leading diagonal or left diagonal. The diagonal from the top right-hand cell to the bottom left- hand cell is called the right diagonal.
Magic squares of an odd order. I proceed to give three methods for constructing odd magic squares, but for simplicity I shall apply them to the formation of squares of the fifth order ; though exactly similar proofs will apply equally to any odd square.
* For a sketch of the history of the subject and its bibliography see S. Giiuther's Gesehichte der mathematischen Wisseu.=^chaften, Leipzig, 1876,