If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Mechanisms of evolution

EVO‑1 (EU)
EVO‑1.K (LO)
EVO‑1.L (LO)
When a population is in Hardy-Weinberg equilibrium, it is not evolving. Learn how violations of Hardy-Weinberg assumptions lead to evolution.

Key points:

  • When a population is in Hardy-Weinberg equilibrium for a gene, it is not evolving, and allele frequencies will stay the same across generations.
  • There are five basic Hardy-Weinberg assumptions: no mutation, random mating, no gene flow, infinite population size, and no selection.
  • If the assumptions are not met for a gene, the population may evolve for that gene (the gene's allele frequencies may change).
  • Mechanisms of evolution correspond to violations of different Hardy-Weinberg assumptions. They are: mutation, non-random mating, gene flow, finite population size (genetic drift), and natural selection.


In nature, populations are usually evolving. The grass in an open meadow, the wolves in a forest, and even the bacteria in a person's body are all natural populations. And all of these populations are likely to be evolving for at least some of their genes. Evolution is happening right here, right now!
To be clear, that doesn't mean these populations are marching towards some final state of perfection. All evolution means is that a population is changing in its genetic makeup over generations. And the changes may be subtle—for instance, in a wolf population, there might be a shift in the frequency of a gene variant for black rather than gray fur. Sometimes, this type of change is due to natural selection. Other times, it comes from migration of new organisms into the population, or from random events—the evolutionary "luck of the draw."
In this article, we'll examine what it means for a population evolve, see the (rarely met) set of conditions required for a population not to evolve, and explore how failure to meet these conditions does in fact lead to evolution.

Hardy-Weinberg equilibrium

First, let's see what it looks like when a population is not evolving. If a population is in a state called Hardy-Weinberg equilibrium, the frequencies of alleles, or gene versions, and genotypes, or sets of alleles, in that population will stay the same over generations (and will also satisfy the Hardy-Weinberg equation). Formally, evolution is a change in allele frequencies in a population over time, so a population in Hardy-Weinberg equilibrium is not evolving.
That's a little bit abstract, so let's break it down using an example. Imagine we have a large population of beetles. In fact, just for the heck of it, let's say this population is infinitely large. The beetles of our infinitely large population come in two colors, dark gray and light gray, and their color is determined by the A gene. AA and Aa beetles are dark gray, and aa beetles are light gray.
In our population, let's say that the A allele has a frequency of 0, point, 3, while the a allele has a frequency of 0, point, 7. If a population is in Hardy-Weinberg equilibrium, allele frequencies will be related to genotype frequencies by a specific mathematical relationship, the Hardy-Weinberg equation. So, we can predict the genotype frequencies we'd expect to see (if the population is in Hardy-Weinberg equilibrium) by plugging in allele frequencies as shown below:
psquared + 2pq + qsquared, equals, 1
p = frequency of A, q = frequency of a
Frequency of AA = psquared = 0.7squared = 0.49
Frequency of Aa = 2pq = 2 (0.7)(0.3) = 0.42
Frequency of aa = 0.3squared = 0.09
Let's imagine that these are, in fact, the genotype frequencies we see in our beetle population (9, percent AA, 42, percent Aa, 49, percent aa). Excellent—our beetles appear to be in Hardy-Weinberg equilibrium! Now, let's imagine that the beetles reproduce to make a next generation. What will the allele and genotype frequencies will be in that generation?
To predict this, we need to make a few assumptions:
First, let's assume that none of the genotypes is any better than the others at surviving or getting mates. If this is the case, the frequency of A and a alleles in the pool of gametes (sperm and eggs) that meet to make the next generation will be the same as the overall frequency of each allele in the present generation.
Second, let's assume that the beetles mate randomly (as opposed to, say, black beetles preferring other black beetles). If this is the case, we can think of reproduction as the result of two random events: selection of a sperm from the population's gene pool and selection of an egg from the same gene pool. The probability of getting any offspring genotype is just the probability of getting the egg and sperm combo(s) that produce that genotype.
We can use a modified Punnett square to represent the likelihood of getting different offspring genotypes. Here, we multiply the frequencies of the gametes on the axes to get the probability of the fertilization events in the squares:
As shown above, we'd predict an offspring generation with the exact same genotype frequencies as the parent generation: 9, percent AA, 42, percent Aa, and 49, percent aa. If genotype frequencies have not changed, we also must have the same allele frequencies as in the parent generation: 0, point, 3 for A and 0, point, 7 for a.
What we've just seen is the essence of Hardy-Weinberg equilibrium. If alleles in the gamete pool exactly mirror those in the parent generation, and if they meet up randomly (in an infinitely large number of events), there is no reason—in fact, no way—for allele and genotype frequencies to change from one generation to the next.
In the absence of other factors, you can imagine this process repeating over and over, generation after generation, keeping allele and genotype frequencies the same. Since evolution is a change in allele frequencies in a population over generations, a population in Hardy-Weinberg equilibrium is, by definition, not evolving.

But is that realistic?

As we mentioned at the beginning of the article, populations are usually not in Hardy-Weinberg equilibrium (at least, not for all of the genes in their genome). Instead, populations tend to evolve: the allele frequencies of at least some of their genes change from one generation to the next.
In fact, population geneticists often check to see if a population is in Hardy-Weinberg equilibrium because they suspect other forces may be at work. If the population’s allele and genotype frequencies are changing over generations (or if the allele and genotype frequencies don't match the predictions of the Hardy-Weinberg equation), the race is on to find out why.

Hardy-Weinberg assumptions and evolution

What causes populations to evolve? In order for a population to be in Hardy-Weinberg equilibrium, or a non-evolving state, it must meet five major assumptions:
  1. No mutation. No new alleles are generated by mutation, nor are genes duplicated or deleted.
  2. Random mating. Organisms mate randomly with each other, with no preference for particular genotypes.
  3. No gene flow. Neither individuals nor their gametes (e.g., windborne pollen) enter or exit the population.
  4. Very large population size. The population should be effectively infinite in size.
  5. No natural selection. All alleles confer equal fitness (make organisms equally likely to survive and reproduce).
If any one of these assumptions is not met, the population will not be in Hardy-Weinberg equilibrium. Instead, it may evolve: allele frequencies may change from one generation to the next. Allele and genotype frequencies within a single generation may also fail to satisfy the Hardy-Weinberg equation.

Some genes may satisfy Hardy-Weinberg, while others do not

Note that we can think about Hardy-Weinberg equilibrium in two ways: for just one gene, or for all the genes in the genome.
  • If we look at just one gene, we check whether the above criteria are true for that one gene. For example, we would ask if there were mutations in that gene, or if organisms mated randomly with regards to their genotype for that gene.
  • If we look at all the genes in the genome, the conditions have to be met for every single gene.
While it’s possible that the conditions will be more or less met for a single gene under certain circumstances, it’s very unlikely that they would be met for all the genes in the genome. So, while a population may be in Hardy-Weinberg equilibrium for some genes (not evolving for those genes), it’s unlikely to be in Hardy-Weinberg equilibrium for all of its genes (not evolving at all).

Mechanisms of evolution

Different Hardy-Weinberg assumptions, when violated, correspond to different mechanisms of evolution.
  • Mutation. Although mutation is the original source of all genetic variation, mutation rate for most organisms is pretty low. So, the impact of brand-new mutations on allele frequencies from one generation to the next is usually not large. (However, natural selection acting on the results of a mutation can be a powerful mechanism of evolution!)
  • Non-random mating. In non-random mating, organisms may prefer to mate with others of the same genotype or of different genotypes. Non-random mating won't make allele frequencies in the population change by itself, though it can alter genotype frequencies. This keeps the population from being in Hardy-Weinberg equilibrium, but it’s debatable whether it counts as evolution, since the allele frequencies are staying the same.
  • Gene flow. Gene flow involves the movement of genes into or out of a population, due to either the movement of individual organisms or their gametes (eggs and sperm, e.g., through pollen dispersal by a plant). Organisms and gametes that enter a population may have new alleles, or may bring in existing alleles but in different proportions than those already in the population. Gene flow can be a strong agent of evolution.
  • Non-infinite population size (genetic drift). Genetic drift involves changes in allele frequency due to chance events – literally, "sampling error" in selecting alleles for the next generation. Drift can occur in any population of non-infinite size, but it has a stronger effect on small populations. We will look in detail at genetic drift and the effects of population size.
  • Natural selection. Finally, the most famous mechanism of evolution! Natural selection occurs when one allele (or combination of alleles of different genes) makes an organism more or less fit, that is, able to survive and reproduce in a given environment. If an allele reduces fitness, its frequency will tend to drop from one generation to the next. We will look in detail at different forms of natural selection that occur in populations.
All five of the above mechanisms of evolution may act to some extent in any natural population. In fact, the evolutionary trajectory of a given gene (that is, how its alleles change in frequency in the population across generations) may result from several evolutionary mechanisms acting at once. For instance, one gene’s allele frequencies might be modified by both gene flow and genetic drift. For another gene, mutation may produce a new allele, which is then favored (or disfavored) by natural selection.

Want to join the conversation?

  • male robot hal style avatar for user GeniusKid88
    What is the point of using the Hardy Weinberg equation if there is no population that fits the conditions anyways?
    (16 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Allison Hadaway
    Shouldn't the allele frequencies technically be labeled as allele proportions? They are a proportion of the total amount of alleles. A frequency would not tell us anything about the total, simply how many alleles there are.
    (7 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user Jessica Mensah
      I think knowing how many alleles there are is quite a key to knowing how many total individuals there are. The alleles help identify the amount of homozygous recessive or dominants,and the heterozygous dominants, which is basically enough to know the total alleles of a population
      (1 vote)
  • blobby green style avatar for user John Morgenthaler
    In the article there is the statement: "Non-random mating won't make allele frequencies in the population change by itself, though it can alter genotype frequencies." I was perplexed by this but then realized that I think the author must be using a narrow definition of "non random." If some individuals are so unattractive that that mate less often that would be a type of non randomness and would, obviously, lead to changes in allele frequency. Am I correct?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • orange juice squid orange style avatar for user Ryan Hoyle
      Yes you're right. In Sal's example, all of the organisms in the population get an equal opportunity to mate. For example if all the black beetles mate with other blacks, and whites with whites, then you wont get any 'mixed genotype', but all of the alleles are still passed on. However, if all beetles preferred to mate with black beetles, then the alleles for darker pigment would have a higher chance of being passed on. But in that situation there is an unequal opportunity to mate. In summary I agree with you - Sal is just pointing out a curious but unlikely situation where the allele frequence sticks to the HW equilibrium but the genotype frequency does not.
      (2 votes)
  • blobby green style avatar for user Joseph370
    what evolutionary mechanism is used when a herd moves to a new area and breeds with a different herd
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user ventura
    how do the mechanisms of macroevolution interact? does selection enhance the effects of the other forces of microevolution?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Calvin Willingham
    How does evolution unify the biological sciences?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user karthik.subramanian
    The article was very helpful. What would happen to a dominant traits frequency if fitness was “turned off”? Could you say that the frequency of the dominant trait stays constant?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user amanning08
    why All five of the above mechanisms of evolution may act to some extent in any natural population.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • winston baby style avatar for user Ivana - Science trainee
      Because organisms are 'limited' by their environment and circumstances (just like we are in our lives, right?)

      Here you can see different mechanisms of evolution but they are many times exclusive and rely on the environment.

      It is really hard to satisfy Hardy Weinberg all 5 criteria, and there is hardly any population which satisfies. In nature, most things are random.
      Even mutations cannot be intensive enough to constantly happen and keep eliminating or favouring certain genes, or it is hard to maintain non-random mating in animals.
      (1 vote)
  • blobby green style avatar for user Al
    In the conditions for the Hardy-Weinberg Equilibrium , how does random mating stabilize the allele frequency?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • orange juice squid orange style avatar for user Ryan Hoyle
      It seems to me that rather than random mating stabilizing the frequency, it's non-random mating that destabilizes the allele frequency (or the genotype frequency). For example, if we are talking about a population of beetles, and the females prefer to mate only with larger males if they can, then the alleles present in the smaller beetles will be less likely to pass on than the alleles in the larger beetles. Therefore, the allele frequency will not be stable and the HW equilibrium will no longer be applicable.
      In other words, the allele frequency can ONLY be stable if certain conditions are met including random mating (and all the other assumptions must be met too!).
      (2 votes)
  • aqualine seed style avatar for user Rubyat Ahmed
    How do we know which Hardy Weinberg Equation to use when? p + q = 1, or p^2 + 2pq + q^2?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Abhiahek akash
      when it's asked for individual you have to consider the equation of square . let's take an example,we have in a population , 64% frequency of blue eyed individual(here we are talking about individual,diploid, so there must be a set of pair of alleles ) , to find the frequency of dominant allele we have to solve as q2 =0.64 , q=0.8. (this 0.8 is frequency of single allele, say in gamete) so , from equation p+q =1 we can calculate p=0.2.and with these data we can find what's been asked. i hope this'll help.
      (1 vote)