# Definition:Magic Square

## Definition

A magic square is an arrangement of $n^2$ numbers into an $n \times n$ square array such that:

the sum of the elements of each row
the sum of the elements in each column
the sum of the elements along each diagonal

are the same.

When the elements are not specified, it is conventional for them to be the first $n^2$ (strictly) positive integers.

### Order

An $n \times n$ magic square is called an order $n$ magic square.

### Magic Constant

The magic constant of a magic square is the number that each of the rows and columns adds up to.

## Examples

### Order $1$

The Order $1$ magic square is trivial:

$\begin{array}{|c|} \hline 1 \\ \hline \end{array}$

### Order $3$

$\begin{array}{|c|c|c|} \hline 2 & 7 & 6 \\ \hline 9 & 5 & 1 \\ \hline 4 & 3 & 8 \\ \hline \end{array}$

### Order $4$

There are many order $4$ magic squares.

#### Dürer's Order $4$ Magic Square

This is one of the more famous ones, due to Albrecht Dürer:

$\begin{array}{|c|c|c|c|} \hline 16 & 3 & 2 & 13 \\ \hline 5 & 10 & 11 & 8 \\ \hline 9 & 6 & 7 & 12 \\ \hline 4 & 15 & 14 & 1 \\ \hline \end{array}$

#### Moessner's Order $4$ Magic Square

This one, created by Alfred Moessner, has extra interesting properties:

$\begin{array}{|c|c|c|c|} \hline 12 & 13 & 1 & 8 \\ \hline 6 & 3 & 15 & 10 \\ \hline 7 & 2 & 14 & 11 \\ \hline 9 & 16 & 4 & 5 \\ \hline \end{array}$

### Order $5$

$\begin{array}{|c|c|c|c|c|} \hline 23 & 6 & 19 & 2 & 15 \\ \hline 10 & 18 & 1 & 14 & 22 \\ \hline 17 & 5 & 13 & 21 & 9 \\ \hline 4 & 12 & 25 & 8 & 16 \\ \hline 11 & 23 & 7 & 20 & 3 \\ \hline \end{array}$

## Also see

• Results about magic squares can be found here.