In human anatomy, the thoracic diaphragm, or simply the diaphragm, is a sheet of internal skeletal muscle that extends across the bottom of the rib cage. The diaphragm separates the thoracic cavity containing the heart and lungs, from the abdominal cavity and performs an important function in respiration: as the diaphragm contracts, the volume of the thoracic cavity increases and air is drawn into the lungs (inspiration).
During inhalation, the diaphragm contracts and moves in the inferior direction, thus enlarging the volume of 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.
The diaphragm is primarily innervated by the phrenic nerve which is formed from the cervical nerves C3, C4 and C5. While the central portion of the diaphragm sends sensory afferents via the phrenic nerve, the peripheral portions of the diaphragm send sensory afferents via the intercostal (T5-T11) and subcostal nerves (T12).