What is the Function of the Ribs and Diaphragm in the Breathing Process?
When you inhale, the muscle between your ribs contract and your rib cage rises. Your diaphragm contracts, becomes flattened, and moves lower in the chest cavity. As a result, the space in the chest cavity becomes larger and a slight vacuum forms. Air now rushes into you lungs because the air outside your body is under more pressure then the air inside the lungs.
When you exhale, the muscles over the ribs relax and your ribs drop down in the chest cavity. Your diaphragm relaxes and returns to its resting, dome-shaped position. The relaxation of these muscles decreases the volume of the chest cavity, putting pressure on the air and forcing most of it out of the alveoli.