<?xml version="1.0" encoding="UTF-8"?>

<record version="2" id="1626">
 <title>magic square</title>
 <name>MagicSquare</name>
 <created>2002-01-31 00:38:27</created>
 <modified>2005-03-03 18:17:41</modified>
 <type>Definition</type>
 <creator id="3" name="drini"/>
 <author id="3" name="drini"/>
 <classification>
	<category scheme="msc" code="05B15"/>
 </classification>
 <preamble>\usepackage{amsmath}</preamble>
 <content>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:
\begin{equation*}
\begin{pmatrix}
8 &amp; 1 &amp; 6\\
3 &amp; 5 &amp; 7\\
4 &amp; 9  &amp; 2
\end{pmatrix}
\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$.

One way to generalize this concept is to allow any numbers in the entries, instead of $1,2,\ldots,n$.</content>
</record>
