MAGIC Square, a square figure, formed of a series
of numbers in mathematical proportion; so disposed in
parallel and equal ranks, as that the sums of each row,
taken either perpendicularly, horizontally, or diagonally,
are equal.

Let the several numbers which compose any square
number (for instance, 1, 2, 3, 4, 5, &c. to 25 inclusive,
the square number) be disposed, in their natural order,
after each other in a square figure of 25 cells, each in
its cell; if now you change the order of these numbers,
and dispose them in the cells in such manner, as that
the five numbers which fill a horizontal rank of cells,
being added together, shall make the same sum with
the five numbers in any other rank of cells, whether
horizontal or vertical, and even the same number with
the five in each of the two diagonal ranks: this dis-
position of numbers is called a magic square, in oppo-
sition to the former disposition, which is called a natural
square
. See the figures following.

Natural Square.
12345
678910
1112131415
1617181920
2122232425
Magic Square.
16148225
32220119
15642317
241812101
75211913

One would imagine that these magic squares had
that name given them, in regard this property of all
their ranks, which, taken any way, make always the
same sum, appeared extremely surprising, especially in
certain ignorant ages, when mathematics passed for
magic: but there is a great deal of reason to suspect,
that these squares merited their name still farther, by
the superstitious operations they were employed in, as
the construction of talismans, &c.; for, according to
the childish philosophy of those days, which attributed
virtues to numbers, what virtue might not be expected
from numbers so wonderful?

However, what was at first the vain practice of ma-
kers of talismans and conjurers, has since become the
subject of a serious research among mathematicians;
not that they imagine it will lead them to any thing
of solid use or advantage (magic squares favour too
much of their original to be of much use); but only
as it is a kind of play, where the difficulty makes the
merit, and it may chance to produce some new views
of numbers, which mathematicians will not lose the
occasion of.

Eman. Moschopulus, a Greek author of no great
antiquity, is the first that appears to have spoken of
magic squares: and by the age wherein he lived, there
is reason to imagine he did not look on them merely
as a mathematician. However, he has left us some
rules for their construction. In the treatise of Cor.
Agrippa, so much accused of magic, we find the squares
of seven numbers, viz. from three to nine inclusive,
disposed magically; and it must not be supposed that
those seven numbers were preferred to all the other
without some very good reason: in effect, it is because
their squares, according to the system of Agrippa and
his followers, are planetary. The square of 3, for in-

stance, belongs to Saturn; that of 4 to Jupiter; that
of 5 to Mars; that of 6 to the Sun; that of 7 to Ve-
nus; that of 8 to Mercury; and that of 9 to the
Moon. M. Bouchet applied himself to the study of
magic squares, on the hint he had taken from the pla-
netary squares of Agrippa, as being unacquainted with
the work of Moschopulus, which is only in manuscript
in the French king's library; and, without the assist-
ance of any author, he found out a new method for
those squares whose root is uneven, for instance 25,
49, &c. but he could not make any thing of those
whose root is even.

After him came M. Frenicle, who took the same
subject in hand. A certain great algebraist was of
opinion, that whereas the 16 numbers which compose
the square might be disposed 20922789888000 different
ways in a natural square (as from the rules of combi-
nation it is certain they may), they could not be
disposed in a magic square above 16 different ways;
but M. Frenicle showed, that they might be thus dis-
posed 878 different ways: whence it appears how much
his method exceeds the former, which only yielded the
55th part of magic squares of that of M. Frenicle.

To this inquiry he thought fit to add a difficulty
that had not yet been considered: the magic square of
7, for instance, being constructed, and its 49 cells filled,
if the two horizontal ranks of cells and, at the
same time, the two vertical ones, the most remote from
the middle, be retrenched; that is, if the whole border
or circumference of the square be taken away,
there will remain a square whose root will be 5,
and which will only consist of 25 cells. Now it is not at
all surprising that the square should be no longer magi-
cal, because the ranks of the large ones were not in-
tended to make the same sum, excepting when taken
entire with all the seven numbers that fill their seven
cells; so that being mutilated each of two cells,
and having lost two of their numbers, it may be well ex-
pected, that their remainders will not any longer make
the same sum. But M. Frenicle would not be satis-
fied, unless when the circumference or border of the
magic square was taken away, and even any circum-
ferences at pleasure, or, in fine, several circumferences
at once, the remaining square was still magical: which
last condition, no doubt, made these squares vastly more
magical than ever.

