A Magic Square is an n×n matrix whose elements are non-negative integers, and the sum of the numbers in each row, column, and diagonal is a fixed integer. For example, here is a 3×3 Magic Square:
| 8 | 1 | 6 |
|---|---|---|
| 3 | 5 | 7 |
| 4 | 9 | 2 |
In this Magic Square, the Magic Sum is
. Here,
. Also, 
The Indian mathematician Srinivasa Ramanujan provided a formula for a 3×3 magic square. According to this formula, any 3×3 magic square can be written in the following format:
| C+Q | A+P | B+R |
|---|---|---|
| A+R | B+Q | C+P |
| B+P | C+R | A+Q |
Here,
are terms from an arithmetic progression, and
are terms from another arithmetic progression. For example:
| 2+6 | 1+0 | 3+3 |
|---|---|---|
| 3+0 | 2+3 | 1+6 |
| 1+3 | 3+6 | 2+0 |
Here, (
) = (
) and (
) = (
)
Now, Ramanujan’s magic square is as follows:
| 2Q+R | 2P+2R | P+Q |
|---|---|---|
| 2P | P+Q+R | 2Q+2R |
| P+Q+2R | 2Q | 2P+R |
Here,
will maintain the same ratio. As you can see, each
will produce a magic square whose magic sum is 
| 12 | 6 | 6 |
|---|---|---|
| 0 | 9 | 18 |
| 12 | 12 | 3 |
This is Ramanujan’s Magic Square!
***[I wrote a related article on Bangla Wikipedia. If you know better, please let me know. It will help improve the editing there.
http://bn.wikipedia.org/wiki/রামানুজনের_ম্যাজিক_স্কয়ার]***

magic square.