Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > Magic square


First Prev [ 1 2 3 ] Next Last

1.5 The Sagrada Família magic square

The Passion façade of the Sagrada Família church in Barcelona, designed by sculptor Josep Subirachs , features a 4×4 magic square:


The magic sum of the square is 33, the age of Jesus at the time of the Passion. Structurally, it is very similar to the Melancholia magic square, but it has had the numbers in four of the cells reduced by 1.

2 Types of magic squares and their construction

There are many ways to construct magic squares, but the standard (and most simple) way is to follow certain configurations / formulas which generate regular patterns. Magic squares exist for all values of n, with only one exception - it is impossible to construct a magic square of order 2. Magic squares can be classified into three types: odd, doubly even (n divisible by four) and singly even (n even, but not divisible by four). Odd and doubly even magic squares are easy to generate; the construction of singly even magic squares is more difficult but several methods exist, including the LUX method for magic squares (due to John Conway) and the Strachey method for magic squares. Only odd and doubly even magic squares are discussed below.

2.1 A method for constructing a magic square of odd order

Starting from the central column of the last row with the number 1, the fundamental movement for filling the squares is diagonally down and right, one step at a time. If a filled square is encountered, one moves vertically up one square, then continuing as before. When a move would leave the square, it is wrapped around to the first row or last column, respectively.

The same pattern can be achieved starting from the central column of the first row; In this case the fundamental movement is diagonally up and left, one step at a time, and if a filled square is encountered, one moves vertically down one square, then continuing as before. When a move would leave the square, it is wrapped around the last row or first column, respectively.

Similar patterns can also be obtained by starting from other squares.

Order 3Order 5Order 9

2.2 A method of constructing a magic square of doubly even order

All the numbers are written in order from right to left across each row in turn, starting from the top right hand corner. Numbers are then either retained in the same place or interchanged with their diametrically opposite numbers in a certain regular pattern. In the magic square of order four, the numbers in the four central squares and one square at each corner are retained in the same place and the others are interchanged with their diametrically opposite numbers. In the magic square of order eight, the same is done; the 16 central squares and 4 squares at each corner are retained in their places and the rest are switched.

A general rule: If n represents the order of the doubly even square, retain numbers in the following pattern. The central square with sides of legnth n/2 should be retained. Also retain the squares with sides of legnth n/4 in each of the four corners.


Order 8

3 Related Problems

3.1 Latin Squares

Euler showed how to derive magic squares from latin squares.

3.2 Magic Problems

Certain other restrictions can be imposed on magical squares, resulting, for example, in bimagic, trimagic and multimagic squares, and there are also other forms displaying similar characteristics, including magic circles, magic polygon s, and magic cubes.

3.3 n-Queens Problem

Paul Muljadi discovered and proved the n-Queens Problem is related to Magic squares because the Magic constant of n Queens Problem is also the Magic constant of Magic Squares of order n > 3.

In 1992, Demirörs, Rafraf, and Tanik published a method for converting some magic squares into N-queens solutions, and vice versa.

4 See also





Non User