Suppose that gene has two alleles, A and a.
An individual's genotype will result in any of the three combinations. AA, Aa, or aa.
When a new individual takes birth, it receives one of the two alleles from the other parent. the two offspring get their genotypes independently of each other.
Let the states of this population be the set of genotypes of the two members of the current population. We will not distinguish the set\(\left\{ {AA,Aa} \right\}\).
There are six states:
\(\left\{ {AA,AA} \right\},\left\{ {AA,Aa} \right\},\left\{ {AA,aa} \right\},\left\{ {Aa,Aa} \right\},\left\{ {Aa,aa} \right\},\left\{ {aa,aa} \right\}\)
For each state, we can compute the values for the probabilities that the next generation will be in each of the six states.
Therefore computing the probability matrix as
\(TP = \left[ {\begin{array}{*{20}{c}}1&0&0&0&0&0\\{0.25}&{0.5}&0&{0.25}&0&0\\0&0&0&1&0&0\\{0.0625}&{0.25}&{0.125}&{0.25}&{0.25}&{0.0625}\\0&0&0&{0.25}&{0.5}&{0.25}\\0&0&0&0&0&1\end{array}} \right]\)
The rows and columns are represented in the order
\(\left\{ {AA,AA} \right\},\left\{ {AA,Aa} \right\},\left\{ {AA,aa} \right\},\left\{ {Aa,Aa} \right\},\left\{ {Aa,aa} \right\},\left\{ {aa,aa} \right\}\)