A magic square is an arrangement of numbers(numbers in any pattern but the intervals must be same) in a NxN matrix with each number exactly occuring once and the sum of numbers in any row,anycolumn and any diagonal must be the same.
for example.. if u take numbers from 1 to 9 in a magic square the sum on any row ,any column and any diagonal will be 15.