MAGIC (Magice, Jbla ι yι∕α), in its ancient sense, the science or discipline and doctrine of the Magi, or wise men of Persia.

The origin of magic and the magi is ascribed to Zoroaster. Salmasius derives the very name from Zoroaster, who, he says, was surnamed Mag, whence Magus. But others, instead of making him the author of the Persian philosophy, [7:13:680]represent him only as the restorer and improver thereof, alleging, that many of the Persian rites in use amongst the Magi were borrowed from the Zabii or Chaldaeans, who agreed in many things with the Magi of the Persians; and hence some make the name Magus common both to the Chaldaeans and Persians. Thus Plutarch mentions, that Zoroaster instituted Magi amongst the Chaldaeans, in imitation of which the Persians had also theirs.

Magic, in a more modern sense, is a science which teaches to perform wonderful and surprising feats, or to produce unexpected effects.

The word magic originally carried with it a very innocent, nay, laudable meaning, being used purely to signify the study of wisdom, and the more sublime parts of knowledge; but as the ancient Magi engaged themselves in astrology, divination, sorcery, and the like, the term magic became in time odious, and was only used to signify an unlawful and diabolical kind of science, depending on the assistance of the devil and departed souls.

If any wonder how so vain and deceitful a science should ever have gained credit and authority over men’s minds, Pliny solves the mystery. It is, says he, because it has possessed itself of three sciences in the most esteem amongst men, taking from each all that is great and marvellous in it. Nobody doubts but it had its origin in medicine; and that it insinuated itself into the minds of the people, under pretence of affording extraordinary remedies. To these fine promises it added every thing in religion that is pompous and splendid, and that appears calculated to blind and captivate mankind. Lastly, it mingled with the rest judicial astrology, persuading people, curious of futurity, that it saw every thing to come in the heavens. Agrippa divides magic into three kinds; natural, celestial, and ceremonial or superstitious.

Natural Magic is no more than the application of natural active causes to passive subjects, by means of which many surprising, but yet natural, effects are produced.

In this way many of our experiments in natural philosophy, especially those of electricity, optics, and magnetism, have a kind of magical appearance, and amongst the ignorant and credulous might easily pass for miracles. Such, without doubt, have been some of those miracles wrought by ancient magicians, whose knowledge of the various powers of nature, there is reason to believe, was much greater than modern vanity will sometimes allow.

Baptista Porta wrote a treatise of natural magic, or secrets for performing extraordinary things by natural causes. The natural magic of the Chaldaeans was nothing but the knowledge of the powers of simples and minerals. The magic which they called theurgia consisted wholly in the knowledge of the ceremonies to be observed in the worship of the gods, in order to be acceptable. By virtue of these ceremonies they believed they could converse with spiritual beings, and cure diseases.

Celestial Magic borders nearly on judicial astrology. It attributes to spirits a kind of rule or dominion over the planets, and to planets a dominion over men; and on these principles builds a ridiculous kind of system.

Superstitious Magic consists in the invocation of devils. Its effects are usually evil and wicked, though very strange, and seemingly surpassing the powers of nature, being supposed to be produced by virtue of some compact, either tacit or express, with evil spirits; but the truth is, these have not all the power which is usually imagined, nor do they produce those effects which are ordinarily ascribed to them.

This species of magic, there is every reason to believe, had its .origin in Egypt, the native country of paganism. The first magicians mentioned in history were Egyptians; and that people, so famed for early wisdom, believed not only in the existence of demons, the great agents in magic, but also that different orders of those spirits presided over the elements of earth, air, fire, and water, as well as over the persons and affairs of men. Hence they ascribed every disease with which they were afflicted to the immediate agency of some evil demon. When a person was seized with a fever, for instance, they did not think it necessary to search for any natural cause of the disease; it was immediately attributed to some demon which had taken possession of the body of the patient, and which could not be ejected but by charms and incantations.

These superstitions notions having spread from Egypt over all the East, the Jews imbibed them during their captivity in Babylon. Hence we find them in the writings of the New Testament attributing almost every disease to which they were incident to the immediate agency of devils. Many of the same·impious superstitions were brought from Egypt and Chaldaea by Pythagoras, and transmitted by him and his followers to the Platonists in Greece. This is apparent from the writers of the life of Pythagoras. Jamblicus, speaking of the followers of that philosopher, says expressly that they cured certain diseases by incantations; and Porphyry adds, that they cured diseases both of the mind and of the body by songs and incantations. This was exactly the practice of the Egyptian priests, who were all supposed to keep up a constant intercourse with demons, and to have the power of controlling them by magical charms and sacred songs. Agreeably to this practice of his masters, we are told that Pythagoras directed that certain diseases of the mind, doubtless those which he attributed to the agency of demons, should be cured partly by incantations, partly by magical hymns, and partly by music.

It was the universal belief of the ancient nations, says the learned Mosheim, and especially of the orientals, that certain sounds and words, for the most part barbarous, were highly grateful, and that others were equally disagreeable, to these spirits. Hence, when they wished to render a demon propitious, and to employ him on any particular office, the magicians composed their sacred songs of the words which were believed to be agreeable to him; and when it was their intention to drive him from themselves or others, they sung in a strain which they fancied a demon could not hear but with horror. From the same persuasion arose the custom of suspending from the neck of a sick person, whose disease was supposed to be inflicted by a demon, an amulet, sometimes made of gold and sometimes of parchment, on which was written one or more of those words which demons could not bear either to hear or to see; and in a didactic poem on the healing art, still extant, we are taught by Serenus Sammonicus, that the word Abracadabra is an infallible remedy for a semitertian fever or ague; and to banish grief of heart, Marcellin us thinks nothing more effectual than the word %αg∕- ayaωμ. In more modern times, as we are informed by Agrippa, the words employed by those in compact with the devil, to invoke him, and to succeed in what they undertake, are, Dies, mies, jesquet, benedoefet, douvima, enite-maus. There are a hundred other formulas of words composed at pleasure, or gathered from several different languages, or patched from the Hebrew, or formed in imitation of that language. And amongst the primitive Christians there was a superstitious custom, of which we suspect some remains may yet be found amongst the illiterate vulgar in different countries, of fastening to the neck of a sick person, or to the bed upon which he lay, some text from the New Testament, and especially the first two or three verses of the Gospel of St John, as a charm undoubtedly efficacious to banish the disease.