Again, He inverted that condition, and required
that any circumference taken at pleasure, or even se-
veral circumferences, should be inseparable from the
square; that is, that it should cease to be magical when
they were removed, and yet continue magical after the
removal of any of the rest. M. Frenicle, however,
gives no general demonstration of his methods, and
frequently seems to have no other guide but chance.
It is true, his book was not published by himself, nor
did it appear till after his death, viz. in 1693.

In 1703, M. Poignard, canon of Brussels, publish-
ed a treatise of sublime magic squares. Before him
there had been no magic squares made but for series
of natural numbers that formed a square; but M.
Poignard made two very considerable improvements.
1. Instead of taking all the numbers that fill a square,
for instance the 36 successive numbers, which would
fill all the cells of a natural square whose side is 6, he
only takes as many successive numbers as there are units
in

in the side of the square, which, in this case, are fix; and these fix numbers alone he disposes in such manner in the 36 cells, that none of them are repeated twice in the same rank, whether it be horizontal, vertical, or diagonal; whence it follows, that all the ranks, taken all the ways possible, must always make the same sum, which M. Poignard calls repeated progression. 2. Instead of being confined to take these numbers according to the series and succession of the natural numbers, that is, in an arithmetical progression, he takes them likewise in a geometrical progression, and even in an harmonical progression. But with these two last progressions the magic must necessarily be different from what it was: in the squares filled with numbers in geometrical progression, it consists in this, that the products of all the ranks are equal; and in the harmonical progression, the numbers of all the ranks continually follow that progression: he makes squares of each of these three progressions repeated.

This book of M. Poignard gave occasion to M. de la Hire to turn his thoughts the same way, which he did with such success, that he seems to have well nigh completed the theory of magic squares. He first considers uneven squares: all his predecessors on the subject having found the construction of even ones by much the most difficult; for which reason M. de la Hire reserves those for the last. This excess of difficulty may arise partly from hence, that the numbers are taken in arithmetical progression. Now in that progression, if the number of terms be uneven, that in the middle has some properties, which may be of service; for instance, being multiplied by the number of terms in the progression, the product is equal to the sum of all the terms.

M. de la Hire proposes a general method for uneven squares, which has some similitude with the theory of compound motions, so useful and fertile in mechanics. As that consists in decomposing motions, and resolving them into others more simple; so does M. de la Hire's method consist in resolving the square that is to be constructed into two simple and primitive squares. It must be owned, however, it is not quite so easy to conceive these two simple and primitive squares in the compound or perfect square, as in an oblique motion to imagine a parallel and perpendicular one.

Suppose a square of cells, whose root is uneven, for instance 7; and that its 49 cells are to be filled magically with numbers, for instance the first 7; M. de la Hire, on the one side, takes the first 7 numbers, beginning with unity, and ending with the root 7; and on the other 7, and all its multiples to 49, exclusively; and as these only make six numbers, he adds 0, which makes this an arithmetical progression of 7 terms as well as the other; 0. 7. 14. 21. 28. 35. 42. This done, with the first progression repeated, he fills the square of the root magically: In order to this, he writes in the first seven cells of the first horizontal rank the seven numbers proposed in what order he pleases, for that is absolutely indifferent; and it is proper to observe here, that these seven numbers may be ranged in 5040 different manners in the same rank. The order in which they are placed in the first horizontal rank, be it what it will, is that which determines their order in all the rest. For the second horizontal rank, he places in its first cell, either the

third, the fourth, the fifth, or the sixth number, from the first number of the first rank; and after that writes the six others in order as they follow. For the third horizontal rank, he observes the same method with regard to the second that he observed in the second with regard to the first, and so of the rest. For instance, suppose the first horizontal rank filled with the seven numbers in their natural order, 1, 2, 3, 4, 5, 6, 7; the second horizontal rank may either commence with 3, with 4, with 5, or with 6: but in this instance it commences with 3; the third rank therefore must commence with 5, the fourth with 7, the fifth with 2, the sixth with 4, and the seventh with 6. The commencement of the ranks which follow the first being thus determined, the other numbers, as we have already observed, must be written down in the order wherein they stand in the first, going on to 5, 6, and 7, and returning to 1, 2, &c. till

