Hardy-Weinberg equilibrium predicts that allele and genotype frequencies remain constant across generations in a large, randomly mating population with no selection, mutation, migration, or drift. Given allele frequencies p and q (p + q = 1), genotype frequencies are p², 2pq, and q². This null model is a baseline — deviations from it signal that evolutionary forces are acting. It is used to infer allele frequencies from genotype data and vice versa.
Practice calculating expected genotype frequencies from observed allele frequencies, then compare to observed genotypes to test for equilibrium. Work through violations — a population under directional selection will show systematic departures from HWE predictions.
Hardy-Weinberg equilibrium is best understood as a null model — a prediction of what allele and genotype frequencies look like when evolution is *not* happening. It was developed independently by G.H. Hardy and Wilhelm Weinberg in 1908 to counter a then-common misconception that dominant alleles would automatically increase in frequency over time. They showed this is wrong: in a large, randomly mating population free from selection, mutation, migration, and drift, allele frequencies stay constant indefinitely.
The mathematics is built on Mendelian probability. If allele A has frequency p and allele a has frequency q, and p + q = 1, then random mating is like drawing two alleles independently from a pool. The probability of getting AA is p × p = p², getting aa is q × q = q², and getting Aa is 2 × p × q = 2pq (the factor of 2 accounts for both orders: Aa and aA). Adding these gives the Hardy-Weinberg identity: p² + 2pq + q² = 1. This equation lets you move in either direction — given allele frequencies, predict genotype frequencies; given genotype frequencies, infer allele frequencies.
The five conditions for HWE (large population, random mating, no selection, no mutation, no migration) are never perfectly met in nature. That is the point. When you test a real population against HWE predictions and find a significant departure, you know an evolutionary force is operating. For example, if you observe far fewer heterozygotes than 2pq predicts, inbreeding or assortative mating is a likely explanation. If heterozygotes are in excess, balancing selection may be maintaining both alleles. HWE is a diagnostic tool, not a description of reality.
A common confusion is thinking that HWE and evolution are opposites — that a population either evolves or is in equilibrium. In fact, HWE is just describing the baseline for one specific quantity (allele frequency). A population in HWE can still have enormous phenotypic variation, experience births and deaths, and undergo ecological change. What it is *not* doing is shifting the frequency of alleles from generation to generation. The moment any of the five conditions is disrupted — say, a drought kills all short-necked individuals — the allele frequencies change, and the population departs from equilibrium.