# How to create a magic square if we know a date. Eg-22-04-2014The first column should have 22 2nd-04 3rd-20 and 4th -14. I believe ramanujan created the same thing for his birthday but I don't know the method he used. Please help.

SHAIK AASIF AHAMED
askIITians Faculty 74 Points
9 years ago
Hello student,
Let the magic square be wherea,b,c,drepresents the date.

The conditions that the rows, columns, and diagonals sum toa+b+c+dgives us9linear equations for12variables. The resulting system has rank8.
Therefore, any solution can be obtained by taking a particular solution and adding a linear combination of12−8=4"basis vectors" for the nullspace of the system.

The matrix is a magic square with the correct top row.

The following4matrices form a basis of the nullspace of the system (all rows, cols, diags sum to0):

Take the first matrix and add any linear combination of the above four matrices to get a solution.
For example for 14-aug-2014 the magic squares will be
1stmatrix
014 008 020 014
022 023 006 005
008 024 003 021
012 001 027 016
2ndmatrix
014 008 020 014
022 023 005 006
001 018 010 027
019 007 021 009
3rd matrix
014 008 020 014
022 023 005 006
007 024 004 021
013 001 027 015
4th matrix
014 008 020 014
022 023 003 008
005 024 006 021
015 001 027 013