As I'm studying permutation groups I remembered that when I was in elementary school my teacher introduced Latin squares to us and asked us to find all 4 by 4 Latin squares. I never succeeded in solving the problem and I found it so challenging at that time, even later in high school when I returned to the problem they looked to be generated so randomly and lawlessly. Today I returned to the problem, this time I'm equipped with some basic group theory results and I was hopeful that I could find the nature of Latin squares better than before because I expected their nature would be close to permutation groups or products of permutation groups. Again I failed to solve this mind-boggling problem lol. I've found 24 4 by 4 Latin squares so far, but I expect to find more, like 30 or 36. It's obvious to me that whatever the number of n by n Latin squares is, there must be a factor of (n-1)! because if I found a Latin square, I can find (n-1)! such Latin squares just by permutation of the rows 2,...,n. (provided that no repeated Latin square is formed) Is there any general formula for predicting how many n by n Latin squares exist? How many 4 by 4 Latin squares exist? I've defined that two Latin squares are equivalent if they can be converted to each by a finite number of permutations of their rows (except the first row). I believe that's an equivalence relation. Is there any way to find out how many equivalence classes we can have for an n*n Latin square? If we write n rows of a Latin square as [e,∏1,∏2,∏3,...,∏n] Do the ∏i's form a particular structure like a group or something close to a group?