every number in the first rank be found in every rank underneath, according to the order arbitrarily pitched upon at first. By this means it is evident, that no number whatever can be repeated twice in the same rank; and by consequence, that the seven numbers 1, 2, 3, 4, 5, 6, 7, being in each rank, must of necessity make the same sum.

It appears, from this example, that the arrangement of the numbers in the first rank being chosen at pleasure, the other ranks may be continued in four different manners; and since the first rank may have 5040 different arrangements, there are no less than 20,160 different manners of constructing the magic square of seven numbers repeated.

1234567
3456712
5671234
7123456
2345671
4567123
6712345
1234567
2345671
3456712
4567123
5671234
6712345
7123456
1234567
7123456
6123456
5671234
4567123
3456712
2345671

The order of the numbers in the first rank being determined; if in beginning with the second rank, the second number 2, or the last number 7, should be pitched upon in one of these cases, and repeated; and in the other case, the other diagonal would be false unless the number repeated seven times should happen to be 4; for four times seven is equal to the sum of 1, 2, 3, 4, 5, 6, 7: and in general, in every square consisting of an unequal number of terms, in arithmetical progression, one of the diagonals would be false according to those two constructions, unless the term always repeated in that diagonal were the middle term of the progression. It is not, however, at all necessary to take the terms in an arithmetical progression; for, according to this method, one may construct a magic square of any numbers at pleasure, whether they be according to any certain progression or not. If they be in an arithmetical progression, it will be proper, out of the general method, to except those

two constructions which produce a continual repetition of the same term in one of the two diagonals, and only to take in the case wherein that repetition would prevent the diagonal from being just; which case being absolutely disregarded when we computed that the square of 7 might have 20,160 different constructions, it is evident that by taking that case in, it must have vastly more.

To begin the second rank with any other number besides the second and the last, must not, however, be looked on as an universal rule: it holds good for the square of 7; but if the square of 9, for instance, were to be constructed, and the fourth figure of the first horizontal rank were pitched on for the first of the second, the consequence would be, that the fifth and eighth horizontal ranks would likewise commence with the same number, which would therefore be repeated three times in the same vertical rank, and occasion other repetitions in all the rest. The general rule, therefore, must be conceived thus: Let the number in the first rank pitched on, for the commencement of the second, have such an exponent for its quota; that is, let the order of its place be such, as that if an unit be taken from it, the remainder will not be any just quota part of the root of the square; that is, cannot divide it equally. If, for example, in the square of 7, the third number of the first horizontal rank be pitched on for the first of the second, such construction will be just; because the exponent of the place of that number, viz. 3, subtracting 1, that is, 2 cannot divide 7. Thus also might the fourth number of the same first rank be chosen, because 4-1, viz. 3, cannot divide 7; and, for the same reason, the fifth or sixth number might be taken: but in the square of 9, the fourth number of the first rank must not be taken, because 4-1, viz. 3, does divide 9. The reason of this rule will appear very evidently, by considering in what manner the returns of the same numbers do or do not happen, taking them always in the same manner in any given series. And hence it follows, that the fewer divisions the root of any square to be constructed has, the more different manners of constructing it there are; and that the prime numbers, i. e. those which have no divisions, as 5, 7, 11, 13, &c. are those whose squares will admit of the most variations in proportion to their quantities.

The squares constructed according to this method have some particular properties not required in the problem; for the numbers that compose any rank parallel to one of the two diagonals, are ranged in the same order with the numbers that compose the diagonal to which they are parallel. And as any rank parallel to a diagonal must necessarily be shorter, and have fewer cells than the diagonal itself, by adding to it the correspondent parallel,

1234567
3456712
5671234
7123456
2345671
4567123
6712345

which has the number of cells by which the other falls short of the diagonal, the numbers of those two parallels, placed as it were end to end, still follow the same order with those of the diagonal: besides that their sums are likewise equal; so that they are magical on another account. Instead of the squares which we

have hitherto formed by horizontal ranks, one might also form them by vertical ones; the case is the same in both.

