Mammals are vertebrate animals constituting the class Mammalia, and characterized by the presence of mammary glands which in females produce milk for feeding their young, a neocortex, fur or hair, and three middle ear bones. These characteristics distinguish them from reptiles and birds, from which they diverged in the late Triassic, 201–227 million years ago. There are around 5,450 species of mammals. The largest orders are the rodents, bats and Soricomorpha. The next three are the Primates, the Cetartiodactyla, and the Carnivora.
Like birds, mammals are endothermic. The trait evolved independently in these two classes and is an example of convergent evolution.
In terms of cladistics, which reflects evolutionary history, mammals are the only living members of the Synapsida; this clade, together with Sauropsida together constitute the larger Amniota clade. The early synapsid mammalian ancestors were sphenacodont pelycosaurs, a group that included the non-mammalian Dimetrodon. At the end of the Carboniferous period around 300 million years ago, this group diverged from the sauropsid line that led to today's reptiles and birds.