Latin Squares |

A **normal** magic square of order **n** contains the integers
**1, 2, ..., n²** arranged such that the sum of the numbers in any row,
column, or main diagonal is the same:

**n(n²+1)/2**

This is called the magic constant.

All unqualified references to magic squares on this site mean
**normal** magic squares.

Programs on the Downloads page make many specific types of magic squares. Magic squares can also be made with MagicSquares, the CompleteSquare utility, and MagicSquaresSODLS.

Subtracting the average of the numbers in the square, **(n²+1)/2**,
from each number, yields a skeleton square of normalized numbers, "the bones",
consisting of positive and negative numbers, and, for odd order squares, 0. This is
a convenient way of seeing symmetry in the square. It can also facilitate square
construction, transforms, and analysis. Conveniently, commonly used sums like the
magic constant and the
complementary pair total, are 0 in the bones.

Note: In many places on this site, the minus sign and ½ are omitted from bones images. Plus and minus numbers are generally distinguished by red and blue colors.

There is **1** distinct, that is, not including rotations and reflections,
magic square of order 3. It was known to the ancient Chinese, who called it the
Lo Shu.

Notice that the **complementary pairs** of the square, i.e.,
pairs of numbers whose sum is **n² + 1**, appear as
**± pairs** in the bones.

There are **880** distinct magic squares of order 4. These were enumerated by
Bernard Frénicle de Bessy in the 17th century. The square shown here is called
Dürer's magic square.

There are **275,305,224** distinct magic squares of
order 5.
The number was first computed by
Richard Schroeppel in 1973.

The software on this site may be used freely.

You should use only if you agree to the
freeware disclaimer.

Please send errata or comments to Harry White, sharrywhite@budshaw.ca

"Magic square" http://en.wikipedia.org/wiki/Magic_square

Alejandre, Suzanne "Magic Squares" http://mathforum.org/alejandre/magic.square.html

Andrews, W.S. "Magic Squares and Cubes" https://archive.org/details/MagicSquaresAndCubes_754

Boyer, Christian "multimagic squares site" http://www.multimagie.com/indexengl.htm

Breedijk, Arie "Magic square" http://www.dutchmagicsquares.com/magic-square-eng/

Campbell, Dwane H. and Keith A. Campbell "WELCOME TO MAGIC CUBE GENERATOR" http://magictesseract.com.

Danielsson, Holger "Magic Squares" http://www.magic-squares.info/

Darling, David "magic square" http://www.daviddarling.info/encyclopedia/M/magic_square.html

de Winkel, Aale "The Magic Encyclopedia" http://magichypercubes.com/Encyclopedia/

Gaspalou, Francis "Magic Squares" http://www.gaspalou.fr/magic-squares/

Grogono, Alan W. "Grogono Magic Squares" http://www.grogono.com/magic/

Heinz, Harvey "Magic Squares" http://www.magic-squares.net/

Knecht, Craig "Knecht Magic Squares" http://www.knechtmagicsquare.paulscomputing.com/

Nakamura, Mitsutoshi "Magic Cubes and Tesseracts" http://magcube.la.coocan.jp/magcube/en/

Öfverstedt, Johan "Water Retention on Magic Squares Solver" http://sourceforge.net/projects/wrmssolver/

Suzuki, Mutsumi "Magic Squares" http://mathforum.org/te/exchange/hosted/suzuki/MagicSquare.html

Taneja, Inder J. "Numbers Magic" https://inderjtaneja.com/

Trump, Walter "Notes on Magic Squares" http://www.trump.de/magic-squares/index.html

Weisstein, Eric W. "Magic Square." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/MagicSquare.html