Volume of composition of air My teacher stated:


  At standard conditions, 1 liter of air at 21% oxygen possesses $\pu{0.21 L}$ of oxygen. Since at STP, 1 mole of gas occupies $\pu{22.4 L}$, simply divide $0.21/22.4$, to arrive at 0.0094 moles of oxygen. 


I have a question regarding this. What if I trap $\pu{100 ml}$ of air in a vessel and maintain $\pu{273 K}$ and pressure $\pu{1 atm}$? So, in that case, what does it mean that oxygen has volume of $\pu{21 ml}$? Won’t the volume of oxygen and nitrogen be same inside vessel? Or am I wrong somehow?
If you took the 100 mL sample of air, and took out everything but the oxygen, then the amount of oxygen trapped would fill 21 mL at STP.

One way to think of it is, even though the oxygen would expand to fill the container, its pressure would need to reduce according to Boyle's law: P1V1 = P2V2. This is where the concept of Partial Pressure comes from. But if you then compressed that oxygen so that P = 1 atm (since you specified initial pressure to be 1 atm), the oxygen would take up 21 mL of volume.