You are on page 1of 8

Solution of the General Magic Square

Author(s): Jack Chernick


Source: The American Mathematical Monthly, Vol. 45, No. 3 (Mar., 1938), pp. 172-175
Published by: Mathematical Association of America
Stable URL: http://www.jstor.org/stable/2302981
Accessed: 27-01-2016 21:34 UTC

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at
http://www.jstor.org/page/ info/about/policies/terms.jsp

JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of
content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of
scholarship. For more information about JSTOR, please contact support@jstor.org.

Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to The American
Mathematical Monthly.

http://www.jstor.org

This content downloaded from 128.6.218.72 on Wed, 27 Jan 2016 21:34:21 UTC
All use subject to JSTOR Terms and Conditions
172 SOLUTION OF THE GENERAL MAGIC SQUARE [March,

SOLUTION OF THE GENERAL MAGIC SQUARE


JACK CHERNICK, Universityof Chicago
1. Introduction.The general magic square may, perhaps, be best described by
its diagram:
|a, 1 al 2 al n-1
al n
a2 1 a2 2 a2 n-1 a2n l

an- 1 an- 2 an- n-1 an n

an1 an2 ___ an~n- n

The symbol ars is employed to designate the cell in the rthrow, sth column.
A square of the nth order is thus seen to consist of n2cells. The conditionsfora
general magic square are simply that the a's denote any algebraic quantities
whose sum, in any row, column or either major diagonal, adds to the same
number*.
If, in particular,the a's consist of the consecutive integersfrom1 to n2, we have
the case of the "ordinary" magic square. Although the latter problem
presentsmany difficulties,the formeris relatively simple, and, indeed, a con-
structionforits general solution,if n > 5, will be given in the presentpaper. The
cases n = 3 and 4, however, which do not fit this construction,are treated
separately.
Consideringa square of the nth order,then,we find2n+2 linear conditions
involving n2 quantities. That at most 2n conditions are independentis, more-over,
easily shown. For, if we denote by S the sum of all the a's, it is obvious that if
theirsum in n -1 separate rows or columns is always S/n, the sum in the
remainingrow or column will be S/n. Thus the complete solution of the general
magic square should involve at least n2 - 2n arbitraryconstants. It will be found
that exactly that number are involved.
2. The thirdorder magic square. This order possesses the propertythat, if we
denote by S the sum of any row, then the center cell a2 2 equals S/3. To prove
this, note that
a, 1 + a2 2 + a3 3 = S, a2 1 + a2 2 + a2 3 = S, a3 1 + a2 2 + al 3 = S)
and
a1 1 + a2 1+ a3 1 = S, a3 3+ a2 3+ al 3 = S.
*
On occasion the diagonal properties have been dispensed with. Thus see D. N. Lehmer,
Transactions of the American Mathematical Society, vol. 31, 1929, pp. 529-551.

This content downloaded from 128.6.218.72 on Wed, 27 Jan 2016 21:34:21 UTC
All use subject to JSTOR Terms and Conditions
1938] SOLUT1ON OF THE GENERAL MAGIC SQUARE 173

Hence by adding the firstthreeequations and subtractingthe last two we have


3a2 2 S.

If we now take a, 1,a2 2, a, 3 equal to k+a, k, k+b respectively,we obtain the


solution
k+ a k-a-b k+ b
(I) k-a + b k k + a-b
k-b k+ a+ b k-a

The latteris the generalformula,since the quantities a1 1,a2 2, al 3 are perfect-ly


arbitrary,and the conditions on the remainingcells are both necessary and
sufficientfor a solution.
It is noteworthythat the solution (I) is unaltered (aside fromrotation and
reflexion)by the substitutionof -a fora, or of -b forb, or by the interchange of a and
b. Hence we shall regarda _ b, where both are positive. Thus k+a+b is always the
largest, k-a-b the smallest number in the set (I). For example, if n = 3, the
ordinarymagic square consists of the numbers1 to 9 inclusive. Then we must have

k+a+b=9, k-a-b= 1.
Whence k=5, a=3, b= 1, yielding as the only ordinary magic square of the
thirdorder

8 1 6
3 5 7
4 9 2

3. The fourthorder magic square.


The characteristicpropertyof this order is that if S denotes the sum of any row,
then the sum of the fourcentral elements is S; that is,
a2 2 + a2 3 + a3 2 + a3 3 = S.

The proof follows that given in section 2.


