I'm learning about ideal and non-ideal gas behavior in Chemistry, and my textbook and online sources say two things :
- Gases behave ideally at high temperatures and low pressures.
- Gases behave non-ideally at high pressures and low temperatures.
My question is : Doesn't increasing temperature lead to higher pressure (assuming rigid container), and thus the two general statements contradict each other?
Further, I understand why compressing a gas to increase pressure will lead to non-ideal behavior: the actual volume of gas molecules becomes noticeable compared to the volume of container. But, in a rigid container, raising temperature to increase the pressure of a gas doesn't exactly alter any volume dimensions, so why would gases act non-ideally in the latter scenario? (pressure is high so according to textbook gas is non-ideal)