Linkage disequilibrium with multiple alleles and loci
LD describes the associations among alleles at different loci. For anything more than two bi-allelic loci, you need more than just one number to fully describe the associations. For instance, if we have three bi-allelic loci 1-3, we need the three pairwise LD coefficients, plus one extra three-way coefficient. In general, if we have $K$ loci, and the $k^\text{th}$ locus has $n_k$ alleles, there are $\prod_k n_k$ possible haplotypes, so to fully describe the state of the population we need $\prod_k n_k-1$ haplotype frequencies. If we instead want to use allele frequencies and associations, we'll therefore need $$\prod_k n_k-1-\sum_k(n_k-1)=\prod_k n_k-\sum_k n_k+k-1$$ LD coefficients. (Note that each locus is described by $n_k-1$ allele frequencies.) This means that things get complicated pretty quickly with many loci! If you want to dive into the details, check out Barton and Turelli (1991) and Kirkpatrick, Johnson, and Barton (2002).