Magic Square
A magic square of order n is an arrangement of n² numbers,
usually distinct integers, in a square, such
that the n numbers in all rows, all columns, and both diagonals sum to
the same constant. A normal magic square contains the integers from 1 to
n².
Normal magic squares exist for all orders n ≥ 1 except n = 2, although the case n = 1 is trivial as it consists of a single cell containing the number 1. The smallest nontrivial case, shown below, is of order 3:
The constant sum in every row, column and diagonal is called the magic constant or magic
sum, M. The magic constant of a normal magic square depends only on
n and has the value:
Method of Constructing Magic Squares of Order n:
Related Topic:
Method of Constructing Magic Squares of Order n:
Starting from the central column of the first row with the number 1, the
fundamental movement for filling the squares is diagonally up and right, one
step at a time. If a filled square is encountered, one moves vertically down one
square instead, then continuing as before. When a move would leave the square,
it is wrapped around to the last row or first column, respectively.
Related Topic: