Respiratory system
Among quadrupeds, the respiratory system generally includes tubes, such as the bronchi, used to carry air to the lungs, where gas exchange takes place. A diaphragm pulls air in and pushes it out. Respiratory systems of various types are found in a wide variety of organisms.
In humans and other mammals, the respiratory system consists of the airways, the lungs, and the respiratory muscles that mediate the movement of air into and out of the body.  Within the alveolar system of the lungs, molecules of oxygen and carbon dioxide are passively exchanged, by diffusion, between the gaseous environment and the blood.  Thus, the respiratory system facilitates oxygenation of the blood with a concomitant removal of carbon dioxide and other gaseous metabolic wastes from the circulation.
The system also helps to maintain the acid-base balance of the body through the efficient removal of carbon dioxide from the blood.

# Anatomy
In humans and other animals, the respiratory system can be conveniently subdivided into an upper respiratory tract (or conducting zone) and lower respiratory tract (respiratory zone), trachea and lungs.
Air moves through the body in the following order:
- Nostrils
- Nasal cavity
- Pharynx (naso-, oro-, laryngo-)
- Larynx (voice box)
- Trachea (wind pipe)
- Thoracic cavity (chest)
- Bronchi (right and left)
- Alveoli (site of gas exchange)

## Upper respiratory tract/conducting zone
The conducting zone begins with the nares (nostrils) of the nose, which open into the nasopharynx (nasal cavity). The primary functions of the nasal passages are to: 1) filter, 2) warm, 3) moisten, and 4) provide resonance in speech. The nasopharynx opens into the oropharynx (behind the oral cavity). The oropharynx leads to the laryngopharynx, and empties into the larynx (voicebox), which contains the vocal cords, passing through the glottis, connecting to the trachea (wind pipe).

## Lower respiratory tract/respiratory zone
The trachea leads down to the thoracic cavity (chest) where it divides into the right and left "main stem" bronchi. The subdivision of the bronchus are: primary, secondary, and tertiary divisions (first, second and third levels). In all, they divide 16 more times into even smaller bronchioles.
The bronchioles lead to the respiratory zone of the lungs which consists of respiratory bronchioles, alveolar ducts and the alveoli, the multi-lobulated sacs in which most of the gas exchange occurs.

# Ventilation
Ventilation of the lungs is carried out by the muscles of respiration.

## Control
Ventilation occurs under the control of the autonomic nervous system from the part of the brain stem, the medulla oblongata and the pons. This area of the brain forms the respiration regulatory center, a series of interconnected neurons within the lower and middle brain stem which coordinate respiratory movements. The sections are the pneumotaxic center, the apneustic center, and the dorsal and ventral respiratory groups. This section is especially sensitive during infancy, and the neurons can be destroyed if the infant is dropped or shaken violently. The result can be death due to "shaken baby syndrome."

## Inhalation
Inhalation is initiated by the diaphragm and supported by the external intercostal muscles. Normal resting respirations are 10 to 18 breaths per minute. Its time period is 2 seconds. During vigorous inhalation (at rates exceeding 35 breaths per minute), or in approaching respiratory failure, accessory muscles of respiration are recruited for support. These consist of sternocleidomastoid, platysma, and the strap muscles of the neck.
Inhalation is driven primarily by the diaphragm.  When the diaphragm contracts, the ribcage expands and the contents of the abdomen are moved downward.  This results in a larger thoracic volume, which in turn causes a decrease in intrathoracic pressure.  As the pressure in the chest falls, air moves into the conducting zone.  Here, the air is filtered, warmed, and humidified as it flows to the lungs.
During forced inhalation, as when taking a deep breath, the external intercostal muscles and accessory muscles further expand the thoracic cavity.

## Exhalation
Exhalation is generally a passive process, however active or forced exhalation is achieved by the abdominal and the internal intercostal muscles. During this process air is forced or exhaled out.
The lungs have a natural elasticity; as they recoil from the stretch of inhalation, air flows back out until the pressures in the chest and the atmosphere reach equilibrium.
During forced exhalation, as when blowing out a candle, expiratory muscles including the abdominal muscles and internal intercostal muscles, generate abdominal and thoracic pressure, which forces air out of the lungs.

