# Evolution of mammals

The evolution of mammals has passed through many stages since the first appearance of their synapsid ancestors in the Pennsylvanian sub-period of the late Carboniferous period. By the mid-Triassic, there were many synapsid species that looked like mammals. The lineage leading to today's mammals split up in the Jurassic; synapsids from this period include Dryolestes, more closely related to extant placentals and marsupials than to monotremes, as well as Ambondro, more closely related to monotremes. Later on, the eutherian and metatherian lineages separated; the metatherians are the animals more closely related to the marsupials, while the eutherians are those more closely related to the placentals. Since Juramaia, the earliest known eutherian, lived 160 million years ago in the Jurassic, this divergence must have occurred in the same period.
After the Cretaceous–Paleogene extinction event wiped out the non-avian dinosaurs (birds being the only surviving dinosaurs) and several mammalian groups, placental and marsupial mammals diversified into many new forms and ecological niches throughout the Paleogene and Neogene, by the end of which all modern orders had appeared.
The synapsid lineage became distinct from the sauropsid lineage in the late Carboniferous period, between 320 and 315 million years ago. The only living synapsids are mammals, while the sauropsids gave rise to the dinosaurs, and today's reptiles and birds along with all the extinct amniotes more closely related to them than to mammals. Primitive synapsids were traditionally called "mammal-like reptiles" or "pelycosaurs", but both are now seen as outdated and disfavored paraphyletic terms, since they were not reptiles, nor part of reptile lineage. The modern term for these is "stem mammals", and sometimes "protomammals" or "paramammals".
Throughout the Permian period, the synapsids included the dominant carnivores and several important herbivores. In the subsequent Triassic period, however, a previously obscure group of sauropsids, the archosaurs, became the dominant vertebrates. The mammaliaforms appeared during this period; their superior sense of smell, backed up by a large brain, facilitated entry into nocturnal niches with less exposure to archosaur predation. (Conversely, mammaliaforms' success in these niches may have prevented archosaurs from becoming smaller or nocturnal themselves.) The nocturnal lifestyle may have contributed greatly to the development of mammalian traits such as endothermy and hair. Later in the Mesozoic, after theropod dinosaurs replaced rauisuchians as the dominant carnivores, mammals spread into other ecological niches. For example, some became aquatic, some were gliders, and some even fed on juvenile dinosaurs.
Most of the evidence consists of fossils. For many years, fossils of Mesozoic mammals and their immediate ancestors were very rare and fragmentary; but, since the mid-1990s, there have been many important new finds, especially in China. The relatively new techniques of molecular phylogenetics have also shed light on some aspects of mammalian evolution by estimating the timing of important divergence points for modern species. When used carefully, these techniques often, but not always, agree with the fossil record.
Although mammary glands are a signature feature of modern mammals, little is known about the evolution of lactation as these soft tissues are not often preserved in the fossil record. Most research concerning the evolution of mammals centers on the shapes of the teeth, the hardest parts of the tetrapod body. Other important research characteristics include the evolution of the middle ear bones, erect limb posture, a bony secondary palate, fur, hair, and warm-bloodedness.

## Definition of "mammal"

While living mammal species can be identified by the presence of milk-producing mammary glands in the females, other features are required when classifying fossils, because mammary glands and other soft-tissue features are not visible in fossils.
One such feature available for paleontology, shared by all living mammals (including monotremes), but not present in any of the early Triassic therapsids, is shown in Figure 1 (on the right), namely: mammals use two bones for hearing that all other amniotes use for eating. The earliest amniotes had a jaw joint composed of the articular (a small bone at the back of the lower jaw) and the quadrate (a small bone at the back of the upper jaw). All non-mammalian tetrapods use this system including amphibians, turtles, lizards, snakes, crocodilians, dinosaurs (including the birds), ichthyosaurs, pterosaurs and therapsids. But mammals have a different jaw joint, composed only of the dentary (the lower jaw bone, which carries the teeth) and the squamosal (another small skull bone). In the Jurassic, their quadrate and articular bones evolved into the incus and malleus bones in the middle ear. Mammals also have a double occipital condyle; they have two knobs at the base of the skull that fit into the topmost neck vertebra, while other tetrapods have a single occipital condyle.
In a 1981 article, Kenneth A. Kermack and his co-authors argued for drawing the line between mammals and earlier synapsids at the point where the mammalian pattern of molar occlusion was being acquired and the dentary-squamosal joint had appeared. The criterion chosen, they noted, is merely a matter of convenience; their choice was based on the fact that "the lower jaw is the most likely skeletal element of a Mesozoic mammal to be preserved." Today, most paleontologists consider that animals are mammals if they satisfy this criterion.

## The ancestry of mammals

| Tetrapods Amphibians Amniotes Sauropsids (including dinosaurs) Synapsids Caseids Cotylorhynchus Eupelycosaurs Edaphosaurids Edaphosaurus Sphenacodontians Sphenacodontids Dimetrodon Therapsids Mammals | Pelycosaurs |

### Amniotes

The first fully terrestrial vertebrates were reptilian amniotes — their eggs had internal membranes that allowed the developing embryo to breathe but kept water in. This allowed amniotes to lay eggs on dry land, while amphibians generally need to lay their eggs in water (a few amphibians, such as the common Suriname toad, have evolved other ways of getting around this limitation). The first amniotes apparently arose in the middle Carboniferous from the ancestral reptiliomorphs.
Within a few million years, two important amniote lineages became distinct: synapsids, from which mammals are descended, and sauropsids, from which lizards, snakes, turtles/tortoises, crocodilians, dinosaurs, and birds are descended. The earliest known fossils of synapsids and sauropsids (such as Archaeothyris and Hylonomus, respectively) date from about 320 to 315 million years ago. The times of origin are difficult to know, because vertebrate fossils from the late Carboniferous are very rare, and therefore the actual first occurrences of each of these types of animal might have been considerably earlier than the first fossil.

### Synapsids

Synapsid skulls are identified by the distinctive pattern of the holes behind each eye, which served the following purposes:
* made the skull lighter without sacrificing strength.
* saved energy by using less bone.
* probably provided attachment points for jaw muscles. Having attachment points further away from the jaw made it possible for the muscles to be longer and therefore to exert a strong pull over a wide range of jaw movement without being stretched or contracted beyond their optimum range.
A number of creatures often – and incorrectly – believed to be dinosaurs, hence part of the reptile lineage and sauropsids, were in fact synapsids. This includes the well-known Dimetrodon.

#### Terms used for discussing non-mammalian synapsids

When referring to the ancestors and close relatives of mammals, paleontologists also use the following terms of convenience:
* Pelycosaurs — all synapsids, and all of their descendants, except for therapsids – the eventual ancestor of mammals. The pelycosaurs included the largest land vertebrates of the Early Permian, such as the 6 metre (20 foot)-long Cotylorhynchus hancocki. Among the other large pelycosaurs were Dimetrodon grandis and Edaphosaurus cruciger.
* Stem mammals (sometimes called protomammals or paramammals, and previously called mammal-like reptiles) — all synapsids, and all of their descendants, except for mammals themselves. Stem mammals therefore include all pelycosaurs, and also all non-mammalian therapsids. Traditionally these were known as "mammal-like reptiles", but this is incorrect; terms such as "stem mammal" are preferred instead, because these synapsids were neither reptiles nor even part of reptile lineage.

## Therapsids

Therapsids descended from sphenacodonts, a primitive synapsid, in the middle Permian, and took over from them as the dominant land vertebrates. They differ from earlier synapsids in several features of the skull and jaws, including larger temporal fenestrae and incisors that are equal in size.
The therapsid lineage then went through several stages, leading to the evolution of cynodonts in the late Permian, some of which had begun to resemble early mammals:
* gradual development of a bony secondary palate. Most books and articles interpret this as a prerequisite for the evolution of mammals' high metabolic rate, because it enabled these animals to eat and breathe at the same time. But some scientists point out that some modern ectotherms use a fleshy secondary palate to separate the mouth from the airway, and that a bony palate provides a surface on which the tongue can manipulate food, facilitating chewing rather than breathing. The interpretation of the bony secondary palate as an aid to chewing also suggests the development of a faster metabolism, because chewing reduces the size of food particles delivered to the stomach and can therefore speed their digestion. In mammals, the palate is formed by two specific bones, but various Permian therapsids had other combinations of bones in the right places to function as a palate.
* the dentary gradually becomes the main bone of the lower jaw.

### Therapsid family tree

A simplified phylogenetic tree showing only what is most relevant to the evolution of mammals is shown below:
Only the dicynodonts, therocephalians, and cynodonts survived into the Triassic.

### Biarmosuchia

The Biarmosuchia were the most primitive and pelycosaur-like of the therapsids.

### Dinocephalians

Dinocephalians ("terrible heads") included both carnivores and herbivores. They were large; Anteosaurus was up to 20 ft (6.1 m) long. Some of the carnivores had semi-erect hindlimbs, but all dinocephalians had sprawling forelimbs. In many ways they were very primitive therapsids; for example, they had no secondary palate and their jaws were rather "reptilian".

### Anomodonts

The anomodonts ("anomalous teeth") were among the most successful of the herbivorous therapsids — one sub-group, the dicynodonts, survived to the end of the Triassic. But dicynodonts were very different from modern herbivorous mammals, as their only teeth were a pair of fangs in the upper jaw (lost in some derived kannemeyeriiformes) and it is generally agreed that they had beaks like those of birds or ceratopsians.

### Theriodonts

The theriodonts ("beast teeth") and their descendants had jaw joints in which the articular bone of the lower jaw tightly gripped the very small quadrate bone of the skull. This allowed a much wider gape and allowed one group, the carnivorous gorgonopsians ("gorgon faces"), to develop "sabre teeth". However, the jaw hinge of the theriodont had a longer term significance — the much reduced size of the quadrate bone was an important step in the development of the mammalian jaw joint and middle ear.
The gorgonopsians still had some primitive features: no bony secondary palate (other bones in the right places perform the same functions); sprawling forelimbs; hindlimbs that could operate in both sprawling and erect postures. The therocephalians ("beast heads"), which appear to have arisen at about the same time as the gorgonopsians, had additional mammal-like features, e.g. their finger and toe bones had the same number of phalanges (segments) as in early mammals (and the same number that primates have, including humans). Numerous Changhsingian coprolites that possibly belong to therocephalians and indeterminate basal archosaurs (proterosuchids) contain elongated hollow structures that could be remains of hair. That means therapsids were covered in hair as early as 252 million years ago.

#### Cynodonts

The cynodonts, a theriodont group that also arose in the late Permian, include the ancestors of all mammals. Cynodonts' mammal-like features include further reduction in the number of bones in the lower jaw, a secondary bony palate, cheek teeth with a complex pattern in the crowns, and a brain which filled the endocranial cavity.
Multi-chambered burrows have been found, containing as many as 20 skeletons of the Early Triassic cynodont Trirachodon; the animals are thought to have been drowned by a flash flood. The extensive shared burrows indicate that these animals were capable of complex social behaviors.
Their primitive synapsid and therapsid ancestors were very large (between 5–8 ft (1.5–2.4 m)) but cynodonts gradually decreased in size (to 1.5–5 ft (0.46–1.52 m)) even before the Permian-Triassic extinction event, probably due to competition with other therapsids. After the extinction event, the probainognathian cynodont group rapidly decreased in size (to 4–18 in (100–460 mm)) due to new competition with archosaurs and transitioned to nocturnality, evolving nocturnal features, pulmonary alveoli, bronchioles and a developed diaphragm for a larger surface area for breathing, enucleated erythrocytes, a large intestine which bears a true colon after the cecum, endothermy, a hairy, glandular and thermoregulatory skin (which releases sebum and sweat), and a 4-chambered heart to maintain their high metabolism, larger brains, and fully upright hindlimb (forelimbs remained semi sprawling, and became like that only later, in therians). Some skin glands may have evolved into mammary glands in females for fulfilling the metabolic demands of their offspring (which increased 10 times). Many skeletal changes occurred also: the dentary bone became stronger and held differentiated teeth, for example, and the pair of nasal openings in the skull became fused.
These evolutionary changes led to the first mammals (size around 4 in (100 mm)). They appear to have evolved rapid growth and short lifespan, a life history trait also found in numerous modern small-bodied mammals. They also adapted to a burrowing lifestyle, losing their large tail-based leg muscles which allowed dinosaurs to become bipedal, which may explain why bipedal mammals are so rare.

## Triassic takeover

The catastrophic mass extinction at the end of the Permian, around 252 million years ago, killed off about 70% of terrestrial vertebrate species and the majority of land plants.
As a result, ecosystems and food chains collapsed, and the establishment of new stable ecosystems took about 30 million years. With the disappearance of the gorgonopsians, which were dominant predators in the late Permian, the cynodonts' principal competitors for dominance of the carnivorous niches were a previously obscure sauropsid group, the archosaurs, which includes the ancestors of crocodilians and dinosaurs.
The archosaurs quickly became the dominant carnivores, a development often called the "Triassic takeover". Their success may have been due to the fact that the early Triassic was predominantly arid and therefore archosaurs' superior water conservation gave them a decisive advantage. All known archosaurs have glandless skins and eliminate nitrogenous waste in a uric acid paste containing little water, while the cynodonts probably excreted most such waste in a solution of urea, as mammals do today; considerable water is required to keep urea dissolved.
However, this theory has been questioned, since it implies synapsids were necessarily less advantaged in water retention, that synapsid decline coincides with climate changes or archosaur diversity (neither of which has been tested) and the fact that desert-dwelling mammals are as well adapted in this department as archosaurs, and some cynodonts like Trucidocynodon were large-sized predators.
The Triassic takeover was probably a vital factor in the evolution of the mammals. Two groups stemming from the early cynodonts were successful in niches that had minimal competition from the archosaurs: the tritylodonts, which were herbivores, and the mammals, most of which were small nocturnal insectivores (although some, like Sinoconodon, were carnivores that fed on vertebrate prey, while still others were herbivores or omnivores). As a result:
* The therapsid trend towards differentiated teeth with precise occlusion accelerated, because of the need to hold captured arthropods and crush their exoskeletons.
* As the body length of the mammals' ancestors fell below 4 in (100 mm), advances in thermal insulation and temperature regulation would have become necessary for nocturnal life.
* Acute senses of hearing and smell became vital.
** This accelerated the development of the mammalian middle ear (though the complete detachment of the middle ear bones from the jaw happened independently in monotremes).
** The increase in the size of the olfactory lobes of the brain increased brain weight as a percentage of total body weight. Brain tissue requires a disproportionate amount of energy. The need for more food to support the enlarged brains increased the pressures for improvements in insulation, temperature regulation and feeding.
* Probably as a side-effect of the nocturnal life, mammals lost two of the four cone opsins, photoreceptors in the retina, present in the eyes of the earliest amniotes. Paradoxically, this might have improved their ability to discriminate colors in dim light.
This retreat to a nocturnal role is called a nocturnal bottleneck, and is thought to explain many of the features of mammals.

## From cynodonts to crown mammals
### Fossil record

Mesozoic synapsids that had evolved to the point of having a jaw joint composed of the dentary and squamosal bones are preserved in few good fossils, mainly because they were mostly smaller than rats:
* They were largely restricted to environments that are less likely to provide good fossils. Floodplains as the best terrestrial environments for fossilization provide few mammal fossils, because they are dominated by medium to large animals, and the mammals could not compete with archosaurs in the medium to large size range.
* Their delicate bones were vulnerable to being destroyed before they could be fossilized — by scavengers (including fungi and bacteria) and by being trodden on.
* Small fossils are harder to spot and more vulnerable to being destroyed by weathering and other natural stresses before they are discovered.
In the past 50 years, however, the number of Mesozoic fossil mammals has increased decisively; only 116 genera were known in 1979, for example, but about 310 in 2007, with an increase in quality such that "at least 18 Mesozoic mammals are represented by nearly complete skeletons".

### Mammals or mammaliaforms

Some writers restrict the term "mammal" to the crown group mammals, the group consisting of the most recent common ancestor of the monotremes, marsupials, and placentals, together with all the descendants of that ancestor. In an influential 1988 paper, Timothy Rowe advocated this restriction, arguing that "ancestry... provides the only means of properly defining taxa" and, in particular, that the divergence of the monotremes from the animals more closely related to marsupials and placentals "is of central interest to any study of Mammalia as a whole." To accommodate some related taxa falling outside the crown group, he defined the Mammaliaformes as comprising "the last common ancestor of Morganucodontidae and Mammalia [as he had defined the latter term] and all its descendants." Besides Morganucodontidae, the newly defined taxon includes Docodonta and Kuehneotheriidae. Though haramiyids have been referred to the mammals since the 1860s, Rowe excluded them from the Mammaliaformes as falling outside his definition, putting them in a larger clade, the Mammaliamorpha.
Some writers have adopted this terminology noting, to avoid misunderstanding, that they have done so. Most paleontologists, however, still think that animals with the dentary-squamosal jaw joint and the sort of molars characteristic of modern mammals should formally be members of Mammalia.
Where the ambiguity in the term "mammal" may be confusing, this article uses "mammaliaform" and "crown mammal".

### Family tree – cynodonts to crown group mammals

(based on Cynodontia:Dendrogram – Palaeos)

### Morganucodontidae

The Morganucodontidae first appeared in the late Triassic, about 205 million years ago. They are an excellent example of transitional fossils, since they have both the dentary-squamosal and articular-quadrate jaw joints. They were also one of the first discovered and most thoroughly studied of the mammaliaforms outside of the crown-group mammals, since an unusually large number of morganucodont fossils have been found.

### Docodonts

Docodonts, among the most common Jurassic mammaliaforms, are noted for the sophistication of their molars. They are thought to have had general semi-aquatic tendencies, with the fish-eating Castorocauda ("beaver tail"), which lived in the mid-Jurassic about 164M years ago and was first discovered in 2004 and described in 2006, being the most well-understood example. Castorocauda was not a crown group mammal, but it is extremely important in the study of the evolution of mammals because the first find was an almost complete skeleton (a real luxury in paleontology) and it breaks the "small nocturnal insectivore" stereotype:
* It was noticeably larger than most Mesozoic mammaliaform fossils — about 17 in (430 mm) from its nose to the tip of its 5 in (130 mm) tail, and may have weighed 500–800 g (18–28 oz).
* It provides the earliest absolutely certain evidence of hair and fur. Previously the earliest was Eomaia, a crown group mammal from about 125M years ago.
* It had aquatic adaptations including flattened tail bones and remnants of soft tissue between the toes of the back feet, suggesting that they were webbed. Previously the earliest known semi-aquatic mammaliaforms were from the Eocene, about 110M years later.
* Castorocauda's powerful forelimbs look adapted for digging. This feature and the spurs on its ankles make it resemble the platypus, which also swims and digs.
* Its teeth look adapted for eating fish: the first two molars had cusps in a straight row, which made them more suitable for gripping and slicing than for grinding; and these molars are curved backwards, to help in grasping slippery prey.

### Hadrocodium

The family tree above shows Hadrocodium as a close relative of crown-group mammals. This mammaliaform, dated about 195 million years ago in the very early Jurassic, exhibits some important features:
* The jaw joint consists only of the squamosal and dentary bones, and the jaw contains no smaller bones to the rear of the dentary, unlike the therapsid design.
* In therapsids and early mammaliaforms, the eardrum may have stretched over a trough at the rear of the lower jaw. But Hadrocodium had no such trough, which suggests its ear was part of the cranium, as it is in crown-group mammals — and hence that the former articular and quadrate had migrated to the middle ear and become the malleus and incus. On the other hand, the dentary has a "bay" at the rear that mammals lack. This suggests that Hadrocodium's dentary bone retained the same shape that it would have had if the articular and quadrate had remained part of the jaw joint, and therefore that Hadrocodium or a very close ancestor may have been the first to have a fully mammalian middle ear.
* Therapsids and earlier mammaliaforms had their jaw joints very far back in the skull, partly because the ear was at the rear end of the jaw but also had to be close to the brain. This arrangement limited the size of the braincase, because it forced the jaw muscles to run round and over it. Hadrocodium's braincase and jaws were no longer bound to each other by the need to support the ear, and its jaw joint was further forward. In its descendants or those of animals with a similar arrangement, the brain case was free to expand without being constrained by the jaw and the jaw was free to change without being constrained by the need to keep the ear near the brain — in other words it now became possible for mammaliaforms both to develop large brains and to adapt their jaws and teeth in ways that were purely specialized for eating.

### Kuehneotheriidae

The family Kuehneotheriidae, known from the Late Triassic and Early Jurassic, was originally classified as part of either 'Symmetrodonta' or 'Pantotheria' based on their tooth structure, with Kuehneotherium once being considered the oldest known representative of Theria. They have since been recovered as among the closest relatives of crown-group mammals. As only tooth fossils have been discovered, they nevertheless remain poorly known, and have rarely been included in phylogenetic studies.

## Earliest crown mammals

The crown group mammals, sometimes called 'true mammals', are the extant mammals and their close relatives back to their last common ancestor. Since this group has living members, DNA analysis can be applied in an attempt to explain the evolution of features that do not appear in fossils. This endeavor often involves molecular phylogenetics, a technique that has become popular since the mid-1980s.

### Family tree of early crown mammals

Cladogram after Z.-X Luo († marks extinct groups) and Hackländer.

### Color vision

Early amniotes had four opsins in the cones of their retinas to use for distinguishing colours: one sensitive to red, one to green, and two corresponding to different shades of blue. The green opsin was not inherited by any crown mammals, but all normal individuals did inherit the red one. Early crown mammals thus had three cone opsins, the red one and both of the blues. All their extant descendants have lost one of the blue-sensitive opsins but not always the same one: monotremes retain one blue-sensitive opsin, while marsupials and placentals retain the other (except cetaceans, which later lost the other blue opsin as well). Some placentals and marsupials, including higher primates, subsequently evolved green-sensitive opsins; like early crown mammals, therefore, their vision is trichromatic.

### Australosphenida and Ausktribosphenidae

Ausktribosphenidae is a group name that has been given to some rather puzzling finds that:
* appear to have tribosphenic molars, a type of tooth that is otherwise known only in placentals and marsupials.
* come from mid-Cretaceous deposits in Australia — but Australia was connected only to Antarctica, and placentals originated in the Northern Hemisphere and were confined to it until continental drift formed land connections from North America to South America, from Asia to Africa and from Asia to India.
* are represented only by teeth and jaw fragments, which is not very helpful.
Australosphenida is a group that has been defined in order to include the Ausktribosphenidae and monotremes. Asfaltomylos (mid- to late Jurassic, from Patagonia) has been interpreted as a basal australosphenid (animal that has features shared with both Ausktribosphenidae and monotremes; lacks features that are peculiar to Ausktribosphenidae or monotremes; also lacks features that are absent in Ausktribosphenidae and monotremes) and as showing that australosphenids were widespread throughout Gondwanaland (the old Southern Hemisphere super-continent).
Recent analysis of Teinolophos, which lived somewhere between 121 and 112.5 million years ago, suggests that it was a "crown group" (advanced and relatively specialised) monotreme. This was taken as evidence that the basal (most primitive) monotremes must have appeared considerably earlier, but this has been disputed (see the following section). The study also indicated that some alleged Australosphenids were also "crown group" monotremes (e.g. Steropodon) and that other alleged Australosphenids (e.g. Ausktribosphenos, Bishops, Ambondro, Asfaltomylos) are more closely related to and possibly members of the Therian mammals (group that includes marsupials and placentals, see below).

### Monotremes

Teinolophos, from Australia, is the earliest known monotreme. A 2007 study (published 2008) suggests that it was not a basal (primitive, ancestral) monotreme but a full-fledged platypus, and therefore that the platypus and echidna lineages diverged considerably earlier. A more recent study (2009), however, has suggested that, while Teinolophos was a type of platypus, it was also a basal monotreme and predated the radiation of modern monotremes. The semi-aquatic lifestyle of platypuses prevented them from being outcompeted by the marsupials that migrated to Australia millions of years ago, since joeys need to remain attached to their mothers and would drown if their mothers ventured into water (though there are exceptions like the water opossum and the lutrine opossum; however, they both live in South America and thus do not come into contact with monotremes). Genetic evidence has determined that echidnas diverged from the platypus lineage as recently as 19-48M, when they made their transition from semi-aquatic to terrestrial lifestyle.
Monotremes have some features that may be inherited from the cynodont ancestors:
* like lizards and birds, they use the same orifice to urinate, defecate and reproduce ("monotreme" means "one hole").
* they lay eggs that are leathery and uncalcified, like those of lizards, turtles and crocodilians.
Unlike other mammals, female monotremes do not have nipples and feed their young by "sweating" milk from patches on their bellies.
These features are not visible in fossils, and the main characteristics from paleontologists' point of view are:
* a slender dentary bone in which the coronoid process is small or non-existent.
* the external opening of the ear lies at the posterior base of the jaw.
* the jugal bone is small or non-existent.
* a primitive pectoral girdle with strong ventral elements: coracoids, clavicles and interclavicle. Note: therian mammals have no interclavicle.
* sprawling or semi-sprawling forelimbs.

### Multituberculates

Multituberculates (named for the multiple tubercles on their "molars") are often called the "rodents of the Mesozoic", but this is an example of convergent evolution rather than meaning that they are closely related to the Rodentia. They existed for approximately 120 million years—the longest fossil history of any mammal lineage—but were eventually outcompeted by rodents, becoming extinct during the early Oligocene.
Some authors have challenged the phylogeny represented by the cladogram above. They exclude the multituberculates from the mammalian crown group, holding that multituberculates are more distantly related to extant mammals than even the Morganucodontidae. Multituberculates are like undisputed crown mammals in that their jaw joints consist of only the dentary and squamosal bones-whereas the quadrate and articular bones are part of the middle ear; their teeth are differentiated, occlude, and have mammal-like cusps; they have a zygomatic arch; and the structure of the pelvis suggests that they gave birth to tiny helpless young, like modern marsupials. On the other hand, they differ from modern mammals:
* Their "molars" have two parallel rows of tubercles, unlike the tribosphenic (three-peaked) molars of uncontested early crown mammals.
* The chewing action differs in that undisputed crown mammals chew with a side-to-side grinding action, which means that the molars usually occlude on only one side at a time, while multituberculates' jaws were incapable of side-to-side movement—they chewed, rather, by dragging the lower teeth backwards against the upper ones as the jaw closed.
* The anterior (forward) part of the zygomatic arch mostly consists of the maxilla (upper jawbone) rather than the jugal, a small bone in a little slot in the maxillary process (extension).
* The squamosal does not form part of the braincase.
* The rostrum (snout) is unlike that of undisputed crown mammals; in fact it looks more like that of a pelycosaur, such as Dimetrodon. The multituberculate rostrum is box-like, with the large flat maxillae forming the sides, the nasal the top, and the tall premaxilla at the front.

### Theria

Theria ("beasts") is the clade originating with the last common ancestor of the Eutheria (including placentals) and Metatheria (including marsupials). Common features include:
* no interclavicle.
* coracoid bones non-existent or fused with the shoulder blades to form coracoid processes.
* a type of crurotarsal ankle joint in which: the main joint is between the tibia and astragalus; the calcaneum has no contact with the tibia but forms a heel to which muscles can attach. (The other well-known type of crurotarsal ankle is seen in crocodilians and works differently — most of the bending at the ankle is between the calcaneum and astragalus).
* tribosphenic molars.

### Metatheria

The living Metatheria are all marsupials (animals with pouches). A few fossil genera, such as the Mongolian late Cretaceous Asiatherium, may be marsupials or members of some other metatherian group(s).
The oldest known metatherian is Sinodelphys, found in 125M-year-old early Cretaceous shale in China's northeastern Liaoning Province. The fossil is nearly complete and includes tufts of fur and imprints of soft tissues.
Didelphimorphia (common opossums of the Western Hemisphere) first appeared in the late Cretaceous and still have living representatives, probably because they are mostly semi-arboreal unspecialized omnivores.
Tracks from the Early Cretaceous of Angola show the existence of raccoon-size mammals 118 million years ago.
The best-known feature of marsupials is their method of reproduction:
* The mother develops a kind of yolk sack in her womb that delivers nutrients to the embryo. Embryos of bandicoots, koalas and wombats additionally form placenta-like organs that connect them to the uterine wall, although the placenta-like organs are smaller than in placental mammals and it is not certain that they transfer nutrients from the mother to the embryo.
* Pregnancy is very short, typically four to five weeks. The embryo is born at a very early stage of development, and is usually less than 2 in (51 mm) long at birth. It has been suggested that the short pregnancy is necessary to reduce the risk that the mother's immune system will attack the embryo.
* The newborn marsupial uses its forelimbs (with relatively strong hands) to climb to a nipple, which is usually in a pouch on the mother's belly. The mother feeds the baby by contracting muscles over her mammary glands, as the baby is too weak to suck. The newborn marsupial's need to use its forelimbs in climbing to the nipple was historically thought to have restricted metatherian evolution, as it was assumed that the forelimb could not become specialised intro structures like wings, hooves or flippers. However, several bandicoots, most notably the pig-footed bandicoot, have true hooves similar to those of placental ungulates, and several marsupial gliders have evolved.
Although some marsupials look very like some placentals (the thylacine, "marsupial tiger" or "marsupial wolf" is a good example), marsupial skeletons have some features that distinguish them from placentals:
* Some, including the thylacine, have four molars; whereas no known placental has more than three.
* All have a pair of palatal fenestrae, window-like openings on the bottom of the skull (in addition to the smaller nostril openings).
Marsupials also have a pair of marsupial bones (sometimes called "epipubic bones"), which support the pouch in females. But these are not unique to marsupials, since they have been found in fossils of multituberculates, monotremes, and even eutherians — so they are probably a common ancestral feature that disappeared at some point after the ancestry of living placental mammals diverged from that of marsupials. Some researchers think the epipubic bones' original function was to assist locomotion by supporting some of the muscles that pull the thigh forwards.

### Eutheria

The time of appearance of the earliest eutherians has been a matter of controversy. On one hand, recently discovered fossils of Juramaia have been dated to 160 million years ago and classified as eutherian. Fossils of Eomaia from 125 million years ago in the Early Cretaceous have also been classified as eutherian. A recent analysis of phenomic characters, however, classified Eomaia as pre-eutherian and reported that the earliest clearly eutherian specimens came from Maelestes, dated to 91 million years ago. That study also reported that eutherians did not significantly diversify until after the catastrophic extinction at the Cretaceous–Paleogene boundary, about 66 million years ago.
Eomaia was found to have some features that are more like those of marsupials and earlier metatherians:
* Epipubic bones extending forwards from the pelvis, which are not found in any modern placental, but are found in all other mammals — early mammaliaforms, non-placental eutherians, marsupials, and monotremes — as well as in the cynodont therapsids that are closest to mammals. Their function is to stiffen the body during locomotion. This stiffening would be harmful in pregnant placentals, whose abdomens need to expand.
* A narrow pelvic outlet, which indicates that the young were very small at birth and therefore pregnancy was short, as in modern marsupials. This suggests that the placenta was a later development.
* Five incisors in each side of the upper jaw. This number is typical of metatherians, and the maximum number in modern placentals is three, except for homodonts, such as the armadillo. But Eomaia's molar to premolar ratio (it has more pre-molars than molars) is typical of eutherians, including placentals, and not normal in marsupials.
Eomaia also has a Meckelian groove, a primitive feature of the lower jaw that is not found in modern placental mammals.
These intermediate features are consistent with molecular phylogenetics estimates that the placentals diversified about 110M years ago, 15M years after the date of the Eomaia fossil.
Eomaia also has many features that strongly suggest it was a climber, including several features of the feet and toes; well-developed attachment points for muscles that are used a lot in climbing; and a tail that is twice as long as the rest of the spine.
Placentals' best-known feature is their method of reproduction:
* The embryo attaches itself to the uterus via a large placenta via which the mother supplies food and oxygen and removes waste products.
* Pregnancy is relatively long and the young are fairly well developed at birth. In some species (especially herbivores living on plains) the young can walk and even run within an hour of birth.
It has been suggested that the evolution of placental reproduction was made possible by retroviruses that:
* make the interface between the placenta and uterus into a syncytium, i.e. a thin layer of cells with a shared external membrane. This allows the passage of oxygen, nutrients and waste products, but prevents the passage of blood and other cells that would cause the mother's immune system to attack the fetus.
* reduce the aggressiveness of the mother's immune system, which is good for the foetus but makes the mother more vulnerable to infections.
From a paleontologist's point of view, eutherians are mainly distinguished by various features of their teeth, ankles and feet.

## Expansion of ecological niches in the Mesozoic

Generally speaking, most species of mammaliaforms did occupy the niche of small, nocturnal insectivores, but recent finds, mainly in China, show that some species and especially crown group mammals were larger and that there was a larger variety of lifestyles than previously thought. For example:
* The therian Patagomaia, found in the Late Cretaceous Chorrillo Formation (Argentina) is the largest known Mesozoic mammal, weighing an estimated 14 kilograms (31 lb).
* Adalatherium hui is a large sized, erect limbed herbivore from the Cretaceous of Madagascar.
* Castorocauda, a member of Docodonta which lived in the middle Jurassic about 164 million years, was about 42.5 cm (16.7 in) long, weighed 500–800 g (18–28 oz), had a beaver-like tail that was adapted for swimming, limbs adapted for swimming and digging, and teeth adapted for eating fish. Another docodont, Haldanodon, also had semi-aquatic habits, and indeed aquatic tendencies were probably common among docodonts based on their prevalence in wetland environments. The eutriconodonts Liaoconodon and Yanoconodon have more recently also have been suggested to be freshwater swimmers, lacking Castorocauda's powerful tail but possessing paddle-like limbs; the eutriconodont Astroconodon has similarly been suggested as being semi-aquatic in the past, albeit to less convincing evidence.
* Multituberculates are allotherians that survived for over 125 million years (from mid-Jurassic, about 160M years ago, to late Eocene, about 35M years ago) are often called the "rodents of the Mesozoic". As noted above, they may have given birth to tiny live neonates rather than laying eggs.
* Fruitafossor, from the late Jurassic period about 150 million years ago, was about the size of a chipmunk and its teeth, forelimbs and back suggest that it broke open the nest of social insects to prey on them (probably termites, as ants had not yet appeared).
* Similarly, the gobiconodontid Spinolestes possessed adaptations for fossoriality and convergent traits with placental xenarthrans like scutes and xenarthrous vertebrae, so it too might have had anteater like habits. It is also notable for the presence of quills akin to those of modern spiny mice.
* Volaticotherium, from the boundary the early Cretaceous about 125M years ago, is the earliest-known gliding mammal and had a gliding membrane that stretched out between its limbs, rather like that of a modern flying squirrel. This also suggests it was active mainly during the day. The closely related Argentoconodon also shows similar adaptations that may also suggest aerial locomotion.
* Repenomamus, a eutriconodont from the early Cretaceous 130 million years ago, was a stocky, badger-like predator that sometimes preyed on young dinosaurs. Two species have been recognized, one more than 1 m (3 ft 3 in) long and weighing about 12–14 kg (26–31 lb), the other less than 0.5 m (1 ft 8 in) long and weighing 4–6 kg (8.8–13.2 lb).
* Schowalteria is a Late Cretaceous species almost as large if not larger than R. giganticus that shows speciations towards herbivory, comparable to those of modern ungulates.
* Zhelestidae is a lineage of Late Cretaceous herbivorous eutherians, to the point of being mistaken for stem-ungulates.
* Similarly, mesungulatids are also fairly large sized herbivorous mammals from the Late Cretaceous
* Deltatheroidans were metatherians that were specialised towards carnivorous habits, and possible forms like Oxlestes and Khudulestes might have been among the largest Mesozoic mammals, though their status as deltatheroidans is questionable.
* Ichthyoconodon, a eutriconodont from the Berriasian of Morocco, is currently known from molariforms found in marine deposits. These teeth are sharp-cusped and similar in shape to those of piscivorous mammals, and unlike the teeth of contemporary mammals they do not show degradation, so rather than being carried down by river deposits the animal died in situ or close. This has been taken to mean that it was a marine mammal, likely one of the few examples known from the Mesozoic.
* Didelphodon is a Late Cretaceous riverine species of stagodontid marsupialiform with a durophagous dentition, robust jaws similar to a modern Tasmanian devil, and a postcranial skeleton very similar in size and shape to an otter. This animal has been lauded as the strongest bite of all Mesozoic mammals. It possibly specialized on eating freshwater crabs and molluscs.
* Tracks of a raccoon-sized mammaliaform representing the morphofamily Ameghinichnidae are described from the Early Cretaceous (late Aptian) Calonda Formation (Angola) by Mateus et al. (2017), who name a new ichnotaxon Catocapes angolanus.
* A gobiconodontid was preserved attacking a substantially larger dinosaur.
A study on Mesozoic mammaliaforms suggests that they were a primary factor in constraining mammalian body size, rather than solely competition from dinosaurs. In general, it appears mammal faunas on southern continents had attained larger body sizes than those of northern continents.

## Evolution of major groups of living mammals

There are currently vigorous debates between traditional paleontologists and molecular phylogeneticists about how and when the modern groups of mammals diversified, especially the placentals. Generally, the traditional paleontologists date the appearance of a particular group by the earliest known fossil whose features make it likely to be a member of that group, while the molecular phylogeneticists suggest that each lineage diverged earlier (usually in the Cretaceous) and that the earliest members of each group were anatomically very similar to early members of other groups and differed only in their genetics. These debates extend to the definition of and relationships between the major groups of placentals.

### Molecular phylogenetics-based family tree of placental mammals

Molecular phylogenetics uses features of organisms' genes to work out family trees in much the same way as paleontologists do with features of fossils — if two organisms' genes are more similar to each other than to those of a third organism, the two organisms are more closely related to each other than to the third.
Molecular phylogeneticists have proposed a family tree that is both broadly similar to but has notable differences from that of the paleontologists. Like paleontologists, molecular phylogeneticists have differing ideas about various details, but here is a typical family tree according to molecular phylogenetics: Note that the diagram shown here omits extinct groups, as one cannot extract DNA from most fossils. Some finer-level subdivisions are glossed-over.
Here are the most significant of the differences between this family tree and the one familiar to paleontologists:
* The top-level division is between Atlantogenata and Boreoeutheria, instead of between Xenarthra and the rest. However, analysis of transposable element insertions supports a three-way top-level split between Xenarthra, Afrotheria and Boreoeutheria and the Atlantogenata clade does not receive significant support in recent distance-based molecular phylogenetics.
* Afrotheria contains several groups that are only distantly related according to the paleontologists' version: Afroinsectiphilia ("African insectivores"), Tubulidentata (aardvarks, which paleontologists regard as much closer to odd-toed ungulates than to other members of Afrotheria), Macroscelidea (elephant shrews, usually regarded as close to rabbits and rodents). The only members of Afrotheria that paleontologists would regard as closely related are Hyracoidea (hyraxes), Proboscidea (elephants) and Sirenia (manatees, dugongs).
* Members of the defunct order of Insectivores are divided among three clades: One clade is part of Afrotheria, and the other two clades are distinct sub-groups within Boreoeutheria.
* Bats are closer to Carnivora and odd-toed ungulates than to Primates and Dermoptera (colugos).
* Perissodactyla (odd-toed ungulates) are closer to Carnivora and bats than to Artiodactyla (even-toed ungulates).
The grouping together of the Afrotheria has some geological justification: All surviving members of the Afrotheria originate from South American or (mainly) African lineages — even the Indian elephant, which diverged from an African lineage about 7.6 million years ago. As Pangaea broke up, Africa and South America separated from the other continents less than 150M years ago, and from each other between 100M and 80M years ago. So it would not be surprising if the earliest eutherian immigrants into Africa and South America were isolated there and radiated into all the available ecological niches.
Nevertheless, these proposals have been controversial. Paleontologists naturally insist that fossil evidence must take priority over deductions from samples of the DNA of modern animals. More surprisingly, these new family trees have been criticised by other molecular phylogeneticists, sometimes quite harshly:
* Mitochondrial DNA's mutation rate in mammals varies from region to region — some parts hardly ever change and some change extremely quickly and even show large variations between individuals within the same species.
* Mammalian mitochondrial DNA mutates so fast that it causes a problem called "saturation", where random noise drowns out any information that may be present. If a particular piece of mitochondrial DNA mutates randomly every few million years, it will have changed several times in the 60 to 75M years since the major groups of placental mammals diverged.

### Timing of placental evolution

Recent molecular phylogenetic studies suggest that most placental orders diverged late in the Cretaceous period, about 100 to 85 million years ago, but that modern families first appeared later, in the late Eocene and early Miocene epochs of the Cenozoic period. Fossil-based analyses, on the contrary, limit the placentals to the Cenozoic. Many Cretaceous fossil sites contain well-preserved lizards, salamanders, birds, and mammals, but not the modern forms of mammals. It is possible that they simply did not exist, and that the molecular clock runs fast during major evolutionary radiations. On the other hand, there is fossil evidence from 85 million years ago of hoofed mammals that may be ancestors of modern ungulates.
Fossils of the earliest members of most modern groups date from the Paleocene, a few date from later and very few from the Cretaceous, before the extinction of the dinosaurs. But some paleontologists, influenced by molecular phylogenetic studies, have used statistical methods to extrapolate backwards from fossils of members of modern groups and concluded that primates arose in the late Cretaceous. However, statistical studies of the fossil record confirm that mammals were restricted in size and diversity right to the end of the Cretaceous, and rapidly grew in size and diversity during the Early Paleocene.

## Evolution of mammalian features
### Jaws and middle ears

Hadrocodium, whose fossils date from the early Jurassic, provides the first clear evidence of fully mammalian jaw joints and middle ears, in which the jaw joint is formed by the dentary and squamosal bones while the articular and quadrate move to the middle ear, where they are known as the incus and malleus.
One analysis of the monotreme Teinolophos suggested that this animal had a pre-mammalian jaw joint formed by the angular and quadrate bones and that the definitive mammalian middle ear evolved twice independently, in monotremes and in therian mammals, but this idea has been disputed. In fact, two of the suggestion's authors co-authored a later paper that reinterpreted the same features as evidence that Teinolophos was a full-fledged platypus, which means it would have had a mammalian jaw joint and middle ear.

### Lactation

It has been suggested that lactation's original function was to keep eggs moist. Much of the argument is based on monotremes (egg-laying mammals):
* While the amniote egg is usually described as able to evolve away from water, most reptile eggs actually need moisture if they are not to dry out.
* Monotremes do not have nipples, but secrete milk from a hairy patch on their bellies.
* During incubation, monotreme eggs are covered in a sticky substance whose origin is not known. Before the eggs are laid, their shells have only three layers. Afterwards, a fourth layer appears with a composition different from that of the original three. The sticky substance and the fourth layer may be produced by the mammary glands.
* If so, that may explain why the patches from which monotremes secrete milk are hairy. It is easier to spread moisture and other substances over the egg from a broad, hairy area than from a small, bare nipple.
Later research demonstrated that caseins already appeared in the common mammalian ancestor approximately 200–310 million years ago. The question of whether secretions of a substance to keep eggs moist translated into actual lactation in therapsids is open. A small mammaliomorph called Sinocodon, generally assumed to be the sister group of all later mammals, had front teeth in even the smallest individuals. Combined with a poorly ossified jaw, they very probably did not suckle. Thus suckling may have evolved right at the pre-mammal/mammal transition. However, tritylodontids, generally assumed to be more basal, show evidence of suckling. Morganucodontans, also assumed to be basal Mammaliaformes, also show evidence of lactation.

### Digestive system

The evolution of the digestive system has formed a significant influence in mammal evolution. With the emergence of mammals, the digestive system was modified in a variety of ways depending on the animal's diet. For example, cats and most carnivores have simple large intestines, while the horse as a herbivore has a voluminous large intestine. An ancestral feature of ruminants is their multi-chambered (usually four-chambered) stomach, which evolved about 50 million years ago. Along with morphology of the gut, gastric acidity has been proposed as a key factor shaping the diversity and composition of microbial communities found in the vertebrate gut. Comparisons of stomach acidity across trophic groups in mammal and bird taxa show that scavengers and carnivores have significantly higher stomach acidities compared to herbivores or carnivores feeding on phylogenetically distant prey such as insects or fish.
Despite the lack of fossilization of the gut, microbial evolution of the gut can be inferred from the interrelationships of existing animals, microbes and probable foodstuffs. Mammals are metagenomic, in that they are composed of not only their own genes, but also those of all of their associated microbes. Gut microbiota has co-diversified as mammalian species have evolved. Recent studies indicate that adaptive divergence between mammalian species is shaped in part by changes in the gut microbiota. The house mouse may have evolved not only with, but also in response to, the unique bacteria inhabiting its gut.

### Hair and fur

The first clear evidence of hair or fur is in fossils of Castorocauda and Megaconus, from 164M years ago in the mid-Jurassic. As both mammals Megaconus and Castorocauda have a double coat of hair, with both guard hairs and an undercoat, it may be assumed that their last common ancestor did as well. More recently, the discovery of hair remnants in Permian coprolites pushes back the origin of mammalian hair much further back in the synapsid line to Paleozoic therapsids.
In the mid-1950s, some scientists interpreted the foramina (passages) in the maxillae (upper jaws) and premaxillae (small bones in front of the maxillae) of cynodonts as channels that supplied blood vessels and nerves to vibrissae (whiskers) and suggested that this was evidence of hair or fur. It was soon pointed out, however, that foramina do not necessarily show that an animal had vibrissae; the modern lizard Tupinambis has foramina that are almost identical to those found in the non-mammalian cynodont Thrinaxodon. Popular sources, nevertheless, continue to attribute whiskers to Thrinaxodon. A trace fossil from the Lower Triassic had been erroneously regarded as a cynodont footprint showing hair, but this interpretation has been refuted. A study of cranial openings for facial nerves connected whiskers in extant mammals indicate the Prozostrodontia, small immediate ancestors of mammals, presented whiskers similar to mammals, but that less advanced therapsids would either have immobile whiskers or no whisker at all. Fur may have evolved from whiskers. Whiskers themselves may have evolved as a response to nocturnal and/or burrowing lifestyle.
Ruben & Jones (2000) note that the Harderian glands, which secrete lipids for coating the fur, were present in the earliest mammals like Morganucodon, but were absent in near-mammalian therapsids like Thrinaxodon. The Msx2 gene associated with hair follicle maintenance is also linked to the closure of the parietal eye in mammals, indicating that fur and lack of pineal eye is linked. The pineal eye is present in Thrinaxodon, but absent in more advanced cynognaths (the Probainognathia).
Insulation is the "cheapest" way to maintain a fairly constant body temperature, without consuming energy to produce more body heat. Therefore, the possession of hair or fur would be good evidence of homeothermy, but would not be such strong evidence of a high metabolic rate.

### Erect limbs

Understanding of the evolution of erect limbs in mammals is incomplete — living and fossil monotremes have sprawling limbs. Some scientists think that the parasagittal (non-sprawling) limb posture is limited to the Boreosphenida, a group that contains the therians but not, for example, the multituberculates. In particular, they attribute a parasagittal stance to the therians Sinodelphys and Eomaia, which means that the stance had arisen by 125 million years ago, in the Early Cretaceous. However, they also discuss that earlier mammals had more erect forelimbs as opposed to the more sprawling hindlimbs, a trend still continued to some extent in modern placentals and marsupials.

### Warm-bloodedness

"Warm-bloodedness" is a complex and rather ambiguous term, because it includes some or all of the following:
* Endothermy, the ability to generate heat internally rather than via behaviors such as basking or muscular activity.
* Homeothermy, maintaining a fairly constant body temperature. Most enzymes have an optimum operating temperature; efficiency drops rapidly outside the preferred range. A homeothermic organism needs only to possess enzymes that function well in a small range of temperatures.
* Tachymetabolism, maintaining a high metabolic rate, particularly when at rest. This requires a fairly high and stable body temperature because of the Q$_{10}$ effect: biochemical processes run about half as fast if an animal's temperature drops by 10 °C.
Since scientists cannot know much about the internal mechanisms of extinct creatures, most discussion focuses on homeothermy and tachymetabolism. However, it is generally agreed that endothermy first evolved in non-mammalian synapsids such as dicynodonts, which possess body proportions associated with heat retention, high vascularised bones with Haversian canals, and possibly hair. More recently, it has been suggested that endothermy evolved as far back as Ophiacodon.
Modern monotremes have a low body temperature compared to marsupials and placental mammals, around 32 °C (90 °F). Phylogenetic bracketing suggests that the body temperatures of early crown-group mammals were not less than that of extant monotremes. There is cytological evidence that the low metabolism of monotremes is a secondarily evolved trait.

#### Respiratory turbinates

Modern mammals have respiratory turbinates, convoluted structures of thin bone in the nasal cavity. These are lined with mucous membranes that warm and moisten inhaled air and extract heat and moisture from exhaled air. An animal with respiratory turbinates can maintain a high rate of breathing without the danger of drying its lungs out, and therefore may have a fast metabolism. Unfortunately these bones are very delicate and therefore have not yet been found in fossils. But rudimentary ridges like those that support respiratory turbinates have been found in advanced Triassic cynodonts, such as Thrinaxodon and Diademodon, which suggests that they may have had fairly high metabolic rates.

#### Bony secondary palate

Mammals have a secondary bony palate, which separates the respiratory passage from the mouth, allowing them to eat and breathe at the same time. Secondary bony palates have been found in the more advanced cynodonts and have been used as evidence of high metabolic rates. But some cold-blooded vertebrates have secondary bony palates (crocodilians and some lizards), while birds, which are warm-blooded, do not.

#### Diaphragm

A muscular diaphragm helps mammals to breathe, especially during strenuous activity. For a diaphragm to work, the ribs must not restrict the abdomen, so that expansion of the chest can be compensated for by reduction in the volume of the abdomen and vice versa. Diaphragms are known in caseid pelycosaurs, indicating an early origin within synapsids, though they were still fairly inefficient and likely required support from other muscle groups and limb motion.
The advanced cynodonts have very mammal-like rib cages, with greatly reduced lumbar ribs. This suggests that these animals had more developed diaphragms, were capable of strenuous activity for fairly long periods and therefore had high metabolic rates. On the other hand, these mammal-like rib cages may have evolved to increase agility. However, the movement of even advanced therapsids was "like a wheelbarrow", with the hindlimbs providing all the thrust while the forelimbs only steered the animal, in other words advanced therapsids were not as agile as either modern mammals or the early dinosaurs. So the idea that the main function of these mammal-like rib cages was to increase agility is doubtful.

#### Limb posture

The therapsids had sprawling forelimbs and semi-erect hindlimbs. This suggests that Carrier's constraint would have made it rather difficult for them to move and breathe at the same time, but not as difficult as it is for animals such as lizards, which have completely sprawling limbs. Advanced therapsids may therefore have been significantly less active than modern mammals of similar size and so may have had slower metabolisms overall or else been bradymetabolic (lower metabolism when at rest).

### Brain

Mammals are noted for their large brain size relative to body size, compared to other animal groups. Recent findings suggest that the first brain area to expand was that involved in smell. Scientists scanned the skulls of early mammal species dating back to 190–200 million years ago and compared the brain case shapes to earlier pre-mammal species; they found that the brain area involved in the sense of smell was the first to enlarge. This change may have allowed these early mammals to hunt insects at night when dinosaurs were not active.
After the extinction of the dinosaurs 66 million years ago, mammals began to increase in body size as new niches became available, but their brain lagged behind their bodies for the first ten million years. Relative to body size the brain of Paleocene mammal was relatively smaller than that of Mesozoic mammals. It was not until the Eocene that the mammalian brains began to catch up with their bodies, particularly in certain areas associated with their senses.

### Testicular descent

Mammals are the only animals in which the testes descend from their point of origin into a scrotum. Concurrently, mammals are the only class of vertebrates to evolve a prostate gland starting with prostate evolution in monotreme mammals.
Testicular descent occurs to a variable degree in various mammals, ranging from virtually no change of position from the abdominal cavity (monotremes, elephants, and hyraxes); through migration to the caudal end of the abdominal cavity (armadillos, whales, and dolphins); migration just through the abdominal wall (hedgehogs, moles, seals); formation of a sub-anal swelling (pigs, rodents); to the development of pronounced scrota (primates, dogs, ruminants) in mammals.