 This simple derivation of the Hardy-Weinberg principle deals with two alleles at a single locus, but can easily be extended to multiple alleles. (Extension to more than one locus is trickier; see section 3.6 below.) For the multi-allelic case, suppose there are \(n\) alleles at the locus, \(A_1 \ldots A_n\), with relative frequencies of \(p_1 \ldots p_n\) respectively, where \(p_1 + p_2 + \ldots + p_n = 1\). Assuming again that the population is large, mating is random, evolutionary forces are absent, and Mendel’s law of segregation holds, then in the offspring generation the frequency of the \(A_i A_i\) genotype will be \(p_i^2\), and the frequency of the (unordered) \(A_i A_j\) genotype \((i \ne j)\) will be \(2p_i p_j\). Note that the two allele case is a special case of this generalized principle.