Jump to content

Magic square

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Zundark (talk | contribs) at 14:44, 13 September 2002 (neater squares). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A magic square is an n-by-n matrix containing the numbers 1, 2,..., n2 such that the sum of any row, column or main diagonal yields the same result. All these sums are then necessarily equal to n × (n2 + 1) / 2.

The original magic square is the 3×3 one:

8 1 6
3 5 7
4 9 2

Magic squares of odd order can be constructed by starting in the middle of the top row and going up and to the right, considering the edges joined, or if that is already occupied, going down, writing consecutively increasing numbers. The 5×5 square so constructed looks like this:

17  24   1   8  15
23   5   7  14  16
 4   6  13  20  22
10  12  19  21   3
11  18  25   2   9