Mammals are any vertebrates within the class Mammalia (/məˈmeɪli.ə/ from Latin mamma "breast"), a clade of endothermic amniotes distinguished from reptiles and birds by the possession of a neocortex (a region of the brain), hair, three middle ear bones and mammary glands.
Mammals include the largest animals on the planet, the great whales, as well as some of the most intelligent, such as elephants, primates and cetaceans. The basic body type is a terrestrial quadruped, but some mammals are adapted for life at sea, in the air, in trees, underground or on two legs. The largest group of mammals, the placentals, have a placenta, which enables the feeding of the fetus during gestation.
Mammals range in size from the 30–40 mm (1.2–1.6 in) bumblebee bat to the 30-meter (98 ft) blue whale. With the exception of the five species of monotreme (egg-laying mammals), all modern mammals give birth to live young. Most mammals, including the six most species-rich orders, belong to the placental group. The three largest orders in number of species are Rodentia: mice, rats, porcupines, beavers, capybaras and other gnawing mammals; Chiroptera: bats; and Soricomorpha: shrews, moles and solenodons. The next three biggest orders, depending on the biological classification scheme used, are the Primates including the great apes and monkeys; the Cetartiodactyla including whales and even-toed ungulates; and the Carnivora which includes cats, dogs, weasels, bears and seals.
The early synapsid mammalian ancestors were sphenacodont pelycosaurs, a group that produced the non-mammalian Dimetrodon. At the end of the Carboniferous period, this group diverged from the sauropsid line that led to reptiles and dinosaurs (including birds). The line following the stem group Sphenacodontia split-off several diverse groups of non-mammalian synapsids — sometimes referred to as mammal-like reptiles — before giving rise to the proto-mammals (Therapsida) in the early Mesozoic era. 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 among the dominant terrestrial animal groups from 66 million years ago to the present.