The musculoskeletal wall of the thorax is flexible and consists of segmentally arranged vertebrae, ribs, and muscles and the sternum.
The thoracic cavity enclosed by the thoracic wall and the diaphragm is subdivided into three major compartments: a left and a right pleural cavity, each surrounding a lung, and the mediastinum.