A mammal () is a vertebrate animal of the class Mammalia (məˈmeɪli.ə). Mammals are characterized by the presence of milk-producing mammary glands for feeding their young, a neocortex region of the brain, fur or hair, and three middle ear bones. These characteristics distinguish them from reptiles and birds, from which their ancestors diverged in the Carboniferous Period over 300 million years ago. Around 6,400 extant species of mammals have been described and divided into 29 orders.
The largest orders of mammals, by number of species, are the rodents, bats, and Eulipotyphla (including hedgehogs, moles and shrews). The next three are the Primates (including humans, monkeys and lemurs), the even-toed ungulates (including pigs, camels, and whales), and the Carnivora (including cats, dogs, and seals).
Mammals are the only living members of Synapsida; this clade, together with Sauropsida (reptiles and birds), constitutes the larger Amniota clade. The early synapsids were sphenacodonts, a group that included the famous Dimetrodon. The synapsids split into several diverse groups of non-mammalian synapsids—traditionally and incorrectly referred to as mammal-like reptiles or by the term pelycosaurs, and now known as stem mammals or protomammals—before giving rise to therapsids during the beginning of the Middle Permian period. Mammals originated from cynodonts, an advanced group of therapsids, during the Late Triassic-Early Jurassic. The modern mammalian orders arose in the Paleogene and Neogene periods of the Cenozoic era, after the extinction of non-avian dinosaurs, and have been the dominant terrestrial animal group from 66 million years ago to the present.
The basic mammalian body type is quadruped, and most mammals use their four extremities for terrestrial locomotion; but in some, the extremities are adapted for life at sea, in the air, in trees, underground, or on two legs. Mammals range in size from the bumblebee bat to the blue whale—possibly the largest animal to have ever lived.