# Compression of a gas in a cylinder

On my test I had a question: A movable, friction-less, and rigid piston stands upright with a 10 kg weight resting on top like this, compressing the gas inside. If the piston is turned on its side, will the volume of the gas increase? I said yes, but my teacher said no, and marked it wrong. My reasoning for my answer is that when the cylinder is upright, gravity is pulling the weight downwards and thus inwards towards the bottom of the cylinder, compressing the gas. But, when the piston is turned on its side, gravity pulls the weight downwards, against the wall of the cylinder, not inwards towards the bottom. Therefore, it would take less force to push the weight outwards, so the gas would be able to expand and take up more volume. Is my assumption correct or incorrect and why?

$$mg+p_{\text{atm}}\cdot A = p_{\text{int}} \cdot A$$
where $A$ is the area of the piston, $p_{\text{atm}}$ is the atmospheric pressure and $p_{\text{int}}$ is the gas pressure. One big issue with your question is that $A$ is not given, so the calculation cannot be completed.
Also, it is conceivable that your teacher is not considering gravity in that particular question. Is gravity is not considered, then the position of the piston would not change, since the $mg$ (gravitational) term would disappear from the above equation and the position of the piston would be independent from the orientation of the cylinder.