Genotype
A genotype is the combination of alleles an organism carries for a gene, such as BB, Bb, or bb, whether or not the trait is visible.
Definition
A genotype is the set of alleles an organism carries for a gene, written with letters such as $BB$, $Bb$, or $bb$, and it is the hidden genetic code that, together with the environment, produces the visible phenotype. For a single gene with a dominant and a recessive allele there are three possible genotypes, homozygous dominant, heterozygous, and homozygous recessive, and because two of the three (homozygous dominant and heterozygous) produce the same dominant phenotype, a plant's appearance alone cannot reveal which one it has. More broadly, a genotype can describe the allelic composition at one locus, several loci, or across a whole genome; at $n$ independent two-allele loci there are $3^n$ possible genotypes, and genotype frequencies in a randomly mating population follow the Hardy-Weinberg proportions $p^2$, $2pq$, and $q^2$, so deviations from those proportions reveal selection, inbreeding, population structure, or nonrandom mating.
Example
Crossing two heterozygous ($Bb$) parents is expected to produce offspring in a $1\ BB : 2\ Bb : 1\ bb$ genotype ratio. A dihybrid cross between $RrYy$ pea plants produces $9$ distinct genotypes but only $4$ phenotypes in the familiar $9:3:3:1$ ratio, and modern genotyping arrays now read more than $500{,}000$ single-nucleotide variants from a single DNA sample to assign genotypes across an entire genome.
Key Insight
Genotype is what is written and phenotype is what is shown, so two organisms can look identical yet carry different genotypes and pass on different alleles. Because only the genotype is passed on to the next generation, evolution is best understood as a change in genotype, and allele, frequencies over time, even though natural selection acts directly on phenotypes.