Sunday, November 07, 2010

Magic square

A magic square of order n is an arrangement of n2 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 n2.



So let's look at a 3x3 magic square . You should write the numbers 1 to 9 in a square, so that the sum of the rows, the columns, and the diagonals is 15.

I'll show you a trick to solve magic square with odd length.

The first step is to draw squares up, down, left and right as shown. The second step is to enter numbers 1-9, starting from the top and moving it down-right (every second diagonal).



The final third step is to switch the numbers that are outside of the initial square in the following way:
number from the top must be entered into a free space at the bottom of the square,
number from the left must be entered into the gap on the right and so on...
Look at the picture, it's more understandable. :)



Let's look at a 5x5 magic square and how to enroll additional squares.






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:
M = (n3 + n) / 2

Remember, this method can only solve the magic square of any odd-sized lengths (3,5,7,9...)

Cheerful greetings to all until next time! ;)

3 comments:

  1. Hey That makes Magic Squares solving very interesting! Is there a similar way to solve the Rubiks cube or the Vedic Maths Square?

    ReplyDelete