On this page
Many textbooks hand you p² + 2pq + q² = 1 and move on. The part that trips students up is the middle term: if a heterozygote is one A and one a, why isn't its frequency just pq? One small grid answers that.
Where does p² + 2pq + q² come from?
Take one gene with two alleles, A and a. Call the frequency of A in the population p and the frequency of a q, so p + q = 1.
British mathematician G. H. Hardy published it in Science in July 1908 as Mendelian Proportions in a Mixed Population. The German physician Wilhelm Weinberg reached it independently the same year, a point Curt Stern made in a 1943 note in Science, which is why the law carries both names (background on the Hardy-Weinberg principle).
The key step is to think about gametes, not people. With random mating, each egg and each sperm is in effect drawn from one shared pool where a fraction p carries A and q carries a. Draw a 2x2 grid:
Write the sperm alleles across the top: A (frequency p) and a (frequency q).
Write the egg alleles down the side: A (p) and a (q).
In each box, write the genotype and multiply its row frequency by its column frequency.
You get four boxes, not three: AA = p × p = p², A egg with a sperm = pq, a egg with A sperm = qp, and aa = q × q = q². This is the Punnett square described in the Hardy-Weinberg article, "where the proportion of each genotype is equal to the product of the row and column allele frequencies from the current generation."
The four boxes cover every pairing, so p² + pq + qp + q² = (p + q)² = 1.
Why is the heterozygote term 2pq and not pq?
Because two different boxes give a heterozygote. A child can get A from the mother and a from the father, or the reverse. Those are separate events, each with probability pq, and the zygote is the same either way. Add them: pq + qp = 2pq.
Each homozygote has only one box, so no 2 appears in front of p² or q².
A quick test shows pq alone cannot be right. With p = q = 0.5, p² + pq + q² gives 0.25 + 0.25 + 0.25 = 0.75, so a quarter of the population would vanish. With 2pq the total is exactly 1. You can also check that 2pq = 2p(1 - p) reaches its largest value, 0.5, when p = q = 0.5.
Worked example: what do the numbers look like?
Figure 19.2 in OpenStax Biology 2e, section 19.1 uses pea plants with a yellow allele Y and a green allele y. Its population of 500 plants has 245 YY, 210 Yy and 45 yy, which gives allele frequencies p = 0.7 and q = 0.3. Putting those into the equation, it gives genotype frequencies of 0.49 YY, 0.42 Yy and 0.09 yy.
Check it with the grid:
YY: 0.7 × 0.7 = 0.49
Y egg with y sperm: 0.7 × 0.3 = 0.21
y egg with Y sperm: 0.3 × 0.7 = 0.21
yy: 0.3 × 0.3 = 0.09
The two heterozygote boxes add to 0.42, and 0.49 + 0.42 + 0.09 = 1. Writing only pq would predict 105 heterozygous plants out of 500 instead of 210, and your counts would add to 395, not 500.
What does the equation assume?
The grid only works if gametes really meet at random from one shared pool. OpenStax states that the principle "assumes an infinitely large population and conditions with no mutations, migration, emigration, or selective pressure for or against genotype."
When those hold, genotype frequencies settle at p², 2pq and q² after a single generation of random mating; we walk through why in how one generation of random mating reaches Hardy-Weinberg. With three alleles the same grid grows to 3x3 and the equation becomes (p + q + r)², which is how ABO blood group frequencies are worked out.
If the basics feel shaky, the Fermi Concept Library covers every concept in biology, each with its own lesson and its place in the map.
A five-point self-check before your exam
Can you draw the 2x2 gamete grid from memory, with p and q on both edges?
Can you say aloud why there are two heterozygote boxes and one of each homozygote?
Given q² (the share showing a recessive trait), do you take its square root to get q, rather than halving it?
Given genotype counts, do you find p as (2 × AA + Aa) ÷ (2 × total)?
Do your three genotype frequencies add to 1?
Point 3 is a common slip in carrier questions; see how to find carrier frequency from incidence for a full example.
To practise, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



