What is the purpose of yawning?

One theory states that yawning is an involuntary respiratory reflex, which regulates the carbon dioxide and oxygen levels in the blood.

A yawn is commonly triggered either by fatigue or boredom and when a person is tired or bored the breathing is not regulated and it is shallow, and little oxygen is carried to the lungs by the oxygen-toting cardiovascular system.

Yawning elevates ones alertness, as the sudden intake of oxygen increases the heart rate, rids the lungs and the bloodstream of the carbon dioxide buildup, and forces oxygen through blood vessels in the brain, while restoring normal breathing and ventilating the lungs.

Yawning is a kind of physiological mechanism that is designed to maintain attention and regulate our breathing.