Latin Squares


Latin Square, (LS): An n x n matrix in which n distinct symbols are arranged such that each symbol occurs exactly once in each row and in each column.

Diagonal Latin Square, (DLS): A Latin Square in which each symbol also occurs exactly once in each of the two main diagonals.

Orthogonal Latin Squares, (OLS): Two Latin squares of order n are orthogonal if each symbol in the first square meets each symbol in the second square exactly once when they are superposed.

Orthogonal Diagonal Latin Squares, (ODLS): OLS when the two squares are diagonal Latin squares.

Self-orthogonal Latin Square, (SOLS): A Latin square that is orthogonal to its transpose, (Rotate 7).

Self-orthogonal Diagonal Latin Square, (SODLS): SOLS when the square is a diagonal Latin square.


Latin Squares makes LS and DLS, (with symbols 0 to n-1).

How Many

Below are numbers of some kinds of Latin squares, .txt, and diagonal Latin squares, .txt, with natural order first row, (nfr), for some small orders n. Here LS do not include DLS.

See kind descriptions:

  sym: axial symmetric, (not including dsym).

  dsym: double axial symmetric.

  csym: center symmetric.

  PLS: pandiagonal

  WPLS: weakly pandiagonal.

  nfr nfc: natural order first row and first column, (including self-trans).

  self-trans: LS is equal to its transpose

The first column numbers are calculated by subtracting the DLS numbers below from published numbers of LS. They have been confirmed here up to order 7. The other column numbers were all computed here.

The DLS column numbers are given in the OEIS sequence A274171.
They have been confirmed here up to order 8. The other column numbers were all computed here.

Numbers of sym DLS, (for rows, including dsym), are given in A287649.


Kochemazov, Stepan, Eduard Vatutin, and Oleg Zaikin
"Fast Algorithm for Enumerating Diagonal Latin Squares of Small Order", 2017

Vatutin, Eduard, Stepan Kochemazov, and Oleg Zaikin
"On Some Features of Symmetric Diagonal Latin Squares", 2017

Weisstein, Eric W.
"Latin Square"

Zhang, Yong, Wen Li and Jian Guo Lei
"Existence of weakly pandiagonal orthogonal Latin squares", 2013