Primary function of the respiratory system

The respiratory works closely with the circulatory system and its primary function is the supply of oxygen to the blood so this in turn delivers oxygen to all parts of the body. To put it simply, the principle functions of the respiratory system are:
Ventilate the lungs
Extract oxygen from the air and transfer it to the bloodstream
Excrete carbon dioxide and water vapour
Maintain the acid base of the blood