In my chemistry textbook, it states that the volume of a gas is directly proportional with the amount(number of moles) of that gas. However, it also mentioned before that the volume of a gas depends on its container. So if the volume of a gas depends on its container then wouldn't the volume not change as you add or take away gas molecules? As long as the container doesn't change wouldn't the volume of the gas stay the same?
I must clear one thing up. gases always fill their container. If you take away gas particles, it will always fill its container. The volume of gas is proportional to many different factors, though. Based on the ideal gas equation, volume is proportional to moles and temperature. It is inversely proportional to pressure. when the text say that volume is proportional to amount, it is assuming all other variables are constant, and not changed. So yes, in general, as there is an increase in volume, there is an increase in number of moles of gas.