It is possible to have multiple independent variables and/or multiple dependent variables. For instance, in multivariable calculus, one often encounters functions of the form, where z is a dependent variable and x and y are independent variables.
Gas exchange between the air within the alveoli and the pulmonary capillaries occurs by diffusion. The oxygen must first dissolve before passing through the respiratory epithelium. Gas moves from a region of high partial pressure to a region of low partial pressure, down a partial pressure gradient.
Gas exchange in the lungs is referred to as external respiration as one side of the respiratory membrane - that is, the alveolar air - is actually outside of the body. As blood flows through the pulmonary capillaries, oxygen diffuses into the blood and carbon dioxide diffuses into the alveolar gas.