Magic square
In mathematics, magic squares consist of a number of integers arranged in the form of a square in such a way that the sum of the numbers in every row, column and diagonal are the same. A magic square may have odd or even number of rows and columns. Usually the magic square is filled up by consecutive numbers from one to N2 where N is the number of rows or columns. A magic square is designated with reference to this. Thus a magic square of order N will have N number of rows and columns and will be filled by numbers ranging from one to N2.More formally, a magic square can be defined as an n-by-n matrix such that the sum of any row, column or main diagonal yields the same result (the square's magic constant, denoted M2(n)); if these numbers are 1, 2,..., n², then
The magic square figures in Greek writings dating from about 1300 BC and was used by Arabian astrologers in the ninth century when drawing up horoscopes.
The 4×4 magic square in Albrecht Dürer's engraving Melancholia I is believed to be the first seen in European art. The sum 34 can be found in the rows, columns, diagonals, any 2×2 block of numbers, the sum of the four corners, the sums of the four outer numbers clockwise from the corners (3 + 8 + 14 + 9) and likewise the four counter-clockwise, and the sum of the middle two entries of the two outer columns and rows (e.g. 5 + 9 + 8 + 12), as well as several kite-shaped quartets, e.g. 3 + 5 + 11 + 15; the two numbers in the middle of the bottom row give the date of the engraving: 1514.
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.
Euler showed how to derive magic squares from latin squares.
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 polygons, and magic cubes.
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.
Albrecht Dürer's magic square
A method of constructing a magic square of doubly even order
Related Problems
Latin Squares
Magic Problems
n-Queens Problem
See also
External links
References