The thorax is comprised of 12 thoracic vertebrae and 12 pairs of ribs, which attach anteriorly to the sternum. The lungs take up most of the space in the thorax, with the mediastinum in between. The lungs are lined in parietal pleura, which are separated from the visceral pleura by a small amount of serous fluid. The potential space between the visceral and parietal pleura is termed the pleural space.
Central nervous system stimulation to breathe leads to contraction of the diaphragm and intercostal muscles, causing expansion of the thoracic cavity. This reduces intra-thoracic pressure lower than atmospheric pressure, drawing in air to the alveoli. This requires expansion of the lungs and ribcage and smooth movement of the pleura relative to one another. There must be free passage of air through the airway to the alveoli where gas exchange occurs across the alveolar membrane, delivering oxygen to the circulation.
The purpose of breathing is to provide oxygenation of the blood, and to remove carbon dioxide. The cardiovascular system transports the oxygenated blood to the tissues for cellular metabolism. In order for sufficient oxygen to reach the arterial blood there has to be adequate ventilation AND adequate perfusion of the lungs.
A schematic representation of an alveolus and a capillary. Air enters the alveolus then gas exchange occurs by simple diffusion.
Ventilation is the amount of air that reaches the alveoli and perfusion is the amount of blood that reaches the alveoli. As oxygen moves from the alveoli across the alveolar membrane into the blood within the alveolar capillaries it is clear both ventilation and perfusion need to be adequate for gas exchange to occur. An imbalance of the two, e.g. when you have adequate perfusion of an alveolus but inadequate ventilation, is termed ventilation/perfusion mismatch (V/Q mismatch). Clearly reduced gas exchange occurs in an alveolus under these circumstances and hypoxaemia will occur.