All we have hitherto said regards only the first primitive square, whose numbers, in the proposed example, were, 1, 2, 3, 4, 5, 6, 7; here still remains the second primitive, whose numbers are 0, 7, 14, 21, 28, 35, 42.

M. de la Hire proceeds in the same manner here as in the former; and this may likewise be constructed in 20,160 different manners, as containing the same number of terms with the first. Its construction being made, and of consequence all its ranks making the same sum, it is evident, that if we

071421283542
212835420714
420714212835
142128354207
354207142128
714212835420
283542071421

bring the two into one, by adding together the numbers of the two corresponding cells of the two squares, that is, the two numbers of the first of each, the two numbers of the second, of the third, &c. and dispose them in the 49 corresponding cells of a third square, it will likewise be magical in regard to its rank, formed by the addition of equal sums to equal sums, which must of necessity be equal among themselves. All that remains in doubt is, whether or no, by the addition of the corresponding cells of the two first squares, all the cells of the third will be filled in such manner, as that each not only contains one of the numbers of the progression from 1 to 49, but also that this number be different from any of the rest, which is the end and design of the whole operation.

As to this it must be observed, that if in the construction of the second primitive square care has been taken, in the commencement of the second horizontal rank, to observe an order with regard to the first, different from what was observed in the construction of the first square; for instance, if

the second rank of the first square began with the third term of the first rank, and the second rank of the second square commence with the fourth of the first rank, as in the example it actually does; each number of the first square may be combined once, and only once, by addition with all the numbers of the second.

191725334149
24324048786
4761413223139
2122303846513
3745412202829
111927355443
3442432101826

And as the numbers of the first are here 1, 2, 3, 4, 5, 6, 7, and those of the second, 0, 7, 14, 21, 28, 35, 42; by combining them in this manner we have all the numbers in the progression from 1 to 49, without having any of them repeated; which is the perfect magic square proposed.

The necessity of constructing the two primitive squares in a different manner does not at all hinder but that each of the 20,160 constructions of the one may be combined with all the 20,160 constructions of the other: of consequence, therefore, 20,160 multiplied by itself, which makes 406,425,600, is the number of different constructions that may be made of the perfect square, which here consists of the 49 numbers of the natural progression. But as we have already observed, that a primitive square of seven numbers repeated

peated may have above 20,160 several constructions, the number 406,425,600 must come vastly short of expressing all the possible constructions of a perfect magic square of the 49 first numbers.

As to the even squares, he constructs them like the uneven ones, by two primitive squares; but the construction of primitives is different in general, and may be so a great number of ways; and those general differences admit of a great number of particular variations, which give as many different constructions of the same even square. It scarce seems possible to determine exactly, either how many general differences there may be between the construction of the primitive squares of an even square and an uneven one, nor how many particular variations each general difference may admit of; and, of consequence, we are still far from being able to determine the number of different constructions of all those that may be made by the primitive squares.

The ingenious Dr Franklin seems to have carried this curious speculation farther than any of his predecessors in the same way. He has constructed not only a magic square of squares, but likewise a magic circle of circles, of which we shall give some account for the amusement of our readers. The magic square of squares is formed by dividing the great square, as in Plate CCXCVIII. The great square is divided into 256 small squares, in which all the numbers from 1 to 256 are placed in 16 columns, which may be taken either horizontally or vertically. The properties are as follow:

1. The sum of the 16 numbers in each column, vertical and horizontal, is 2056.

2. Every half column, vertical and horizontal, makes 1028, or half of 2056.

3. Half a diagonal ascending added to half a diagonal descending, makes 2056; taking these half diagonals from the ends of any side of the square to the middle thereof; and so reckoning them either upward or downward, or sidewise from left to right hand, or from right to left.

4. The same, with all the parallels to the half diagonals, as many as can be drawn in the great square; for any two of them being directed upward and downward, from the place where they begin to that where they end, their sums will make 2056. The same downward and upward in like manner: or all the same if taken sidewise to the middle, and back to the same side again. N. B. One set of these half diagonals and their parallels is drawn in the same square upward and downward. Another such set may be drawn from any of the other three sides.