# Circulation
The right side of the heart pumps blood from the right ventricle through the pulmonary semilunar valve into the pulmonary trunk. The trunk branches into right and left pulmonary arteries to the pulmonary blood vessels. The vessels generally accompany the airways and also undergo numerous branchings. Once the gas exchange process is complete in the pulmonary capillaries, blood is returned to the left side of the heart through four pulmonary veins, two from each side. The pulmonary circulation has a very low resistance, due to the short distance within the lungs, compared to the systemic circulation, and for this reason, all the pressures within the pulmonary blood vessels are normally low as compared to the pressure of the systemic circulation loop.
Virtually all the body's blood travels through the lungs every minute. The lungs add and remove many chemical messengers from the blood as it flows through pulmonary capillary bed . The fine capillaries also trap blood clots that have formed in systemic veins.

# Gas exchange
The major function of the respiratory system is gas exchange.  As gas exchange occurs, the acid-base balance of the body is maintained as part of homeostasis. If proper ventilation is not maintained two opposing conditions could occur: 1) respiratory acidosis, a life threatening condition, and 2) respiratory alkalosis.
Upon inhalation, gas exchange occurs at the alveoli, the tiny sacs which are the basic functional component of the lungs.  The alveolar walls are extremely thin (approx. 0.2 micrometres), and are permeable to gases. The alveoli are lined with pulmonary capillaries, the walls of which are also thin enough to permit gas exchange.  All gases diffuse from the alveolar air to the blood in the pulmonary capillaries, as carbon dioxide diffuses in the opposite direction, from capillary blood to alveolar air.  At this point, the pulmonary blood is oxygen-rich, and the lungs are holding carbon dioxide.  Exhalation follows, thereby ridding the body of the carbon dioxide and completing the cycle of respiration.
In an average resting adult, the lungs take up about 250ml of oxygen every minute while excreting about 200ml of carbon dioxide. During an average breath, an adult will exchange from 500 ml to 700 ml of air. This average breath capacity is called tidal volume.

# Development
The respiratory system lies dormant in the human fetus during pregnancy. At birth, the respiratory system is drained of fluid and cleaned to assure proper functioning of the system. If an infant is born before forty weeks gestational age, the newborn may experience respiratory failure due to the under-developed lungs. This is due to the incomplete development of the alveoli type II cells in the lungs, necessary for the production of surfactant. The infant lungs do not function due to collapse of alveoli caused by surface tension of water remaining in the lungs, which in normal cases would be prohibited by the presence of surfactant. This condition may be avoided by giving the mother a series of steroid shots in the final week prior to delivery, which will enhance the development of type II alveolar cells.

# Role in communication
The movement of gas through the larynx, pharynx and mouth allows humans to speak, or phonate. Because of this, gas movement is extremely vital for communication purposes.

# Conditions of the respiratory system
Disorders of the respiratory system can be classified into four general areas:
- Obstructive conditions  (e.g., emphysema, bronchitis, asthma attacks)
- Restrictive conditions  (e.g., fibrosis, sarcoidosis, alveolar damage, pleural effusion)
- Vascular diseases  (e.g., pulmonary edema, pulmonary embolism, pulmonary hypertension)
- Infectious, environmental and other "diseases"  (e.g., pneumonia, tuberculosis, asbestosis, particulate pollutants) coughing is of major importance, as it is the body's main method to remove dust, mucus, saliva, and other debris from the lungs. Inability to cough can lead to infection. Deep breathing exercises may help keep finer structures of the lungs clear from particulate matter, etc.
The respiratory tract is constantly exposed to microbes due to the extensive surface area, which is why the respiratory system includes many mechanisms to defend itself and prevent pathogens from entering the body.
Disorders of the respiratory system are usually treated internally by a pulmonologist or Respiratory Physician.

# Gas exchange in plants
Plants use carbon dioxide gas in the process of photosynthesis, and then exhale oxygen gas, a waste product of photosynthesis. However, plants also sometimes respire as humans do, using oxygen and producing carbon dioxide.
Plant respiration is limited by the process of diffusion. Plants take in carbon dioxide through holes on the undersides of their leaves known as stomata(sing:stoma).  However, most plants require little air. Most plants have relatively few living cells outside of their surface because air (which is required for metabolic content) can penetrate only skin deep. However, most plants are not involved in highly aerobic activities, and thus have no need of these living cells.