The revival of learning, and the success with which the laws of nature have been investigated, have long ago banished this species of superstition from all the enlightened nations of Europe.
[7:13:681]

Magic Square, a square figure, formed of a series of numbers in mathematical proportion, so disposed in parallel and equal ranks, 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, the square number, inclusive) be disposed in their natural order after each other in a square figure of twenty-five cells, each in its cell; if now you change the order of these numbers, and dispose them in the cells in such manner 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 disposition of numbers is called a magic square, in opposition to the former disposition, which is called a natural square. See the figures following.
[table]
[table]

One would imagine that these magic squares had that name given them because 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 further, by the superstitious operations they were employed in, as the construction of talismans, and the like; for, according to the childish philosophy of those days, which attributed virtues to numbers, what virtue might not be expected from numbers which appeared so wonderful?

However, what was at first the vain practice of makers of talismans and conjurers, has since become the subject of serious research amongst mathematicians; not that they imagine it will lead them to any thing of solid use or advantage (magic squares savour too much of their original to be of any great 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 discovering.

Moschopulus, a Greek author of no great antiquity, is the first who appears to have spoken of magic squares; and, by the age in which 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 Cornelius 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 these seven numbers were preferred to all the others without some very good reason. In effect, it is because their squares, according to the system pf Agrippa and his followers, are planetary. The square pf 3, for instance, belongs to Saturn; that of 4 to Jupiter; that of 5 to Mars; that of 6 to the Sun; that of 7 to Veius; that of 8 to Mercury; and that of 9 to the Moon. Bachet applied himself to the study of magic squares, on he hint which he had taken from the planetary squares of ⅜grippa, as being unacquainted with the work of Moschopulus, which is only in manuscript in the French king’s library; and, without the assistance of any author, he found out a new method for those squares whose root is uneven, for instance twenty-five, forty-nine, &c. but he could not make any thing of those whose root is even.

After him came Frenicle, who took the same subject in hand. A certain great algebraist was of opinion, that whereas the sixteen numbers which compose the square might be disposed 20922789888000 different ways in a natural square (as from the rules of combination it is certain they may), they could not be disposed in a magic square above sixteen different ways; but Frenicle showed that they might be thus disposed 878 different ways; and hence it appears how much his method exceeds the former, which only yielded the fifty-fifth part of magic squares of that of 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 forty-nine 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 twenty-five cells. Now it is not at all surprising that the square should be no longer magical, because the ranks of the large ones were not intended 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 expected that their remainders will not any longer make the same sum. But Frenicle would not be satisfied, unless, when the circumference or border of the magic square was taken away, and even any circumferences 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 several 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. 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, Poignard, a canon of Brussels, published a treatise of sublime magic squares. Before him there had been no magic squares constructed but for series of natural numbers that formed a square; but Poignard made two very considerable improvements. Instead of taking all the numbers that fill a square, for instance, the thirty-six 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 the side of the square, which, in this case, are six; and these six numbers alone he disposes in such manner in the thirty-six 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 Poignard calls repeated progression. 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.

The book of Poignard gave occasion to Μ. 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 [7:13:682]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 Μ. de la Hire reserves these for the last. This excess of difficulty may arise partly from this, 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.

Μ. de la Hire proposes a general method for uneven squares, which has some similitude to 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 Μ. 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 forty-nine cells are to be filled magically with numbers, for instance the first 7; Μ. de la Hire, on the one side, takes the first seven numbers, beginning with unity, and ending with the root 7, and on the other, 7, and all its multiples to forty-nine exclusively; and as these only make six numbers, he adds 0, which makes this an arithmetical progression of seven terms as well as the other, viz. 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 he 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 in which 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.
[table]

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 modes of constructing the magic square of seven numbers repeated.
[table]
[table]

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 diagonal* would be false according to these 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 in which 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 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, or 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, or 3, does divide 9. The reason of this rule will appear very evident, 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 numerous are the different modes of constructing it; 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.
[7:13:683]

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 corresponding parallel, which has the number of cells by which the other alls short of the diagonal, the numbers of these 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.
[table]

All that we have hitherto said regards only the first primitive square, whose numbers, in the proposed example, were , 2, 3, 4, 5, 6, 7; there still remains the second primitive, whose numbers are 0, 7, 14, 21, 28, 35, 42. Μ. de la Hire proceeds in he same manner here as in the former case; and this may likewise be constructed in 20,160 different nodes, 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 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 forty-nine 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 amongst 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 a manner 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.
[table]

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 aerially does; each number of the first square may be combined once, and only once, by addition with all the numbers of the second. 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, 18, 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 the perfect magic square proposed.
[table]

The necessity of constructing the two primitive squares in a different manner does not at all prevent each of the 20,160 constructions of the one from being 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 forty-nine numbers of the natural progression. But as we have already observed that a primitive square of seven numbers repeated 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 forty-nine first numbers.

As to the even squares, Μ. de la Hire 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 seems scarcely 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, or 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.

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. The details are not, however, of such importance as to require particular notice in this place.