If now we take a, 1,a1 2, a13, a2 1, a2 2, a2 3, a3 2, a3 3 arbitrary,we again findthat
the necessary conditions on the remainingcells will also prove sufficientfora
solution; which will thereforebe the general one. For simplicity,we write these
a's as A -a, C+a+c, B+b-c, D+a-d, B, C, A, D respectively,to obtain

A-a C+ a+ c B + b-c D-b


(II) D+a-d B C A-a+d
C-b+d A D B+b-d
B+b D-a-c A-b+c C+a
This content downloaded from 128.6.218.72 on Wed, 27 Jan 2016 21:34:21 UTC
All use subject to JSTOR Terms and Conditions
174 SOLUTION OF THE GENERAL MAGIC SQUARE [March,

This formula was firstgiven by E. Bergholt,*who attempted to prove it general


by an argumentsimilar to that given in the last paragraph of section 1. However,
he stated withoutproofthat the 8 conditions involved in this general magic square
are independent.
4. The higher order magic squares. For the general magic square of the nth
order,n>4, we constructthe followingdiagram:
2 n-2 n-1
a, i al al 3 a, v-, a, v a, v+i al al al nf
a2 1 a2 2 a2 3 a2 v-1 a2 v a2 v+1 a2 n-2 a2 n-lb

a3 1 a3 2 a3 3 a3 v-1 a3v av+1i a3 n-2 a3 n-1 b2

(III1) I I I I I I I I I I I
I I I I I I I I I I
an-21 an-2 2 an-2 v-i
an-3 3 an-2 v an-2 v+1 an2 n-2 an-2 n-, bn_3

an-1 2 an-, v+i an-1 n-2 an-1 n-1 bn-1


b2n_2 an-1 3 an_1v-1 b2n-1

b2n-3 b2n_4 b2n5 _ b2n_v-lb2n b2nv_2 bn+l bn bn..2

Let
Ri = the sum of the a's in the ith row,
Ci = the sum of the a's in the ith column,
D= n-1
i arr,
= n-1
D2
1
ar n-r+

S = the sum of all the a's,


the a's being arbitrary,and the b's being definedas follows:
b- = R,- R2, b2n-v_2 R -Cv+li

b2 = R,- R3, b2n_v_- R1 -Cv-


........ ..........

(IV) bn-3 = R- Rn-2 b2n_4- R- C2,

(Rbn_2 = - D1, b2n - -

R,-D2
n-2
bn_-=-Ri-Cn- 2jbil - RI - C -b2n-3
b2n_2
bn = R1-Cn-1 b2n_-1 R1 -Rn-1 b-n-1 b2n-2,
bn+l =R - Cn-2 = R- Cv- -2n-l
b2n

*
Nature, vol. 83, 1910, p. 368.

This content downloaded from 128.6.218.72 on Wed, 27 Jan 2016 21:34:21 UTC
All use subject to JSTOR Terms and Conditions
1938] SOLUTION OF THE GENERAL MAGIC SQUARE 175

We note firstthat in this constructionb2n_1is to occupy any cell in the n- 1st row
up to but not includingeitherdiagonal. Such an arrangementis impossible in the
cases n < 4, and the latter were hence excluded.
Now by definition(IV), the square (III) will be magic if the lone condition,
bn_2+ bn+ bn+l + + b2n_3+ b2 n = Ri,
is satisfied.
We may write
n-2
D1 +
bn-1= R - (n- 2)R1 = DI + S - R_-(n - 2)R1 -Cn
b2n_2 = D2- C,

b2,_l = (n- 1)R1 + C1 + Cn -D1 - D2- S


b2n = D1 + D2 - C1 -Cv -Cn- (n- 2)R1 + S.

Then, substitutingin the left-handmemberand combiningterms,we have

Ri- (C + C2 + + C) + S.
But
C + C2 +* + = S.
C.

Hence the square is magic and (III) is the general solution.


As an illustration,our solution, for n 5, may be diagrammed as

b8~~~~~b
b8 bg bN
b7 b6 b1o b5 b3

When arbitrary numbers are inscribed in the blank cells, the b's are im-
mediately determined,if they are taken in the order indicated by their sub-scripts;
and the resultingsquare will be magic. The method thus has the merit of
yieldingquickly magic squares of any desired order.
Note by the Editor. For additional work on magic squares, the reader may
referto A. L. Candy's Construction,classificationand census of magic squares of
even order,which was reviewed in this MONTHLY, vol. 44, 1937, page 528.

This content downloaded from 128.6.218.72 on Wed, 27 Jan 2016 21:34:21 UTC
All use subject to JSTOR Terms and Conditions

You might also like