The word Magic in Mathematics will attracts every one.
The magic square is an arrangement of numbers in a square grid such that sum of numbers in each row, column and diagonal will obtain the same result.
The sum which is obtained is called magic constant or magic number.
It is possible to construct a normal magic square of any size exept 2*2.
Mathematical formula to obtain magic constant:(SumOfNumbers/NumberOfRows)
R - number of rows or column.
N - total number of blocks =R*R.
steps to be followed to obtain the magic square.
*First number in the magic square should be inserted in the middle block of first row.
*Next insertion is to be made in a block as indicated by the arrows in the above figure.(5*5)
*Insert the remaining numbers by following the indication.
*By following the above procedure, if you get a block which is already inserted then insert the number below that block.
*Follow the above procedure to obtain complete magic square.
We can obtain magic square numbers by using simple mathematical formula.
Formula to obtain Ith row and Jth column number:
=n ( ( I+J-1+ ( n/2 ) mod n ) +( ( I+2*J-2 ) mod n ) +1
Try this out
let us consider a magic square of order n=3
let I=1 J=1
=n ( ( I +J-1+ ( n/2 ) % n ) +( ( I+2J-2 ) % n ) +1
=3 ( ( 1+1-1+ (3/2 )%3 )+ ( ( 1 + 2*1 - 2)%3 ) + 1
=3(2) + 1 + 1
Hope you like :)