Genetics a discipline of biology is the science of genes, heredity, and variation in living organisms.
Genetics deals with the molecular structure and function of genes, with gene behavior in the context of a cell or organism with patterns of inheritance from parent to offspring, and with gene distribution, variation and change in populations. Given that genes are universal to living organisms, genetics can be applied to the study of all living systems, from viruses and bacteria, through plants (especially crops) and domestic animals, to humans (as in medical genetics).
The fact that living things inherit traits from their parents has been used since prehistoric times to improve crop plants and animals through selective breeding. However, the modern science of genetics, which seeks to understand the process of inheritance, only began with the work of Gregor Mendel in the mid-19th century. Although he did not know the physical basis for heredity, Mendel observed that organisms inherit traits via discrete units of inheritance, which are now called genes.