You are on page 1of 9

CHAPTER 1

Magie Squares

The origin of Chapter 1 probably is found in Ramanujan’s early school days


and is therefore much earlier than the remainder of the notebooks. Rules for
constructing certain rectangular arrays of natural numbers are given. Most of
Ramanujan’s attention is devoted to constructing magie squares. A magie
square is a square array of (usually distinct) natural numbers SO that the sum
of the numbers in each row, column, or diagonal is the same. In some
instances, the requirement on the two diagonal sums is dropped. In the
notebooks, Ramanujan uses the word “corner” for “diagonal.” We emphasize
that the theory of magie squares is barely begun by Ramanujan in Chapter 1.
Considerably more extensive developments are contained in the books of
W. S. Andrews [l] and Stark [ 11, for example.
Ramanujan commences Chapter 1 with the following simple principle
for constructing magie square& Consider two sets of natural numbers
S, = {A, B, C, . ..} and S, = (P, Q, R, . ..}. each with n elements. Take the n2
numbers in the direct sum S, + S, and arrange them in an n x n square SO
that each letter appears exactly once in each row, column, and diagonal.
Clearly, we have then constructed a magie square. Of course, some numbers
may appear more than once.
In Corollary 1, Ramanujan states the trivial fact that if A + P, A + Q,
A + R, . . . are in arithmetic progression, then B + P, B + Q, B + R, . . . are also
in arithmetic progression.
In Corollary 2, Ramanujan remarks that if A + P, A + Q, A + R, A + S, . . .
are known and also B + P is given, then we cari determine B + Q, B + R,
Il+s, . . . . This is clear, for B-A is thus known, and we may Write
B + Q = (B - A) + (A + Q), etc.
Ramanujan informs us that in constructing a magie square, we should not
give values to A, B, C, . . and P, Q, R, . . . . but instead values should be
1. Magie Squares 17

a s s i g n e d t o A + P , A + Q , A + R ,.... The reason for this advice is not clear,


for in either case 2n parameters need to be prescribed.

Example 1. Given that A+P=S, B+P=lO, C+P=ll, D+P=14, and


C+R=25,jndA+R,B+R,andD+R.

Solution. Since R - P = 14, then A + R = (A + P) + (R -. P) = 22. Similarly,


B+R=24and D+R=28.

E x a m p l e 2 . G i v e n A+P=5, A+Q=7, A+S=17, B+Q=23, a n d


B+R=26,findA+R,B+P,andB+S.

Solution. Note that B - A = 16. Hence, A + R = - 16 + 26 = 10, B + P = 21,


and B f S = 33.

Entry 2(i). Let m, and m2 denote the sums of the middle row and middle column,
respectively, of a 3 x 3 square array of numbers. Let c1 and c2 denote the sums
of the main diagonal and secondary diagonal, respectively. Lastly, let S denote
the sum of a11 nine elements of the square. Then tfx denotes the tenter element of
the square,
x = $(m, + m2 + c1 + c2 -S).

Proof. Observe that


m,+m,+c,+c,=S+3x,
since x is counted four times on the left side. The result now follows.

Entry 2(ii). Suppose that the sum of each row and column is equal to r. Then, in
the notation of Entry 2(i),
x = +(c, + c2 - r).

Proof. By Entry 2(i).


x=‘j(r+r+c,+c,-3r)=+(cI+c,-r).

Note that if the square is magie, then Entry 2(ii) implies that x = r/3, and SO
r is a multiple of 3.

Corollary 1. In a 3 x 3 magie square, the elements in the middle row, middle


column, and each diagonal are in arithmetic progression.

Proof. In each case, the second element is equal to r/3 by the remark above. If
a and b are the first and third elements, respectively, in any of the four cases,
then
a + r/3 + b = r.
18 1. Magie Squares

Hence,
b - r/3 = r/3 - a,
i.e., the three numbers are in arithmetic progression.

Example 1. Construct magie squares with (i) r = 15, and (ii) Y = 27 and a11
numbers odd.

Solutions.

Dl
15 1 11

5 9 13

7 17 3

Example 2. Construct magie squares with (i) r = 36 and a11 elements even, and
(ii) r = 63 and a11 elements divisible by 3.

Solutions.

Ramanujan begins Section 4 with a general construction for a 3 x 3 magie


square:

For this square to actually be magie,it is easily seen that A, B, C and P, Q, R


must each be arithmetic progressions. Adjacent to the square above, there is
an unexplained 4 x 4 square partially filled with the marks A, V, and x .
1. Magie Squares 19

Example l(i). Construct a 3 x 3 square with a11 row and column sums equal to
19 but with only one diagonal sum equal to 19.

Solution.

Example l(ii). Construct a 3 x 3 square with a11 row and column sums equal to
31 but with dnly one diagonal sum equal to 31. Ramanujan also requires that a11
the elements be odd, but the example that he gives does not satisfy this criterion.

Solution.

Example 2(i). Construct a 3 x 3 square with a11 row and column sums equal to
20 and diagonal sums equal to 16 and 19.

Solution.

Example 2(ii). Construct a square with diagonal sums 15 and 19, column sums
16, 17, a n d 12, a n d r o w sums 6, 21, a n d 18.

Solution.
20 1. Magie Squares

In Section 5, Ramanujan turns his attention to the construction of certain


rectangles which he calls “oblongs.” First, he gives the following general
construction of a 3 x 4 rectangle with equal row sums and with equal column
sums:

In order for this rectangle to satisfy the designated specifications, we need to


require that A + C = 2B + 30. The common row sum Will then be equal to
A + C + 2B + 9D. Adjacent to the rectangle displayed above, there appears an
unexplained 3 x 4 rectangle filled with the symbols A, v , and x .

Example. Construct 3 x 4 rectangles where the average of the elements in each


row and column is equal to (i) 8, and (ii) 15 with a11 numbers odd.

Solutions.

El
1 13 3 15

11 9 1 5

12 2 14 4

Observe that the requirement of average row and column sums in a


rectangle is the correct analogue of equal row and column sums in a square.
Section 6 is devoted to the construction of 4 x 4 magie squares. Raman-
ujan begins with the easily ascertained equality,
sum of middle 4 elements = $(sum of diagonals
+ sum of middle rows
+ sum of middle columns - total sum),
except that Ramanujan has the wrong sign on the left side.

Entry 6(ii). Construct a magie square by letting S, = {A, B, C, D} and


S, = {P, Q, R, S> and considering SI + Sz.
1. Magie Squares 21

AS-P D+S C+Q B+R A+P D+Q D+R A+S

C+R B+Q A + S D+P B-CS C+R C + Q B+P

BS-S CfP D + R A + Q c+s B+R B+Q C+P

D+Q A+R B+P c + s D+P A+Q A+R D+S

There are no restrictions on the elements in the first square, but in the
second we need to require that A + D = B + C and P + S = Q + R.
In a note, Ramanujan remarks “If A + D = B + C and P + R = Q + S the
extreme middle four in the first square also satisfy the given condition.” “The
extreme middle four” is not defined by Ramanujan, but presumably they are
the four middle squares which, in fact, have been blocked out by Ramanujan.
But then the hypotheses A + D = B + C and P + R = Q + S are not needed!

Example 1. Construct 4 x 4 magie squares with common sums of 34, 34, ad 35.

Solution.

Al1 three examples are instances of the first general construction described
above. A table of parameters for these three examples as well as the next two
examples is provided below.

Example A B C D P Q R S

la 1 5 9 13 0 2 3 1
lb 1 3 7 5 0 8 1 9
lc 1 5 9 14 0 2 3 1
2a 1 5 25 29 0 2 3 1
2b 9 13 17 21 0 2 3 1
22 1. Magie Squares

Example 2. Construct two 4 x 4 magie squares with common sums of 66.

Solution.

Example 3. Construct two 3 x 3 magie squares with common sum 60.

Solution.

Ramanujan commences Section 7 by correctly asserting that a magie


square of m rows cari be formèd from magie squares of n rows when nJm,
except in one case. This case is when m = 6 and n = 3. In this instance, each of
the four magie squares of three rows must have the same common sum r. The
tenter element in each square is then r/3, contradicting the requirement that
the elements be distinct. However, 6 x 6 magie squares cari be constructed
from 3 x 3 squares if the requirement that the diagonal sums be the same as
the row and column sums is relaxed in the construction of the four 3 x 3
squares.
Ramanujan now gives two examples of 8 x 8 magie squares. The first is
constructed from four 4 x 4 magie squares, while the second is not.
1. Magie Squares 23

Ramanujan begins Section 8 by once again enunciating the method for


constructing magie squares described in Sections 1, 3, and 6. He ‘offers two
general constructions of 5 x 5 magie squares; namely

There are no restrictions on the parameters in the first square, but in the
second, the condition A + B + D + E = 4C must be satisfied.

Example 1. Construct 5 x 5 magie squares with common sums of 65 and 66.

Solution.

The first magie square arises from the second general construction and,
according to W. S. Andrews [ 1, p. 21, is a very old magie square. The second is
a consequence of the first general method. The parameters may be chosen by
24 1. Magie Squares

taking P=O, Q=l, R=2, S=3, T=4, A=l, B=6, C=il, 0=16, and
E = 21, 22, respectively.

Example 2. Construct 7 x 7 magie squares with common sums o f 170 a n d 1 7 5 .

Solution.

1 26 45 15 41 12 30

40 32 24 16 8 7 48

You might also like