5. The four corner numbers in the great square, added to the four central numbers therein, make 1028; equal to the half sum of any vertical or horizontal column which contains 16 numbers; and equal to half a diagonal or its parallel.

6. If a square hole (equal in breadth to four of the little squares) be cut in a paper, through which any of the 16 little squares in the great square may be seen, and the paper be laid on the great square, the

sum of all the 16 numbers, seen through the hole, is equal to the sum of the 16 numbers in any horizontal or vertical column, viz. to 2056.

The magic circle of circles, Plate CCXCVIII. is composed of a series of numbers from 12 to 75 inclusive, divided into eight concentric circular spaces, and ranged in eight radii of numbers, with the number 12 in the centre; which number, like the centre, is common to all these circular spaces, and to all the radii.

The numbers are so placed, that the sum of all those in either of the concentric circular spaces above mentioned, together with the central number 12, make 360; equal to the number of degrees in a circle.

The numbers in each radius also, together with the central number 12, make just 360.

The numbers in half of any of the above circular spaces, taken either above or below the double horizontal line, with half the central number 12, make 180; equal to the number of degrees in a semicircle.

If any four adjoining numbers be taken, as if in a square, in the radial divisions of these circular spaces, the sum of these, with half the central number, makes 180.

There are, moreover, included, four sets of other circular spaces, bounded by circles which are eccentric with respect to the common centre; each of these sets containing five spaces. The centres of the circles which bound them are at A, B, C, and D. The set whose centre is at A is bounded by dotted lines; the set whose centre is at C is bounded by lines of short unconnected strokes; and the set round D is bounded by lines of unconnected longer strokes, to distinguish them from one another. In drawing this figure by hand, the set of concentric circles should be drawn with black ink, and the four different sets of eccentric circles with four kinds of ink of different colours; as blue, red, yellow, and green, for distinguishing them readily from one another. These sets of eccentric circular spaces intersect those of the concentric, and each other; and yet the numbers contained in each of the eccentric spaces, taken all around through any of the 20 which are eccentric, make the same sum as those in the concentric, namely 360, when the central number 12 is added. Their halves also, taken above or below the double horizontal line, with half the central number, make 180.

Observe, that there is not one of the numbers but what belongs at least to two of the circular spaces, some to three, some to four, some to five; and yet they are all so placed as never to break the required number 360 in any of the 28 circular spaces within the primitive circle.

To bring these matters in view, all the numbers as above mentioned are taken out, and placed in separate columns as they stand around both the concentric and eccentric circular spaces, always beginning with the outermost and ending with the innermost of each set, and also the numbers as they stand in the eight radii, from the circumference to the centre: the common central number 12 being placed the lowest in each column.

1472236521671274
2563167018682761
3056394937512858
4147325434524345
4640553333354442
5731483850365929
6224711769196026
7315642266207513
1212121212121212
360360360360360360360360
1425304146576273
7263564740312415
2316393255487164
6570495433381722
3118373453506966
6768515235361920
1227284344596075
7461584542292613
1212121212121212
360360360360360360360360
1472238521
6316701868
3949375128
5434524345
3353354442
4838503659
2471176919
7315642266
1212121212
360360360360360
3056394937
4732543452
5533533544
3850365929
1769196026
6422662075
7223652167
2563167018
1212121212
360360360360360
4640553353
3148385036
7117691960
2266207513
6521671274
1670186827
5639493751
4147325434
1212121212
360360360360360
6224711769
1564226620
2465216712
7018682761
4937512858
3254345243
4055335335
5731483850
1212121212
360360360360360

If, now, we take any four numbers, in a square form, either from No 1. or No 2. (we suppose from No 1.) as in the margin, and add half the central number 12 to them, the sum will be 180; equal to half the numbers in any circular space taken above or below the double horizontal line, and equal to the number of degrees in a semicircle. Thus, 14, 72, 25, 63, and 6, make 180.

Among the eastern nations it seems to have been formerly common for the princes to have magicians about their court to confer with upon extraordinary occasions. And concerning these there hath been much disputation: some supposing that their power was only feigned, and that they were no other than impostors who imposed on the credulity of their sovereigns; while others have thought that they really had some unknown connexion or correspondence with evil spirits, and could by their means accomplish what otherwise would have been impossible for men. See the article MAGIC.