144 MAGIC SQUARES [CH. VII 



The reason for the rule is as follows. In the original formation 

 the sum of the numbers in the #th row is N— n 2 (re— 2oo+l)/2 and 

 the sum of those in the complementary row is N+ ri*(n — 2x + 1)/2. 

 Also the number in any cell in the ccth row is less than the 

 number in the corresponding cell in the complementary row by 

 n (n — 2x + 1). Hence, if in these two rows we make re/2 inter- 

 changes of the numbers in corresponding cells, we increase the 

 sum of the numbers in the a;th row by n x n (re — 2x + l)/2 and 

 therefore make that row magic ; while we decrease the sum of 

 the numbers in the complementary row by the same number, 

 and therefore make that row magic. Hence, if in every pair of 

 complementary rows we make n/2 such interchanges, the re- 

 sulting square will be magic in rows. Similarly for the columns, 

 the sum of the numbers in the ^th column is N — n (n— 2y +l)/2, 

 and the sum of the numbers in the complementary column is 

 N + (n — 2y + l)/2; also the number in any cell in the yth 

 column is less than that in the corresponding cell in the com- 

 plementary column by n — 2y + 1. Hence, if in these two 

 columns we make w/2 interchanges of numbers in corresponding 

 cells, we make these columns magic ; and if we do this for every 

 pair of complementary columns, the resulting square will be 

 magic in columns. But in order that the diagonals may, after 

 these interchanges, remain magic, we must leave the numbers 

 in their cells unaltered or reversed. 



The 2m interchanges we made of numbers in the skewly 

 related cells in a^ and c 4 , a 4 and c 1; b 2 and d 3 , b 3 and d 3 are 

 equivalent to making 2m interchanges in every column, and 

 reversing the diagonals. Hence it will make the square magic. 

 We might equally well have interchanged the cells in a^, a 3 , b lt b 4 , 

 with those skewly related to them in G and D. 



Bordered Squares. One other general method, due to 

 Frenicle, of constructing magic squares of any order should be 

 mentioned. By this method, to form a magic square of the reth 

 order we first construct one of the (n — 2)th order, add to every 

 number in it an integer, and then surround it with a border of 

 the remaining numbers in such a way as to make the resulting 

 square magic. In this manner from the magic square of the 



