Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

A Magic Square of order $n$ is an arrangement of $n^2$ 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 3x3 magic square

How to prove that a normal $3\times 3$ magic square must have $5$ in its middle cell?

I have tried taking $a,b,c,d,e,f,g,h,i$ and solving equations to calculate $e$ but there are so many equations that I could not manage to solve them.

share|improve this question
as this question has hit the hot list, a definition of a magic square would be helpful. –  hildred Jan 13 '14 at 13:46
It's also worth pointing out that this question only applies to normal magic squares (i.e. 1...n). The general magic square might not have a 5 in it at all, let alone in the center. –  Bobson Jan 13 '14 at 14:46
@ArchismanPanigrahi I don´t think so. This comment will self destruct. –  hildred Jan 13 '14 at 15:43

2 Answers 2

up vote 36 down vote accepted

The row, column, diagonal sum must be $15$, e.g. because three disjoint rows must add up to $1+\ldots +9=45$. The sum of all four lines through the middle is therefore $60$ and is also $1+\ldots +9=45$ plus three times the middle number.

share|improve this answer
How so for the diagonal sums? –  alexis Jan 13 '14 at 10:31
@alexis: The diagonal sums have to be equal to the row sums, which have to be equal to 15. –  user2357112 Jan 13 '14 at 11:03
Oh, by the problem statement you mean... got it. –  alexis Jan 13 '14 at 11:06

The common sum must be $15$, because the sum of numbers from $1$ to $9$ is $45$. How can we write $15$ as sum of three distinct numbers between $1$ and $9$ (included)?

\begin{gather} 1+5+9 \\ 1+6+8 \\ 2+4+9 \\ 2+5+8 \\ 2+6+7 \\ 3+5+7 \\ 3+4+8 \\ 4+5+6 \end{gather}

We have just eight ways and we can try accommodating them in the square. The central place belongs to one row, one column and the two diagonals, so the number we put in it must appear four times in the above sums: the only one is $5$.

Similarly, in the four corners we have to place numbers that appear three times, that is: $2$, $4$, $6$ and $8$.

This also shows that basically only one $3\times3$ magic square is possible, up to symmetries of the square.

How to compose the magic square? First note how many rows, columns and diagonals each cell belongs to:

enter image description here

Now we know that $5$ must be in the center; choose arbitrarily an even number, say $2$ and place it in a corner. It could go in any corner, let's choose the upper left one; in the opposite corner we have to write $8$:

enter image description here

Now $4$ must go in one of the other corners and $6$ in the opposite one:

enter image description here

At this point, the other cells can be filled in a unique way:

enter image description here

We have four choices for placing $2$ and, for any choice we can choose two places for $4$. In total we have eight magic squares, but just one if we consider two of them identical after applying a symmetry of the square (there are eight of them).

If we subtract $5$ to each cell, we can better see the symmetry:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.