In combinatorics and in experimental design, a Latin square is an n × n array filled with n different symbols, each occurring exactly once in each row and exactly once in each column. An example of a 3 × 3 Latin square is
The name "Latin square" was inspired by mathematical papers by Leonhard Euler (1707–1783), who used Latin characters as symbols, but any set of symbols can be used: in the above example, the alphabetic sequence A, B, C can be replaced by the integer sequence 1, 2, 3. Euler began the general theory of Latin squares.
History The Korean mathematician Choi Seok-jeong was the first to publish an example of Latin squares of order nine, in order to construct a magic square in 1700, predating Leonhard Euler by 67 years.
Counting This account follows McKay, Meynert & Myrvold (2007, p. 100). The counting of Latin squares has a long history, but the published accounts contain many errors. Euler in 1782, and Cayley in 1890, both knew the number of reduced Latin squares up to order five. In 1915, MacMahon approached the problem in a different way, but initially obtained the wrong value for order five. M.Frolov in 1890, and Tarry in 1901, found the number of reduced squares of order six. M. Frolov gave an incorrect count of reduced squares of order seven. R.A. Fisher and F. Yates, unaware of earlier work of E. Schönhardt, gave the number of isotopy classes of orders up to six. In 1939, H. W. Norton found 562 isotopy classes of order seven, but acknowledged that his method was incomplete. A. Sade, in 1951, but privately published earlier in 1948, and P. N. Saxena found more classes and, in 1966, D. A. Preece noted that this corrected Norton's result to 564 isotopy classes. However, in 1968, J. W. Brown announced an incorrect value of 563, which has often been repeated. He also gave the wrong number of isotopy classes of order eight. The correct number of reduced squares of order eight had already been found by M. B. Wells in 1967, and the numbers of isotopy classes, in 1990, by G. Kolesova, C.W.H. Lam and L. Thiel. The number of reduced squares for order nine was obtained by S. E. Bammel and J. Rothstein, for order 10 by B. D. McKay and E. Rogoyski, and for order 11 by B. D. McKay and I. M. Wanless.
Reduced form A Latin square is said to be reduced (also, normalized or in standard form) if both its first row and its first column are in their natural order. For example, the Latin square above is not reduced because its first column is A, C, B rather than A, B, C. Any Latin square can be reduced by permuting (that is, reordering) the rows and columns. Here switching the above matrix's second and third rows yields the following square:
This Latin square is reduced; both its first row and its first column are alphabetically ordered A, B, C.
Properties
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 L1 and L2 of side n with common symbol set S that is also the index set for the rows and columns of each square are isomorphic if there is a bijection g: S → S such that g(L1(i, j)) = L2(g(i), g(j)) for all i, j in S. 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. Each main class contains up to six isotopy classes.
… excerpt ends here. Continue reading the full article.

![Latin square: Displaying a 7 × 7 Latin square, this stained-glass window at Gonville and Caius College, Cambridge, honored Ronald Fisher, whose Design of Experiments discussed Latin squares. The Sir Ronald Fisher window was removed in 2020 because of Fisher's connection with eugenics.[1]](https://thumb.wikimedia.org/wikipedia/commons/thumb/3/37/Fisher-stainedglass-gonville-caius.jpg/330px-Fisher-stainedglass-gonville-caius.jpg?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)

