Orthogonal array representation If each entry of an
n ×
n Latin square is written as a triple (
r,
c,
s), where
r is the row,
c is the column, and
s is the symbol, we obtain a set of
n2 triples called the
orthogonal array representation of the square. For example, the orthogonal array representation of the Latin square is : { (1, 1, 1), (1, 2, 2), (1, 3, 3), (2, 1, 2), (2, 2, 3), (2, 3, 1), (3, 1, 3), (3, 2, 1), (3, 3, 2) }, where for example the triple (2, 3, 1) means that in row 2 and column 3 there is the symbol 1. Orthogonal arrays are usually written in array form where the triples are the rows, such as The definition of a Latin square can be written in terms of orthogonal arrays: • A Latin square is a set of
n2 triples (
r,
c,
s), where 1 ≤
r,
c,
s ≤
n, such that all ordered pairs (
r,
c) are distinct, all ordered pairs (
r,
s) are distinct, and all ordered pairs (
c,
s) are distinct. This means that the
n2 ordered pairs (
r,
c) are all the pairs (
i,
j) with 1 ≤
i,
j ≤
n, once each. The same is true of the ordered pairs (
r,
s) and the ordered pairs (
c,
s). The orthogonal array representation shows that rows, columns and symbols play rather similar roles, as will be made clear below.
Equivalence classes of Latin squares Many operations on a Latin square produce another Latin square (for example, turning it upside down). If we permute the rows, permute the columns, or permute the names of the symbols of a Latin square, we obtain a new Latin square said to be
isotopic to the first. Isotopism is an
equivalence relation, so the set of all Latin squares is divided into subsets, called
isotopy classes, such that two squares in the same class are isotopic and two squares in different classes are not isotopic. A stronger form of equivalence exists. Two Latin squares and of side with common symbol set that is also the index set for the rows and columns of each square are
isomorphic if there is a bijection such that for all , in . An alternate way to define isomorphic Latin squares is to say that a pair of isotopic Latin squares are isomorphic if the three bijections used to show that they are isotopic are, in fact, equal. Isomorphism is also an equivalence relation and its equivalence classes are called
isomorphism classes. Another type of operation is easiest to explain using the orthogonal array representation of the Latin square. If we systematically and consistently reorder the three items in each triple (that is, permute the three columns in the array form), another orthogonal array (and, thus, another Latin square) is obtained. For example, we can replace each triple (
r,
c,
s) by (
c,
r,
s) which corresponds to transposing the square (reflecting about its main diagonal), or we could replace each triple (
r,
c,
s) by (
c,
s,
r), which is a more complicated operation. Altogether there are 6 possibilities including "do nothing", giving us 6 Latin squares called the conjugates (also
parastrophes) of the original square. Finally, we can combine these two equivalence operations: two Latin squares are said to be
paratopic, also
main class isotopic, if one of them is isotopic to a conjugate of the other. This is again an equivalence relation, with the equivalence classes called
main classes,
species, or
paratopy classes. is that \prod_{k=1}^n \left(k!\right)^{n/k}\geq L_n\geq\frac{\left(n!\right)^{2n}}{n^{n^2}}. A simple and explicit formula for the number of Latin squares was published in 1992, but it is still not easily computable due to the exponential increase in the number of terms. This formula for the number of Latin squares is L_n = n! \sum_{A \in B_n}^{} (-1)^{\sigma_0 (A)} \binom{\operatorname{per} A}{n}, where is the set of all {0, 1}-matrices, is the number of zero entries in matrix , and is the
permanent of matrix . The table below contains all known exact values. It can be seen that the numbers grow exceedingly quickly. For each , the number of Latin squares altogether is times the number of reduced Latin squares . For each , each isotopy class contains up to Latin squares (the exact number varies), while each main class contains either 1, 2, 3 or 6 isotopy classes. The number of structurally distinct Latin squares (i.e. the squares cannot be made identical by means of rotation, reflection, and permutation of the symbols) for = 1 up to 7 is 1, 1, 1, 12, 192, 145164, 1524901344 respectively .
Examples We give one example of a Latin square from each main class up to order five. \begin{bmatrix} 1 \end{bmatrix} \quad \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix} \quad \begin{bmatrix} 1 & 2 & 3 \\ 2 & 3 & 1 \\ 3 & 1 & 2 \end{bmatrix} \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 1 & 4 & 3 \\ 3 & 4 & 1 & 2 \\ 4 & 3 & 2 & 1 \end{bmatrix} \quad \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 1 & 3 \\ 3 & 1 & 4 & 2 \\ 4 & 3 & 2 & 1 \end{bmatrix} \begin{bmatrix} 1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 5 & 1 & 4 \\ 3 & 5 & 4 & 2 & 1 \\ 4 & 1 & 2 & 5 & 3 \\ 5 & 4 & 1 & 3 & 2 \end{bmatrix} \quad \begin{bmatrix} 1 & 2 & 3 & 4 & 5 \\ 2 & 4 & 1 & 5 & 3 \\ 3 & 5 & 4 & 2 & 1 \\ 4 & 1 & 5 & 3 & 2 \\ 5 & 3 & 2 & 1 & 4 \end{bmatrix} They present, respectively, the multiplication tables of the following groups: • {0} – the trivial 1-element group • \mathbb{Z}_2 – the
binary group • \mathbb{Z}_3 –
cyclic group of order 3 • \mathbb{Z}_2 \times \mathbb{Z}_2 – the
Klein four-group • \mathbb{Z}_4 – cyclic group of order 4 • \mathbb{Z}_5 – cyclic group of order 5 • the last one is an example of a
quasigroup, or rather a
loop, which is not associative.
Orthogonal pairs Two Latin squares of the same order
n are called
orthogonal if, by overlaying them, one gets every ordered pair (
a,
b) of symbols where
a is a symbol in the first square and
b is one in the second square. Orthogonal pairs and more generally sets of pairwise orthogonal Latin squares are important in design theory and finite geometry. == Transversals and rainbow matchings ==