PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Revision difference : magic square
Version current Version 1
A magic square of order $n$ is an $n\times n$ array using each one of the numbers $1,2,3,\ldots,n^2$ once and such that the sum of the numbers in each row, column or main diagonal is the same. A magic square of order $n$ is an $n\times n$ array using each one of the numbers $1,2,3,\ldots,n^2$ once and such that the sum of the numbers in each row, column or main diagonal is the same.
Example: Example:
\begin{equation*} \begin{equation*}
\begin{pmatrix} \begin{pmatrix}
8 & 1 & 6\\ 8 & 1 & 6\\
3 & 5 & 7\\ 3 & 5 & 7\\
4 & 9 & 2 4 & 9 & 2
\end{pmatrix} \end{pmatrix}
\end{equation*} \end{equation*}
It's easy to prove that the sum is always $\frac{1}{2}n(n^2+1)$. So in the example with $n=3$ the sum is always $\frac{1}{2}(3\times 10)=15$. It's easy to prove that the sum is always $\frac{1}{2}n(n^2+1)$. So in the example with $n=3$ the sum is always $\frac{1}{2}(3\times 10)=15$.
One way to generalize this concept is to allow any numbers in the entries, instead of $1,2,\ldots,n$.