Thoracic diaphragm
In the anatomy of mammals, the thoracic diaphragm is a sheet of muscle extending across the bottom of the ribcage. The diaphragm separates the thoracic cavity from the abdominal cavity and performs an important function in respiration.  A diaphragm in anatomy can refer to other flat structures such as the urogenital diaphragm or pelvic diaphragm, but "the diaphragm" generally refers to the thoracic diaphragm.  Other vertebrates such as amphibians and reptiles have diaphragms or diaphragm-like structures, but important details of the anatomy vary, such as the position of lungs in the abdominal cavity.

# Function
The diaphragm is crucial for breathing and respiration.  During inhalation, the diaphragm contracts, thus enlarging the thoracic cavity (the external intercostal muscles also participate in this enlargement).  This reduces intra-thoracic pressure: in other words, enlarging the cavity creates suction that draws air into the lungs.  When the diaphragm relaxes, air is exhaled by elastic recoil of the lung and the tissues lining the thoracic cavity in conjunction with the abdominal muscles which act as an antagonist paired with the diaphragm's contraction.
It is not responsible for all the breathing related to voice, a common misconception espoused by many teachers but few great singers.  One has more control over the abdominals and intercostals than the actual diaphragm, which lacks proprioceptive nerve endings.  By training proper posture and balance in the rest of the body, the diaphragm naturally strenghtens and works in concert with surrounding structures rather than in isolation.
The diaphragm also helps to expel vomit, feces, and urine from the body by increasing intra-abdominal pressure.

# Anatomy
The Diaphragm is a dome-shaped musculofibrous septum which separates the thoracic from the abdominal cavity, its convex upper surface forming the floor of the former, and its concave under surface the roof of the latter. Its peripheral part consists of muscular fibers which take origin from the circumference of the thoracic outlet and converge to be inserted into a central tendon.
The muscular fibers may be grouped according to their origins into three parts:
There are two lumbocostal arches, a medial and a lateral, on either side.

## Innervation
The diaphragm is innervated by the phrenic nerve.

## Crura and central tendon
At their origins the crura are tendinous in structure, and blend with the anterior longitudinal ligament of the vertebral column.
The central tendon of the diaphragm is a thin but strong aponeurosis situated near the center of the vault formed by the muscle, but somewhat closer to the front than to the back of the thorax, so that the posterior muscular fibers are the longer.

## Openings in the Diaphragm
The diaphragm is pierced by a series of apertures to permit of the passage of structures between the thorax and abdomen. Three large openingsthe aortic, the esophageal, and the vena cavaand a series of smaller ones are described.

## Comparative anatomy and evolution
The existence of some membrane separating the pharynx from the stomach can be traced widely among the chordates.  Thus amphioxus possesses an atrium by which water exits the pharynx, which has been argued (and disputed) to be homologous to structures in ascidians and hagfishes.  The urochordate epicardium separates digestive organs from the pharynx and heart, but the anus returns to the upper compartment to discharge wastes through an outgoing siphon.
Thus the diaphragm emerges in the context of a body plan which separated an upper feeding compartment from a lower digestive tract, but the point at which it originates is a matter of definition.  Structures in fish, amphibians, reptiles, and birds have been called diaphragms, but it has been argued that these structures are not homologous.  For instance, the alligator diaphragmaticus muscle does not insert on the esophagus and does not affect pressure of the lower esophageal sphincter.  The lungs are located in the abdominal compartment of amphibians and reptiles, so that contraction of the diaphragm expels air from the lungs rather than drawing it into them.  In birds and mammals lungs are located above the diaphragm.  The presence of an exceptionally well preserved fossil of Sinosauropteryx, with lungs located beneath the diaphragm as in crocodiles, has been used to argue that dinosaurs could not have sustained an active warm-blooded physiology, or that birds could not have evolved from dinosaurs.  An explanation for this state of affairs is that when lungs originated beneath the diaphragm, but as the demands for respiration increased in warm-blooded birds and mammals, natural selection came to favor the parallel evolution of the herniation of the lungs from the abdominal cavity in both lineages.

## Variations
The sternal portion of the muscle is sometimes wanting and more rarely defects occur in the lateral part of the central tendon or adjoining muscle fibers.

## Pathology
A hiatal hernia can result from a tear or weakness in the diaphragm near the gastroesophageal junction.
If the diaphragm is struck, or otherwise spasms, breathing will become difficult. This is called "having the wind knocked out of you."
A hiccup occurs when the diaphragm contracts periodically without voluntary control.
Diaphragmatic injuries result from either blunt or penetrating trauma.

# Additional images
- Inferior view of the human diaphragm
- The phrenic nerve and its relations with the vagus nerve.
- Plan of right sympathetic cord and splanchnic nerves.
- Thoracic portion of the sympathetic trunk.
- The position and relation of the esophagus in the cervical region and in the posterior mediastinum. Seen from behind.
- Front view of the thoracic and abdominal viscera.
- The duodenum and pancreas.
- Topography of thoracic and abdominal viscera.
- Organs of abdomen
- Hiatal hernia
- Probably the first dictionary definition of "diaphragm"