A magic square is a square array of numbers 1, 2, 3, … , n2 arranged in such a way that the sum of each row, each column and both diagonals is constant.
The number n is called the order of the magic square.
As will be seen in later sections, the order of a magic square plays an important role in both the properties and the construction of squares. While it is obvious for reasons of symmetry that a distinction between even and odd orders makes sense, it turns out that, surprisingly, the even orders need to be further subdivided.
When considering properties and construction methods of magic squares, it is useful to categorize magic squares in three classes:
|odd order||the order is an odd number|
|( n = 3,5,7,9,11, … )|
|single-even||the order can be divided by 2, but not by 4|
|( n = 6,10,14,18,22, … )|
|double-even||the order can be divided by 4|
|( n = 4,8,12,16,20, … )|